LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   moving /var to a new hdd (https://www.linuxquestions.org/questions/linux-software-2/moving-var-to-a-new-hdd-111193/)

freelinuxcpp 11-01-2003 03:12 PM

moving /var to a new hdd
 
Hello all
i have a mail server machine , the problem is i have not enouth disk space the /var (clients data ) has occuped the hole of it and now i need to do something to resolve this problem , i thought about installing a larger hard disk but the problem is how to move /var with it's content to this hard drive will just calling this new partition (of the new hard drive ) /var and copy / past data to it will be anough ?
thanx for any help

tokyoeye 11-01-2003 03:22 PM

Hi,

After copying /var you will have to update /etc/fstab to reflect the changes. Adding something like this should work:

/dev/hdb3 /var ext3 defaults 1 2

Off course it may not be /dev/hdb3 on your system. You may also have to change ext3 to ext2 or whatever you use (pick 'auto' if you don't know). You will also have to look at the last two numbers. This determines integrity checking stuff (fsck). See man fstab for more info.

Hope this helps...

acid_kewpie 11-01-2003 03:23 PM

please try searching this site, it contains vast amounts of useful information, for example:
http://www.linuxquestions.org/questi...threadid=88106

musrum 11-01-2003 03:32 PM

There's one more step. After you've validated that your new var volume is working, boot into maintenance mode, then double check to make sure that /var isn't mounted, then check again, then when you are sure:

cd /var
rm -rf *

This will reclaim the space consumed by the old versions of the files in /var when /var was a directory on your / partition rather than a separate file system.

For the truly belt and suspenders, back up everything in var first.

freelinuxcpp 11-02-2003 02:52 AM

thank u very much
it's exactely what i need


All times are GMT -5. The time now is 06:14 AM.