[NTLUG:Discuss] moving /home to another disk
agoats
agoats at compuserve.com
Mon Sep 19 22:20:02 CDT 2005
> I installed a second disk on my machine, and I'd like to put the /home
> directory on it.
> I thought I could copy /home to the second disk and change fstab thusly:
> /dev/sdb1 /home ....[other params]
>
> This returns the message that /home doesn't exist.
>
> Any suggestions would be appreciated.
The steps you should take are this:
mkdir /home1
mount /dev/sdb1 /home1
I use midnight commander personally, so I'd run mc, use the left side to
view /home, the right side to view /home1 and then select everything in
/home, right clicking on all of the directories to highlight them in
/home.
Then, to be safe, F5 to copy from /home to /home1
Next, edit fstab as you mentioned, but change the directory name of your
original /home to something else, like /home-gone
mv /home /home-gone
you can then restart any way you want, but I'd just reboot so that
everything is clean.
Verify that you do have /home on /dev/sdb1 by running df. Verify that
/home has everything it should, compare it to /home-gone.
If all is well, delete /home-gone and enjoy! BTW, this works for
changing /root, /usr, /var, /opt and others as well.
Alvin
More information about the Discuss
mailing list