Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Combination of mirror, raid1,4,5 and stripe with -lX%FREE option gives unpredictable results.
Highest possible value is always applied to create all the needed LVs (public and private)
ending up with public logical volume of unpredictable size.
Version-Release number of selected component (if applicable):
lvm2-2.02.130-2.el7.x86_64
How reproducible:
always
Steps to Reproduce:
1. vgcreate vg /dev/sda
2. lvcreate -n test_lv --type mirror -l30%FREE -m 4 vg
3. lvs
4. check the size of this new LV
Actual results:
The size of logical volumes are reduced, resulting size for public LV is not ~30% but ~16%.
Same behaviour also applies to any other combination of legs and percentage
that would result in exceeding the limit of free volume group extents.
Expected results:
Users should have the public LV of the size they requested. Command should fail
when user tries to create a logical volume whose public+private LVs would exceed
the limit of free extents in volume group
Additional info:
the expected results are actually implemented for mirror LVs with other than 3 and 4 copies.
Example:
"lvcreate -n test_lv --type mirror -m 1 -l50%FREE vg"
fails with a message:
"Insufficient free space for log allocation for logical volume.
Unable to allocate extents for mirror log."
Comment 2Jonathan Earl Brassow
2015-10-06 21:26:26 UTC
When specifying %FREE, the amount is considered to be an approximation. So, there should not be the assumption of an exact match. However, I see two possible valid complaints in the above:
1) The amount received is much less than the amount requested (I'd need to see the before and after pvs,vgs,lvs to be sure this is the case though).
2) legacy mirrors (i.e. --type mirror) do not function the way other targets do