[YLUG] symlinks
Rob Hall
rob at waylock.co.uk
Fri May 23 00:49:37 BST 2008
Hello all,
I've got a Debian server hosted by 1&1 on which we are running a whole
bunch of stuff including a bunch of web-based services such as
squirrelmail, moodle and phpmyadmin. All seems to be well.
I noticed today whilst checking something else that the partitioning
scheme is pretty rubbish for what we want. /var is on its own partition
of about 4Gb which is not big enough for what we need yet there is 220Gb
spare in the home directory and seeing as this is a root server with no
other real users makes this the obvious place to start using for all the
content we want to upload.
If I were to copy a directory in my /var/www folder to a new folder on
the /home directory and then create a symbolic link from the /var/www
folder to the new destination, can anyone see any issues with this?
(awaits floodgates opening!)
Basically my idea would be to do something along the lines of :-
mkdir /home/www
cp -pr /var/www/website /home/www/website
ln -s /home/www/website /var/www/website
mv /var/www/website /var/www/old_website (just in case it all goes
wrong! I would delete this later)
This approach "appears" to have worked with a silly test site and an old
moodle site that I set up a while ago and all seems well. I just need
convincing that Apache or MySQL isn't going to throw an obscure wobbler
at these symbolic links. I have been very brave and moved all my current
MySQL databases onto this drive and that has worked.
How about moving the entire /var/www structure to the /home/www folder
and just having one symbolic link in /var to the /home/www folder - is
that a viable option?
Reimaging the machine is not an option as it is buried somewhere in 1
and 1's data centre and is a live, working server! I've also read
horrible things and dire warnings about servers not being able to reboot
if the /var folder is not in the right partition and I'm not *that*
brave!
Thanks in advance for any pointers.
Rob
More information about the York
mailing list