Bug 1153312

Summary: support non-power-of-2 VG physical extents
Product: Red Hat Enterprise Linux 6 Reporter: Mike Snitzer <msnitzer>
Component: lvm2Assignee: Alasdair Kergon <agk>
lvm2 sub component: LVM Metadata / lvmetad (RHEL6) QA Contact: cluster-qe <cluster-qe>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: urgent    
Priority: urgent CC: agk, heinzm, jbrassow, mpillai, msnitzer, mspqa-list, prajnoha, prockai, rcyriac, salmy, zkabelac
Version: 6.6Keywords: FutureFeature
Target Milestone: pre-dev-freeze   
Target Release: 6.7   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lvm2-2.02.118-3.el6 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 1100514 Environment:
Last Closed: 2015-09-30 10:18:43 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:    
Bug Blocks: 1142773, 1153398, 1164920    

Description Mike Snitzer 2014-10-15 18:21:54 UTC
+++ This bug was initially created as a clone of Bug #1100514 +++

Description of problem:

lvm2 needs to support the creation of non-power-of-2 aligned logical volumes.

If a HW raid6 device is composed of 10 devices, with a chunk size of 64K, the overall raid stripe is 640K.  640K is _not_ a power of 2.  The pvcreate --dataalignment flag supports non-power-of-2 values so the PVs' data area is aligned relative to the underlying storage's alignment... but when these non-power-of-2 aligned PVs are added to a VG the Logical Volumes that are layered ontop cannot be properly aligned to the underlying PVs' alignment because the VG's physical extent cannot be configured to be a non-power-of-2.

The current workaround is to use a physical extent size that is compatible with the underlying PVs' non-power-of-2 alignment (e.g. use 64k if the raid stripe size is 640k).  But the lvcreate command doesn't know to align the LV relative to the underlying PVs' data alignment (as specified via pvcreate --dataalignment).  SO: the user needs to also use lvcreate -l <# extents> to specify the appropriate number of extents that would perfectly align the LV to the underlying PVs' data alignment.

--- Additional comment from Alasdair Kergon on 2014-10-14 13:20:17 EDT ---

https://lists.fedorahosted.org/pipermail/lvm2-commits/2014-October/002944.html

(Like I said, any further changes should go onto separate bugzillas for separate consideration.)

Comment 5 Alasdair Kergon 2015-09-30 10:18:43 UTC
Included in 6.7 automatically.