[NTLUG:Discuss] Moving /home

Gregory A. Edwards greg at nas-inet.com
Tue Sep 7 22:21:52 CDT 1999


No offense intended but people are trying to work too hard.

Step  1.  Login as root and insure no users are logged in
Step  2.  umount /home
Step  3.  create a dir /oldhome
Step  4.  change fstab to mount /home on new drive and /oldhome on old drive
Step  5.  mount /home and /oldhome - subdirs will still be in /oldhome
Step  6.  cd /oldhome
Step  7.  command line "find . -print | cpio -pdvm /home"
Step  8.  ls -laFR /home - verify all was copied
Step  9.  cd /oldhome
Step 10.  rm -rf *
Step 11.  umount oldhome
Step 12.  change fstab to get rid of oldhome
Step 13.  rmdir /oldhome

Done.  All files will retain their ownership and permissions as before.  Go
slow and be careful before doing "rm -rf *" as root:)  You won't be able to
do this if any users are logged in.


Greg E


> 
> I want to move my home directories (with files in them), to a different
> hard drive.  I already found out that just setting the new drive to have a
> mount point of /home doesn't work.  No files, and then I can't get to the
> files.  I tried moving them to a /newhome and then moving then, but then
> they ended up with in a directory /home/home/<username>
> 
> I'm out of ideas.  I'd like the directories to be /home/<username>
> 
>  Kathleen
>  --------------------------------------------------------------------------
> | |  U-CDX Weaver's Peppermint Patty UD CGC Baylor Therapy Dog (beagle)  | | 
> | |  Bettner's Byte of Magic (Marcie) (beagle) 
> --------------------------------------------------------------------------
>   kathleen at metronet.com




More information about the Discuss mailing list