moving /home

Jeff Vian jvian10 at charter.net
Mon Dec 5 06:48:15 UTC 2005


On Sun, 2005-12-04 at 09:47 -0500, Claude Jones wrote:
> I would like to move my home directory to a new 300GB SATA drive - I edit 
> video, so I need lots of space.
> I've installed the hardware, and using qtparted I've formatted it as ext3 - in 
> qtparted it appears as sda1
> My current mounts:
> 
> /dev/mapper/VolGroup00-LogVol02 on / type ext3 (rw)
> /dev/proc on /proc type proc (rw)
> /dev/sys on /sys type sysfs (rw)
> /dev/devpts on /dev/pts type devpts (rw,gid=5,mode=620)
> /dev/hdb1 on /boot type ext3 (rw)
> /dev/shm on /dev/shm type tmpfs (rw)
> /dev/mapper/VolGroup00-LogVol00 on /home type ext3 (rw)
> /dev/hda1 on /mnt/windows type ntfs (ro,umask=0222,gid=100)
> none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
> /proc on /var/named/chroot/proc type none (rw,bind)
> sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
> 
> I'm caught in a circular logic trap and I can't figure out what to do next. 
> I've read the mount and fstab man pages, and googled this issue, but I'm 

You have received a lot of good advice.

What I would do is a 2 step procedure.

first you need to mount the new drive and copy the data from the
old /home to the new /home (you cannot have them both mounted as /home
at the same time.
    # mount /dev/sda1 /mnt
    # cp -a /home/* /mnt
those two steps will handle that

now you need to unmount the old /home and  mount the new /home as well
as setting it so the mount will occur properly when you reboot.

/dev/mapper/VolGroup00-LogVol00 on /home type ext3 (rw) 
in your list above says you likely have a line such as
   /dev/mapper/VolGroup00-LogVol00   /home   ext3  defaults  1 2
in /etc/fstab.
comment that line out and make a similar line that reads
   /dev/sda1     /home     ext3    defaults  1 2
instead

When you reboot the new drive will automagically be mounted as /home and
all the data will already be in place for you.

HTH


> missing something. What would be the next step? 
> 
> -- 
> Claude Jones
> Bluemont, VA, USA
> 




More information about the users mailing list