On 10/01/2021 21:42, the...@sys-concept.com wrote:
I want to move /home directory to a new partition (save drive).
I have 1-SSD drive:
Filesystem Size Used Avail Use%
/dev/sda4 916G 405G 464G 47% /
Home directory is on it taking about 360GB
I was planning doing it in stages.
Stage-1
Using Gparted to resize "/" portion shirk it to about 450GB
create new ext4 partition for /home /dev/sda5
Boot-strap the PC with live-gentoo
mv /home /home.org
mkdir /home
mount ext4 /dev/sda5 /home/
cp -rp /home.org/* /home/
edit fstab:
/dev/sda5 /home ext4 default 0 0
reboot and test home
Am I missing something?
Couple of things.
Firstly, why use a gentoo live disk? Just log in as root.
Secondly, why rename home? Just mount sda5 on /mnt to do the move, then
add it to fstab to mount on /home.
And a little bit you might have missed - DON'T put root's home on a
mounted disk - if it's currently in /home, move it to /. Don't forget to
edit /etc/passwd if you have to move it.
If everything works, remove /home.org
Stage-2:
With Gparted resize both root and home portion, giving root about 200GB and
rest to /home (dev/sda5)
The other way to do it is if you've got a spare hard drive lying around.
Just copy /home onto it (bearing in mind my comment about root's home),
and then copy it back.
But what do you mean by "save drive"? Just splitting the drive into 2
partitions won't do anything, will it? If you want to "save the drive" I
think you need to move /home to spinning rust :-) Unless you're
physically updating the hardware, I wouldn't bother.
Cheers,
Wol