Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 821013

Summary: cling allocation policy should never split data across PVs
Product: Red Hat Enterprise Linux 5 Reporter: Alasdair Kergon <agk>
Component: lvm2Assignee: Alasdair Kergon <agk>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.8CC: agk, cmarthal, dwysocha, heinzm, jbrassow, msnitzer, nperic, prajnoha, prockai, thornber, zkabelac
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: lvm2-2.02.88-9.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 821007 Environment:
Last Closed: 2013-01-08 07:11:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 821007    
Bug Blocks:    

Description Alasdair Kergon 2012-05-11 14:54:13 UTC
+++ This bug was initially created as a clone of Bug #821007 +++

The 'cling' allocation policy is behaving like the 'normal' policy when there is no pre-existing preceding segment to cling to.

Example:
Use lvcreate with --alloc cling to create a linear device that fits within the VG but is too large to fit on any single PV in the VG.  It succeeds, placing the data across multiple PVs.  It should fail.

Comment 1 RHEL Program Management 2012-05-11 14:57:33 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 3 Nenad Peric 2012-08-13 11:16:56 UTC
Tested reproducer with old version of lvm:


[root@r5-node01:/etc/yum.repos.d]$ vgcreate test_vg /dev/sdc1 /dev/sdd1
  Clustered volume group "test_vg" successfully created

[root@r5-node01:~]$ lvcreate --alloc cling test_vg -n bigger_lv -L 15G
  Logical volume "bigger_lv" created



Updated lvm to lvm2-2.02.88-8.el5.x86_64 and tested again:

[root@r5-node01:~]$ vgcreate test_vg /dev/sdc1 /dev/sdd1
  Clustered volume group "test_vg" successfully created
[root@r5-node01:~]$ lvcreate --alloc cling test_vg -n bigger_lv -L 15G
  Insufficient suitable allocatable extents for logical volume bigger_lv: 1281 more required

The creation fails as expected. Marking as verified.

Packages installed

before:

lvm2-2.02.88-8.el5
lvm2-cluster-2.02.88-8.el5

after update:

lvm2-cluster-2.02.88-9.el5
lvm2-2.02.88-9.el5

Comment 5 errata-xmlrpc 2013-01-08 07:11:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0023.html