Bug 1065474

Summary: Size of external origin needs to be aligned with thin pool chunk size
Product: Red Hat Enterprise Linux 7 Reporter: Zdenek Kabelac <zkabelac>
Component: kernelAssignee: Joe Thornber <thornber>
kernel sub component: Thin Provisioning QA Contact: yanfu,wang <yanwang>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: agk, bdonahue, coughlan, heinzm, jbrassow, msnitzer, prajnoha, prockai, qcai, thornber, yanwang, zkabelac
Version: 7.0   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kernel-3.10.0-140.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 11:37:06 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:

Description Zdenek Kabelac 2014-02-14 18:07:12 UTC
Description of problem:

Thin pool target has limitation in the use of external origin device size.
If the chunk size is not a power of 2  (i.e. data device is stripe across 3 disks with 64k chunk - combined into 192k stripe/pool chunk_size/block_size) and external origin is just aligned to MB (i.e. 4M extent boundary) it cannot be used - since the last  'unaligned' chunk is not provisioned so any write to the end of thin volume which uses this external is lost.

The latest version of lvm2 prohibits this combination (so can't be easily used to reproduce this bug, unless patching code)
Once the thin pool target is upgraded to support this combination,
new property could be used to enable support for this.

The bug could be also related to Bug 1030411.

Version-Release number of selected component (if applicable):

thin pool target version 1.10

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 yanfu,wang 2014-03-04 03:41:50 UTC
Hi Zdenek,
Could QE know what test steps to reproduce the issue? thanks

Comment 3 Zdenek Kabelac 2014-03-04 09:09:19 UTC
This bug is mainly for tracking kernel bug in target.
Lvm2 currently detects unsupported sizes and doesn't allow to active/create such combination of external origin and thin pool.

lvm2 test suite:

https://git.fedorahosted.org/cgit/lvm2.git/tree/test/shell/lvcreate-thin-external.sh

<<<
vgcreate $vg -s 64K $(cat DEVICES)
# Test validation for external origin being multiple of thin pool chunk size
lvcreate -L10M -T $vg/pool192 -c 192k
lvcreate -an -pr -Zn -l1 -n $lv1 $vg
not lvcreate -s $vg/$lv1 --thinpool $vg/pool192
>>>

VG uses 64K extent - pool has 192K chunks and external origin has just one 64K extent - this will not work in current thinpool driver  and lvm2 must not allow to use this combination. More combination tests like this are possible.

Comment 4 Tom Coughlan 2014-03-04 14:51:01 UTC
(In reply to Zdenek Kabelac from comment #3)

> Lvm2 currently detects unsupported sizes and doesn't allow to active/create
> such combination of external origin and thin pool.

Moving this to 7.1.

Comment 8 Jarod Wilson 2014-07-29 18:22:58 UTC
Patch(es) available on kernel-3.10.0-140.el7

Comment 13 errata-xmlrpc 2015-03-05 11:37:06 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.

https://rhn.redhat.com/errata/RHSA-2015-0290.html