View Single Post
Old 9th July 2006, 20:11
tdd_topdog tdd_topdog is offline
Junior Member
Join Date: Jul 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Moving /var to a new drive & renaming mount point

I am a novice linux user. Everything is working perfectly. I am knee deep in working on the website. I need to address my available hard drive space at some point. I used the perfect debian howto and ispconfig. I have two hard drives and five partitions. When I partitioned I dedicated a hard drive to /backup and /home. When I installed ispconfig I followed the recomendation and changed /home/www to /var/www. /dev/hda is an old 6.4gb western digital which is going to run out of space for my www directories which contain howto videos (non-pornographic ). It's not mission critical because I am only using this box as a test server and not a production server but it would be nice if I can create enough space to test everything before I upload to a web host.

/proc /proc proc defaults 0 0
/dev/hda2 / ext3 defaults,errors=remount-ro,usrquota,grpquota 0 1
/dev/hdc2 /backup ext3 defaults 0 2
/dev/hdc3 /home ext3 defaults 0 2
/dev/hda1 none swap sw 0 0
/dev/hdc1 none swap sw 0 0
/dev/hdb /media/cdrom0 iso9660 ro,user,noauto

I know at some point I will have to rename and move /var and I think I can do this:
mkdir /xvar
cp -av /var/* /xvar
rm -r /var

Here are my questions:
1. Can I resize /home partition, ext3 file system, and create a new partition with mount point /var?
2. Is there a way to resize the partition and file system at the same time?
3. Or can I rename /backup mount point to /var?

I can unmount /backup but cant remount it with a new name doing this:
umount /dev/hdc2 /backup
mount /dev/hdc2 /var
this gives me an error message
if i would have been able to remount i am under the impression i can just change the /etc/fstab file at that point.

4. Would one option be more reliable or easier than the other?

Any suggestions and or help appreciated. Please keep any replies on a 'newbies' level
Reply With Quote
Sponsored Links