Linux – I can’t figure out how to extend the Arch home partition into free space

arch linuxgpartedpartition

I'm trying to resize my home partition, but I can't figure out how to do so. Move/Resize doesn't let me move the bar, and there's no space to extend it to. I can't unmount it because it says it's busy.

I saw talk of moving partitions around to be adjacent to extend into the free space, but how would that work? I can't move the unallocated space, and wouldn't moving my home partition before the unallocated space screw stuff up?

enter image description here

Best Answer

Looking at the figure, you can't move the last three partitions. But you could create a new partition in the unallocated space, and copy your existing /home there, e.g., using rsync.

Once you've done that, you can free up the 23Gb on the end of the drive, making it (more) useful to extend your system disk.

Breaking it down a little:

  • create a new ext4 partition in the unallocated space (actually gparted makes a partition, you'll probably have to do a mkfs.ext4 or something like that to make the filesystem).
  • mount that temporarily (not as /home, but for example as /mnt)
  • use rsync (as root) to copy the whole /home tree, e.g.,

    rsync -va /home/ /mnt

  • modify your /etc/fstab to mount the new partition on /home (and a good idea to keep the old /home on a different path)

  • reboot
  • decommission the old partition after you're done verifying things, by unmounting it, removing the line from /etc/fstab and then deleting the partition with gparted.
Related Question