lvmteam/lvm2

lvresize (2.03.22) consistently ignores correct new size and errors out. 2.03.21 works.

Closed this issue · 1 comments

Hi,

this issue is driving me nuts:

I am trying to change an LV from 6TB to 5TB and lvresize keeps misinterpreting the size parameter. It is consistent in the way, that it makes the exact same error regardless if I use different units (say GB) or extents:

lvreduce -t -f -r -L 5T /dev/mapper/vg-volume
Logging initialised at Mon Sep 11 19:45:19 2023
Set umask from 0022 to 0077
TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
File system ext4 found on vg/volume.
File system size (5,00 TiB) is larger than the requested size (1,00 TiB).
File system reduce is required using resize2fs.
File system fsck will be run before reduce.
Skip fsck in test mode.
Skip fs reduce in test mode.
Reducing logical volume vg/volume to 5,00 TiB
Size of logical volume vg/volume changed from 6,00 TiB (49152 extents) to 5,00 TiB (40960 extents).
Test mode: Skipping archiving of volume group.
Logical volume vg/volume successfully resized.
Test mode: Skipping backup of volume group.

The problem is with the file system size check. No matter what value I give (below the current value of 6T) the requested size is never more than 2TB. On my system handing 1TB or 2TB to resizefs will always error out because the smallest possible file system size is about 4.5 TB. Without test mode the behavior is identical only one doesn't see that the tool later on tries to use the correct value (5T) for some reason.

Version 2.03.21 works fine, only 2.03.22 seems broken.