-
Epic
-
Resolution: Unresolved
-
Undefined
-
None
-
[Epic]: Ansible storage role 'grow_to_fill' option on LVM pools always failing with LVM resize failure due to miscalculation of free extents.
-
Moderate
-
Red Hat Ansible Automation Platform, Red Hat Ansible Collections for Runtimes, Red Hat Enterprise Linux
-
0% To Do, 40% In Progress, 60% Done
-
rhel-sst-system-roles
-
False
-
-
Yes
-
Dev ack
-
Bug Fix
-
-
Proposed
What were you trying to do that didn't work?
Resize a logical volume to use the remaining free space in volume group.
What were you trying to do that didn't work?
Customer has been troubleshooting the use of this library in the "ansible linux-system-roles" collection, and have traced an issue with the resizing capabilities to what I believe to be a size calculation bug in blivet. I searched the issues and didn't see anything related, so I'm opening this here.
Note: I first encountered this bug while trying to use blivet to resize a logical volume (after resizing the underlying disk) but have been able to reproduce the issue by simply calling the LVMLogicalVolumeDevice.resize() method even when there is no extra space available.
Customer as been troubleshooting the use of this library in the ansible linux-system-roles collection and has traced an issue with the resizing capabilities to what they believe to be a size calculation bug in blivet. The customer has searched the issues and didn't see anything related, so they've opened a case with us, and an upstream BZ.
"LVM resize fails with calculation error - pv metadata unaccounted for #1320"
https://github.com/storaged-project/blivet/issues/1320
Note: Customer first encountered this bug while trying to use blivet to resize a logical volume (after resizing the underlying disk) but have been able to reproduce the issue by simply calling the LVMLogicalVolumeDevice.resize() method even when there is no extra space available.
What is the impact of this issue to you?
Customer is able to work-around the issue in the LVM CLI using `lvextend`.
Please provide the package NVR for which the bug is seen:
blivet-data-3.6.0-17.el9.noarch Fri Nov 22 09:56:23 2024
libblockdev-lvm-2.28-10.el9.x86_64 Fri Nov 22 09:56:23 2024
lvm2-2.03.24-2.el9.x86_64 Sun Nov 17 06:56:02 2024
lvm2-libs-2.03.24-2.el9.x86_64 Sun Nov 17 06:55:36 2024
python3-blivet-3.6.0-17.el9.noarch Fri Nov 22 09:56:26 2024
How reproducible is this bug?:
Easily reproducible using the following steps below.
Steps to reproduce:
1.) Build a fresh rhel server with one spare disk (in my case scsi controller 0, channel 1)
2.) Apply the vars I shared in my first post (replace /dev/disk/by-scsi/0_0_1_0 with /dev/sdb or other compatible udev path)
3.) Run the ansible storage role once to create the lvm pool/volume
4.) Run the ansible storage role again with grow_to_fill: true and it fails with the message stated.
Expected results:
Expect that when using the Ansible role to resize the logical volume, that given there are adequate free extents available, the volume will be successfully resized without error/issue.
Actual results:
Failed to commit changes to disk: Process reported exit code 5: Insufficient free space: <n> extents needed, but only <n-1> extents available
- links to