How to move Move /home

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Eric Lee Green
Date:  
Subject: How to move Move /home
Don Calfa wrote:
> How can I move my /home directory? Right now it's part of the root
> directory on hda3 and I'd like to move it to hdb1.


Easiest way is to go to single user mode with 'init 1', then, assuming you have
hdb1 mounted as /usr/local , you'd do this:

# cd /
# tar cf - home | ( cd /usr/local ; tar xvpf - )
# mv home home-
# ln -s /usr/local/home home

Then go back into multiuser mode, and make sure it worked. Once you're sure it
worked (i.e. you can log in as a user whose home directory is in /home and see
all your files), you can do this:

# /bin/rm -rf /home-

to get rid of the old version.

-- 
Eric Lee Green              
Linux/Unix/Storage Engineer Seeks Job -
   see http://badtux.org for resume