I want to shrink my second (LVM) partition, in order to create a new partition in the newly freed space. I am using the Live CD to do so, because I know I can't resize/move this partition while it is in use. When I opened GParted in the Live CD, I realized that I could not resize the partition, because when I right-click it, the option "resize/move" is disabled.
I tried to unmount it, to "lazy" unmount it (umount -l /dev/sda2
) but it didn't work.
A screenshot from GParted:
Best Answer
There seems to be plenty of results on Google where people had similar problems. An example:
Back up all your important data before attempting this. Always assume that you can lose all your data when resizing partitions.
Shrink LVM without dataloss
This forum thread suggests the following procedure, in this example we shrink a partition from 10G to 9G:
All credit goes to brianmcgee.
Note:
vgreduce
will fail withcannot resize to xxxxx extents as later ones are allocated
if you have another lv at the end of the disk - I had a swap lv, which I deleted. See How to shrink Ubuntu LVM logical and physical volumes? for help on that situation.