Hi all, I just check my proxy server and found that the harddisk is so limited (my harddisk is only 4 GB). I have to delete some file to make more room but still I feel not enough. I check with df and 95% is used. Can anybody here tell me how to install new scsi harddisk and move some directory to the new disk without disturbing the existing directory structure. Said move /var/squid/cache or /var/log to the new one. Thanks in advance. Kind Regards, M. Edwin
M. Edwin wrote:
Hi all,
I just check my proxy server and found that the harddisk is so limited (my harddisk is only 4 GB). I have to delete some file to make more room but still I feel not enough. I check with df and 95% is used. Can anybody here tell me how to install new scsi harddisk and move some directory to the new disk without disturbing the existing directory structure. Said move /var/squid/cache or /var/log to the new one. Thanks in advance.
If you're adding rather than replacing the disk it shouldn't be too hard. I've done it with a new EIDE disk and also with solaris partitions when the update patches got too big. I would create a partition /var2 on the new disk and create directories /var2/squid and /var/log. Then, as root, copy the files in /var/squid to /var2/squid and /var/log to /var2/log. Then rename /var/squid to /var/squid-old and /var/log to /var/log-old and use ln to create symbolic links: # ln -s /var/squid /var2/squid # ln -s /var/log /var2/log Everything should now work OK. It's probably sensible to shut down squid while you do this. When I did it on solaris, I shut just about everything off for five minutes. When you're sure everything is working OK, you can delete /var/squid-old and /var/log-old. But, if something goes wrong, you should can go back to the old directories. -- JDL Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
On Thu, 8 May 2003 10:03:03 +0700 "M. Edwin" <edwin@nsi.co.id> wrote:
I just check my proxy server and found that the harddisk is so limited (my harddisk is only 4 GB). I have to delete some file to make more room but still I feel not enough. I check with df and 95% is used. Can anybody here tell me how to install new scsi harddisk and move some directory to the new disk without disturbing the existing directory structure. Said move /var/squid/cache or /var/log to the new one. Thanks in advance. In addition to the good advice already given, if you want to do a recursive copy, especially of a directory with a lot of dynamic data, such as /var/log, it is best either to shutdown to single-user mode or, boot into the rescue system. This way, your dynamic data will not change out from under you. You might be better copying the entire /var file system and mounting it as a file system on your other disk. -- Jerry Feldman <gaf@blu.org> Boston Linux and Unix user group http://www.blu.org PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
participants (3)
-
Jerry Feldman
-
John Lamb
-
M. Edwin