Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-01-2003, 03:12 PM   #1
Registered: Jul 2003
Posts: 129

Rep: Reputation: 15
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
Old 11-01-2003, 03:22 PM   #2
Registered: Oct 2003
Location: Amsterdam
Distribution: gentoo,debian
Posts: 47

Rep: Reputation: 15

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...
Old 11-01-2003, 03:23 PM   #3
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982
please try searching this site, it contains vast amounts of useful information, for example:
Old 11-01-2003, 03:32 PM   #4
Registered: Oct 2003
Distribution: Slackware
Posts: 112

Rep: Reputation: 15
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.
Old 11-02-2003, 02:52 AM   #5
Registered: Jul 2003
Posts: 129

Original Poster
Rep: Reputation: 15
thank u very much
it's exactely what i need


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving root from a dual-boot HDD to a new HDD Androoski SUSE / openSUSE 1 05-13-2005 10:34 PM
Can't install packages after moving /var zag_zag Debian 4 11-26-2004 05:21 AM
Moving /var/adm and /var/lib - why does it hurt? J_Szucs Linux - General 1 09-15-2004 06:46 PM
Moving /var to new partition burnpile Slackware 2 12-10-2003 12:33 PM
FTP server not working after moving /var jeffpoulsen Linux - Software 2 10-22-2002 04:34 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:06 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration