How do I store my pics on another harddrive?

toxen

Joined: 2009-06-12
Posts: 4
Posted: Fri, 2009-06-12 13:28

Hi,
I installed g3 last night (first encounter with gallery, php and mysql). Now I need your help.

I have two drives in my server, 40GB with Arch linux and 500GB with all my pictures mounted as /storage .

I want to have all my pictures in /storage and also build albums of the already existing directories in /storage.
What is the best way to accomplish this?
Can I move /srv/http/gallery3/var to /storage?
Can I use symlinks like ln -s /storage/ /srv/http/gallery3/var/albums/ (guess not, didn't get that one to work properly :))?

http://toxen.mine.nu/pics/ is what /storage looks like.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Fri, 2009-06-12 13:45

I take it you are admin of the box?

Why not mount that drive to that location?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
toxen

Joined: 2009-06-12
Posts: 4
Posted: Fri, 2009-06-12 14:16

Yes, I'm admin of the box.

If I mount sdb1 to /srv/http/gallery3/var , how do I get the dirs into albums in g3?
Should I've mounted it to /srv/http/gallery3/var/albums instead?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Fri, 2009-06-12 19:42

I'm not very experienced with using mount, but this is what I'm going to be following for my box:
http://www.linode.com/forums/viewtopic.php?p=16053#16053

So if you mount to /srv/http/gallery3/var you'll need to first mount to a temporary location, then copy/move the contents over, then unmount, then remount to the correct location.

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
fryfrog

Joined: 2002-10-30
Posts: 3236
Posted: Sat, 2009-06-13 22:31

If you want to keep /storage (ie, you have other things that want it to be there) you could use a symlink or use "mount -o bind /storage /another/path"

Or you can just move the whole thing as suggested.

_________________________________
Support & Documentation || Donate to Gallery || My Website

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2009-06-14 02:09

Or just create a symlink from /storage/var to /var/www/gallery3/var
---
Problems? Check gallery3/var/logs before you post! and file bugs here!
Latest code/upgrading: http://codex.gallery2.org/Gallery3:Upgrading
Latest git: http://codex.gallery2.org/Gallery:Using_Git