Re: Moving /home to its own partition.
On Sun, 2003-08-03 at 17:31, alex wrote:
> Suppose Debian was installed on hda with only two partitions, swap
> and / and you have accumulated much data in /home.
> Later, you add another hard drive, hdb, and decided to place swap
> and a separate /home partition on this new drive while keeping / on
> the original hda.
> How would you create new swap and /home partitions om hdb so Debian
> would use these instead of the original /home and swap?
This is the basic step -- THIS IS NOT TESTED. wait for a few GURUS to
edit partition table with
create file system with
mount new partition with
mount /dev/hdb1 /mnt/home2
move data to new partition with
mv /home/* /mnt/home2
get rid of old home directory with
modify /etc/fstab to point to new partition with
add "/dev/hdb1 /home ext2 ?????? 1 1" (not sure what to put for ????)
make changes active with
the swap is similar:
edit /etc/fstab by changing /dev/<old-swap> to /dev/hdb2
> Additionally, how could you best utilize the space gained by
> transferring data from the original /home to the new /home partition?