I'm attempting to grow /dev/sda5
, which is an 'lvm2 pv' partition, but it's contained in /dev/sda2
, which is an extended partition.
There is plenty of "unallocated" space immediately after /dev/sda2
, since I've just cloned my previous disk to a larger one.
My plan is to resize the extended partition, and then resize the contained PV to match. Then I'll extend the VG and the filesystem.
So I've booted using a Linux Mint 17.1 USB stick and run gparted. It won't let me resize the extended partition, claiming that it's "Busy (At least one logical partition is mounted)".
However, running mount
(or cat /proc/mounts
) doesn't show anything other than the Live USB image mounted.
What's the problem?
Best Answer
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:
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:
Check the new size:
Reactivate the volume group:
Then extend the logical volume into the new space:
I forgot to specify
-r
to resize the filesystem, so I have to do that as well...