Moving swap & /home to another hard drive.

Carsten Aulbert carsten at
Thu May 17 15:06:19 UTC 2007

alex wrote:
> Is there any benefit or disadvantage if swap and/or /home are moved to 
> their own partitions on
> a second hard drive but leaving ubuntu in the first hard drive.

The advantage for having /home on its own partition is, that you can
reinstall the system completely and leave /home untouched (but please
have a backup ready because you might accidentally format the partition
during this process).

I fI have two physical hard drives available I like having /home and
/tmp on different ones, since this can speed up video processing a lot
(e.g.). Having swap on a different hard drive helps a bit, but usually
it helps much more to increase the memory size ;)

> How would such a move be accomplished?


create a new partition, run sudo mkswap on the partition, change
/etc/fstab and you are done


create new partition, create file system on it (mkfs.ext3, mkfs.xfs,
...), mount the new home partition and use rsync to copy stuff over, e.g.

cd /home; rsync -ax . /mnt/newhome

where /mnt/newhome is the mount point of your new home partition. Please
have a look at the rsync man page to look through the large numebr of
available options.



More information about the ubuntu-users mailing list