Home on separate drive

Phil Sexton philsexton at skybest.com
Wed Apr 23 18:58:10 UTC 2008


Darryl Tidd wrote:
> Hey guys, I'm having some trouble, hope you can help.
> I have installed a second hard drive and I would like to move my /home 
> dir to it.  I have read some tutorials, but I am having trouble
> figuring it out. This is the output of mount in terminal
> /dev/sda1 on / type ext3 (rw,errors=remount-ro)
> proc on /proc type proc (rw,noexec,nosuid,nodev)
> /sys on /sys type sysfs (rw,noexec,nosuid,nodev)
> varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
> varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
> udev on /dev type tmpfs (rw,mode=0755)
> devshm on /dev/shm type tmpfs (rw)
> devpts on /dev/pts type devpts (rw,gid=5,mode=620)
> lrm on /lib/modules/2.6.22-14-generic/volatile type tmpfs (rw)
> securityfs on /sys/kernel/security type securityfs (rw)
> binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc 
> (rw,noexec,nosuid,nodev)
> none on /proc/fs/vmblock/mountPoint type vmblock (rw)
> /dev/scd0 on /media/cdrom0 type iso9660 (ro,nosuid,nodev,user=dtidd)
> //192.168.0.1/QOPENSYS on /media/remote type cifs (rw,mand)
> /dev/sdb1 on /media/disk type ext3 (rw)
> 
> 
> This is my fstab
> 
> # /etc/fstab: static file system information.
> #
> # <file system> <mount point>   <type>  <options>       <dump>  <pass>
> proc            /proc           proc    defaults        0       0
> # /dev/sda1
> UUID=28107d44-f66e-4358-a2a3-a77be8002ce6 /               ext3    
> defaults,errors=remount-ro 0       1
> # /dev/sda5
> UUID=58e5f69c-5a65-4b32-9798-ae0dbafd2f0d none            swap    
> sw              0       0
> /dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec 0       0
> 
> 
> //server/share/media/remote    cifs    
> credentials=/home/user/credentials 0       0
> /dev/sdb1       /media/disk     ext3    defaults        0       1
> 
> Where /dev/sdb1 is my second hard drive.
> 
> I understand that I need to mount /dev/sdb1 as /media/home for instance
> and I need to copy my current /home to the new /home, I'm just having 
> trouble finding the method.
> Thanks
> Darryl Tidd
> N5DLT
> 

I usually use tar and pipe it over, retaining permissions.

As root:
# cd <source directory
# tar cf - . | (cd <destination directory> && tar xBfp -)

-- 
Phil Sexton: http://www.myspace.com/philsexton
Praise Whistlers Abroad: http://praisewhistlers.org/
Naomi's Fancy: http://www.naomisfancy.net/
Naomi's Fancy myspace: http://www.myspace.com/naomisfancy/
The Old Bush: http://www.cdbaby.com/naomisfancy/
Crossing Borders: http://cdbaby.com/cd/naomisfancy2
Naomi's Fancy Free tunes: 
http://www.naomisfancy.net/modules.php?name=Downloads




More information about the ubuntu-users mailing list