Vexed
Sep 27 2006, 04:57 AM
A slightly N00b question folks but I have two Hard drives in my server, one is 75% full, the other is less then 5% full
I have one site with many images using up most of the storage space on the main drive , is there way to utilise this second disk for storage - ie make one larger virtual disk from two physical drives?
Cheers all
Mark
knehcsa
Sep 27 2006, 05:49 AM
the by far easiest way would be to:
make a directory on your second drive
mkdir /path to second drive mount point/images
chown xxx:yyy images (where xxx is the user and yyy is the group of the real images folder that's nearly full)
then here's the command that'll make all this work:
ln -s /path to second drive mount point/images /path to location you want the link/link name
that command ln -s creates a symbolic link that's pretty much the same thing as a windows shortcut if you're more familiar with the windows os. You could set this up two ways: let the one client have two dirs for images, images (that's located on hda1) and images2 (that's the symbolic linked one to hda2). He should start putting all new images in images2. If that doesn't work, you could create the images2 directory, then do:
mv ./images/* ./images2/
rm -fr ./images
mv ./images2 ./images
and that would move all the images over to the second hard drive, and the client would just have one images dir.
The ls -al command will show you what directories have symbolic links and where those links point to.
There are other solutions to "merge" hard drives together, namely raid or lvm, but those really need to be implemented intitally at server setup or with an os reinstall, not mid stream on an active server.