[NTLUG:Discuss] moving /home to another disk

Leroy Tennison leroy_tennison at prodigy.net
Tue Sep 20 04:27:56 CDT 2005


agoats wrote:

>>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
>
>_______________________________________________
>https://ntlug.org/mailman/listinfo/discuss
>
>  
>
Nit picky details, shouldn't the 'Verify ...' line read /home1 rather 
than /home?  There's also the issue of mounting /home1 unless it's in 
fstab.  Alternatively, 'mv /home1 /home' after 'mv /home /home-gone' and 
before reboot?





More information about the Discuss mailing list