Hello All:
I made the /var directory too small.
Is there any way to change the size of a directory under Linux without reformating the HDD ?
John
Hello All:
I made the /var directory too small.
Is there any way to change the size of a directory under Linux without reformating the HDD ?
John
You cannot resize the Linux partition once created. Only LVM partitions can be resized.
If you cannot reformat easily, I'd suggest symlinking folders. Aka add a second hard drive as /home2, then say, move /var/lib to /home2 like this. (assuming you have /home2 as a 2nd hard drive)
cd /var;cp -Rp lib /home2;mv lib lib.bak;ln -s /home2/lib;
That should sucessfully move /var/lib to /home2/lib, then create a virtual link, so /var/lib is correctly working, and its files are at /var/lib.bak/ Restart mysql, and should be okay, at which point you can move / trash the lib.bak directory (Keeping a backup is always suggested)
This is a hack job way of doing it, but sometimes it's the only option.
Yup. Also, if you obtain an additional disk you can always create a larger /var partition on that and copy the contents from one to the other and then dismount the old one and use it for something else. I'd go with HostMerit's suggestion.
Jonathan Michaelson
Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com