Because the partition contains an LVM2 volume group, it's treated as busy (even if it doesn't appear mounted). You need to deactivate the VG:
sudo vgscan # to discover the name of the volume group "mint-vg"
sudo vgchange -a n mint-vg
Then, in gparted, select GParted
/ Refresh Devices
. This should remove the lock icon from the partitions.
Aside: rather than a lock icon, my copy of gparted displays a telephone, which is ... confusing.
At this point, you should be able to resize the extended partition, /dev/sda2
as normal to use the unallocated space. Apply the change.
Then resize the 'lvm2 pv' partition, /dev/sda5
. Apply the change.
Then resize the PV:
sudo pvresize /dev/sda5
Check the new size:
sudo pvdisplay /dev/sda5
Reactivate the volume group:
sudo vgchange -a y mint-vg
Then extend the logical volume into the new space:
sudo lvextend /dev/mint-vg/root /dev/sda5
I forgot to specify -r
to resize the filesystem, so I have to do that as well...
sudo e2fsck -f /dev/mint-vg/root
sudo resize2fs /dev/mint-vg/root
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:
ext4
partition in the unallocated space (actually gparted makes a partition, you'll probably have to do amkfs.ext4
or something like that to make the filesystem)./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)/etc/fstab
and then deleting the partition withgparted
.