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 1017133 - Allocation issues when extending stripes with lower stripe number and using 100%FREE argument
Summary: Allocation issues when extending stripes with lower stripe number and using 1...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.5
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Alasdair Kergon
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-09 09:58 UTC by Nenad Peric
Modified: 2013-10-14 22:35 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-14 22:35:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Nenad Peric 2013-10-09 09:58:32 UTC
Description of problem:

If you try to extend a striped LV using a -l100% argument and a stripe argument whith different size than original LV (smaller), LV will get extended on disks which were maybe not expected. 


How reproducible:

Create LV  and then increase its size by stripe number that is lower:

vgcreate vg /dev/sd{a..c}1

lvcreate -i 3 -L1G -n stripe vg
lvextend -i 1 -l100%FREE vg/stripe

Extension will take other PV's as well, making more than one stripe. 
The %FREE calculation is taken into account before considering number of stripes, and the stripes are then doubled to accomodate the stripe size request:

Before extension:

[root@virt-011 ~]# pvs 
  PV         VG         Fmt  Attr PSize  PFree 
  /dev/sda1  vg         lvm2 a--   9.99g  9.66g
  /dev/sdb1  vg         lvm2 a--   9.99g  9.66g
  /dev/sdc1  vg         lvm2 a--   9.99g  9.66g

After extension:

[root@virt-011 ~]# lvextend -i 1 -l100%FREE vg/stripe
  Extending logical volume stripe to 28.97 GiB
  Logical volume stripe successfully resized
[root@virt-011 ~]# pvs 
  PV         VG         Fmt  Attr PSize  PFree 
  /dev/sda1  vg         lvm2 a--   9.99g     0 
  /dev/sdb1  vg         lvm2 a--   9.99g     0 
  /dev/sdc1  vg         lvm2 a--   9.99g  1.01g


Should a lvextend with smaller number of stripes take the rest of PVs (creating more stripe 'copies' spread out accross PVs in LV)?

Comment 3 Alasdair Kergon 2013-10-14 22:30:36 UTC
OK - this seems to work correctly for me.

Try -l+100%FREE

Without the + it takes the amount of free space then uses that as the absolute size the final volume should be - so you are left with 1G (the original size) unused.

More examples in the man pages perhaps!


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