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.
Bug 1268832 - LVM: Unpredictable LV size when using -lX%FREE option
Summary: LVM: Unpredictable LV size when using -lX%FREE option
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.2
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: LVM and device-mapper development team
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-05 12:11 UTC by Roman Bednář
Modified: 2021-09-03 12:41 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-13 12:07:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Roman Bednář 2015-10-05 12:11:29 UTC
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 2 Jonathan 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

Comment 3 Roman Bednář 2015-10-13 12:07:39 UTC
Closing bug. Two new BZs were created to deal with those issues.

1) https://bugzilla.redhat.com/show_bug.cgi?id=1269893

2) https://bugzilla.redhat.com/show_bug.cgi?id=1269533


Note You need to log in before you can comment on or make changes to this bug.