lazyrunner50
Programmer
Ok, so I am trying to mount /var on a new hard drive I just set up. I had everything working fine (on my primary hard drive), and then I added a new hard drive. I set it up (fdisk, mkfs), and then I tried to set up /var on /dev/hdb2 (the second partition on my new drive). I did the following:
I then edited the /etc/fstab
Upon rebooting, I found a small problem... /var was empty! Well, I realized that the data was still there on /dev/hda1, so I booted into recovery mode, removed the fstab entry to point /var to /dev/hdb2, and it worked fine. So, I figured if I mounted /dev/hdb2 on say /mnt/someDir, copied all the contents of /var to that directory, then changed back the fstab to point /var to /dev/hdb2, it would work. Yeah, doesn't work so well...I got all sorts of problems saying it couldn't write to /var/log/sa/sa29, and can't touch the file /var/lock/subsys/network, and so on... Anyway, how do I go about changing this, so that /var can exist on my second hard drive?
Code:
e2label /dev/hdb2 /var
mount -t ext3 /dev/hdb2 /var
Code:
/dev/hdb2 /var ext3 defaults 1 2