Moving /home to new partition

If /home is just a folder under / and you have a reason to put this on it’s own partition the process isn’t that difficult. Here is the steps I followed to do this.

First, create the new partition on the drive. I was using LVM, so I created a new logical volume, do whatever makes sense for your system here.

Make a place for the new home partition to be mounted while we transfer files.

mkdir /mnt/newhome
mount -t   /mnt/newhome

Move files from current /home to this new location.

cd /home
cp -ax * /mnt/newhome

Once all the files have copied, remove the old home directory, and mount the new partition in its place.

rm -r /home
mount  -t   /home

Edit /etc/fstab for the new partition, and you’re done.

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

This entry was posted in Uncategorized. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>