1

Topic: cannot shrink lvm2 pv partition

We are trying to shrink lvm2 pv partition, and it is failing with the "request size is less than real size proceed y/n". This happens in the log details and I have no option to answer it.

The partition initially shows with a padlock, but deactivating it removes the locked condition. Either way (locked, unlocked, active, deactivated) the failure is the same. See screen below. Please advise.


https://monosnap.com/file/C8SaeATQJHhA50hkzqIsAnurhyWMot.png

2

Re: cannot shrink lvm2 pv partition

What version of GParted or GParted Live are you using?

3

Re: cannot shrink lvm2 pv partition

i also met this problem, the filesystem of that partition is lvm2 pv. and the version of Gparted is 0.30.0... the detailed message is the same as the above.  More,  the partition is made as a physical volume containing three LVs,  named    swap,  home, and root.  I don't know why i encountered this.  is anyone knows how i can do?  Thx!

4

Re: cannot shrink lvm2 pv partition

i booted from live USB and wanted to shrink the partition to create a new one.  Now im totally in mad

5

Re: cannot shrink lvm2 pv partition

i booted from live USB and wanted to shrink the partition to create a new one.  Now im totally in mad

6

Re: cannot shrink lvm2 pv partition

@trance, is there free space available in the LVM PV?

If so then try shrinking it by a smaller amount.

Note that free space in the file system is not the same as free space in the LVM PV.  For the LVM PV to unallocated space it must be outside of the LVM LVs (Logical Volumes).

7

Re: cannot shrink lvm2 pv partition

gedakc wrote:

@trance, is there free space available in the LVM PV?

If so then try shrinking it by a smaller amount.

Note that free space in the file system is not the same as free space in the LVM PV.  For the LVM PV to unallocated space it must be outside of the LVM LVs (Logical Volumes).

im not quite about the atual free space, but what the Gparted shows is that i hava more than 400Gbs free space in that Lvm pv partition.

8

Re: cannot shrink lvm2 pv partition

https://ibb.co/hHmcpm

9

Re: cannot shrink lvm2 pv partition

the image shows the logs and can be seen  i actually have enough free space, the size of all partitions  are more than 900G, i also tried to shrink a small size but failed.
i finally solved this problem by  backup/recreate/restore, but it could be better if i could shrink it. i come to report this issue  just for others who may encounter this can have a better solution.

10

Re: cannot shrink lvm2 pv partition

Did you try shrinking by a smaller amount?

The log message in the post 2 above this one indicated:
/dev/sda3: Requested size 734.95 GiB is less than real size of < 930.32 GiB

Based on the log message just under 200 GiB of space was unallocated.

11

Re: cannot shrink lvm2 pv partition

I tried shrinking by  a quite small amount, didn't remember the exact size but failed and I forgot to take a picture of that. 

12

Re: cannot shrink lvm2 pv partition

When reporting problems it helps immensely to save the gparted_details.htm log file and include it when reporting an issue.  Screen shots also help, but are missing much of the background data upon which GParted bases its operations.