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 814824 - Support thin pools with non-power-of-2 block sizes between 64K and 1G, in 64K increments
Summary: Support thin pools with non-power-of-2 block sizes between 64K and 1G, in 64K...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.4
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Zdenek Kabelac
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On: 814823
Blocks: 886216
TreeView+ depends on / blocked
 
Reported: 2012-04-20 19:07 UTC by Alasdair Kergon
Modified: 2013-02-21 08:09 UTC (History)
12 users (show)

Fixed In Version: lvm2-2.02.98-5.el6
Doc Type: Enhancement
Doc Text:
Thin pool now also supports non power of 2 chunk sizes. So user now could select better values to fit i.e. striping. The limitation for chunk size is to be a multiply of 64KiB.
Clone Of:
Environment:
Last Closed: 2013-02-21 08:09:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0501 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2013-02-20 21:30:45 UTC

Description Alasdair Kergon 2012-04-20 19:07:46 UTC
Make dm thin bug 814823 available through lvm2.

Comment 1 RHEL Program Management 2012-07-10 06:07:30 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 2 RHEL Program Management 2012-07-10 23:57:32 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 3 Corey Marthaler 2012-07-26 19:44:44 UTC
QE reviewed this BZ for QA_ACK but was unable to ack due to a lack of
requirements or description of how the new feature is supposed to work or be
tested.

Please see
https://wiki.test.redhat.com/ClusterStorage/WhyNoAck

Comment 4 Corey Marthaler 2012-08-09 17:53:50 UTC
QA planning phase ends Aug 10th (tomorrow), without more information this feature will likely be nacked by QA.

https://engineering.redhat.com/program/rhel/rhel-6-4-0/

Comment 5 Zdenek Kabelac 2012-08-10 19:28:02 UTC
This bugzilla should be tested by specifying --chunksize from range 64K  to 1G - which could be divided by 4K  (so   64K, 68K....)
Unlike currently where use could select  64K, 128K, 256K....

Advantage here should be, that if striped LV is used for thin pool the better matching chunksize could be use for non power of 2 stripe sizes.

Comment 6 Corey Marthaler 2012-08-13 16:47:00 UTC
Adding QA ack for 6.4. 

Devel will need to provide unit testing results however before this bug can be
ultimately verified by QA.

Comment 7 Zdenek Kabelac 2012-10-11 09:58:19 UTC
Upstream support with:

https://www.redhat.com/archives/lvm-devel/2012-October/msg00071.html


Example of usage:


lvcreate -T vg/thin -c 192 -L20M


Limitation:

User may use  chunk_size as multiple of 64KiB (the minimal chunk size)
While using non-power-of-2 chunk size  discards has to use 'ignore' mode
(lvcreate will issue a warning for such case and use this mode automatically)

Comment 9 Nenad Peric 2012-11-30 07:27:23 UTC
Based on Comment #7 marking this as verified, tested only with 64k increments starting at 64k up until 1g. 

The command executed was properly warning about the change of mode in case of non-power-of-2 chunk sizes, as expected.

Tested with:

lvm2-2.02.98-3.el6
lvm2-cluster-2.02.98-3.el6
device-mapper-1.02.77-3.el6

kernel-2.6.32-343.el6

Comment 10 Mike Snitzer 2012-11-30 13:22:45 UTC
(In reply to comment #7)
> Limitation:
> 
> User may use  chunk_size as multiple of 64KiB (the minimal chunk size)
> While using non-power-of-2 chunk size  discards has to use 'ignore' mode
> (lvcreate will issue a warning for such case and use this mode automatically)

This limitation doesn't exist in RHEL6.4 kernel (see rhel6.git commit 74e8b7d48b378 "dm-thin: support discard with non power of two blocksize")!

Kabi, I really think this needs to be resolved.

Comment 11 Zdenek Kabelac 2012-11-30 13:30:30 UTC
It's already in upstream lvm git.
It should be part of next lvm RHEL6.4 build.

https://www.redhat.com/archives/lvm-devel/2012-November/msg00062.html
https://www.redhat.com/archives/lvm-devel/2012-November/msg00060.html

Comment 17 Corey Marthaler 2012-12-07 20:36:43 UTC
I updated the subject, and will mark this verified based on those requirements (and not what's in comment #5).

2.6.32-343.el6.x86_64
lvm2-2.02.98-4.el6    BUILT: Wed Dec  5 08:35:04 CST 2012
lvm2-libs-2.02.98-4.el6    BUILT: Wed Dec  5 08:35:04 CST 2012
lvm2-cluster-2.02.98-4.el6    BUILT: Wed Dec  5 08:35:04 CST 2012
udev-147-2.43.el6    BUILT: Thu Oct 11 05:59:38 CDT 2012
device-mapper-1.02.77-4.el6    BUILT: Wed Dec  5 08:35:04 CST 2012
device-mapper-libs-1.02.77-4.el6    BUILT: Wed Dec  5 08:35:04 CST 2012
device-mapper-event-1.02.77-4.el6    BUILT: Wed Dec  5 08:35:04 CST 2012
device-mapper-event-libs-1.02.77-4.el6    BUILT: Wed Dec  5 08:35:04 CST 2012
cmirror-2.02.98-4.el6    BUILT: Wed Dec  5 08:35:04 CST 2012


SCENARIO - [valid_non_power_2_chunksizes]
Create pool volumes using possible (*non* power of 2) chunksizes from 68K to 1048572K

Creating [64] chunksize thinpool volume and corresponding thin virtual volume and thin snapshot
lvcreate --thinpool POOL_64 --chunksize 64 -L 2G snapper_thinp
Removing [64] chunksize thinpool and corresponding thin virtual volume and thin snapshot

Creating [128] chunksize thinpool volume and corresponding thin virtual volume and thin snapshot
lvcreate --thinpool POOL_128 --chunksize 128 -L 2G snapper_thinp
Removing [128] chunksize thinpool and corresponding thin virtual volume and thin snapshot

Creating [192] chunksize thinpool volume and corresponding thin virtual volume and thin snapshot
lvcreate --thinpool POOL_192 --chunksize 192 -L 2G snapper_thinp
  WARNING: Using discards ignore for chunk size non power of 2.
Removing [192] chunksize thinpool and corresponding thin virtual volume and thin snapshot

Creating [256] chunksize thinpool volume and corresponding thin virtual volume and thin snapshot
lvcreate --thinpool POOL_256 --chunksize 256 -L 2G snapper_thinp
Removing [256] chunksize thinpool and corresponding thin virtual volume and thin snapshot

[...]

Creating [712448] chunksize thinpool volume and corresponding thin virtual volume and thin snapshot
lvcreate --thinpool POOL_712448 --chunksize 712448 -L 2G snapper_thinp
  WARNING: Using discards ignore for chunk size non power of 2.
Removing [712448] chunksize thinpool and corresponding thin virtual volume and thin snapshot

Creating [712512] chunksize thinpool volume and corresponding thin virtual volume and thin snapshot
lvcreate --thinpool POOL_712512 --chunksize 712512 -L 2G snapper_thinp
  WARNING: Using discards ignore for chunk size non power of 2.
Removing [712512] chunksize thinpool and corresponding thin virtual volume and thin snapshot

Creating [712576] chunksize thinpool volume and corresponding thin virtual volume and thin snapshot
lvcreate --thinpool POOL_712576 --chunksize 712576 -L 2G snapper_thinp
  WARNING: Using discards ignore for chunk size non power of 2.
Removing [712576] chunksize thinpool and corresponding thin virtual volume and thin snapshot

Creating [712640] chunksize thinpool volume and corresponding thin virtual volume and thin snapshot
lvcreate --thinpool POOL_712640 --chunksize 712640 -L 2G snapper_thinp
  WARNING: Using discards ignore for chunk size non power of 2.
Removing [712640] chunksize thinpool and corresponding thin virtual volume and thin snapshot

Deleting VG snapper_thinp
Deleting PVs /dev/etherd/e1.1p1 /dev/etherd/e1.1p2

Comment 18 Mike Snitzer 2012-12-07 20:53:48 UTC
(In reply to comment #17)

> Creating [192] chunksize thinpool volume and corresponding thin virtual
> volume and thin snapshot
> lvcreate --thinpool POOL_192 --chunksize 192 -L 2G snapper_thinp
>   WARNING: Using discards ignore for chunk size non power of 2.
> Removing [192] chunksize thinpool and corresponding thin virtual volume and
> thin snapshot

This is the 2nd bug I've seen where lvm2 is emitting:
"WARNING: Using discards ignore for chunk size non power of 2."

As I said before that needs to be fixed for RHEL6.4 (there is no reason to disable discard with non-power of 2 chunksize).  Kabi, did that lvm2 fix get flagged for Peter to backport to RHEL6.4 lvm2?

Comment 19 Nenad Peric 2012-12-11 09:29:22 UTC

Just a confirmation here.

I thought that the warning should have been fixed in the newest version of lvm, namely lvm2-2.02.98-4.el6, but I have it installed and the warnings are still there. Maybe a newer lvm version is needed?

When I run a few tests, I am still getting it, like Corey did:

Creating with 192 KB chunksize
  WARNING: Using discards ignore for chunk size non power of 2.
Chunk size reported:   192.00k
And removing...

Creating with 256 KB chunksize
Chunk size reported:   256.00k
And removing...

Creating with 320 KB chunksize
  WARNING: Using discards ignore for chunk size non power of 2.
Chunk size reported:   320.00k
And removing...

Comment 20 Zdenek Kabelac 2012-12-11 10:47:22 UTC
While the original bug was fix, the new bug was introduced, which unfortunately masked itself with another bug thus technically the while the thin pool was set to 'ignore' discard, the live kernel target has been set in a way to passdown discards so it has passed some basic testing.

These 2 upstream patches should beat this issue:

https://www.redhat.com/archives/lvm-devel/2012-December/msg00019.html
https://www.redhat.com/archives/lvm-devel/2012-December/msg00020.html

So for the non-power-of-2 chunk sizes (i.e. -c 192k) passdown should be still supported with latest 6.4 kernel.

Comment 22 Corey Marthaler 2012-12-12 23:38:10 UTC
No longer seeing "WARNING" messages when running this test case. That said, there are still messages to the console. Should those still exist?

[...]
device-mapper: thin: Data device (dm-3) discard unsupported: Disabling discard passdown.
device-mapper: thin: Data device (dm-3) discard unsupported: Disabling discard passdown.
device-mapper: thin: Data device (dm-3) discard unsupported: Disabling discard passdown.
device-mapper: thin: Data device (dm-3) discard unsupported: Disabling discard passdown.
device-mapper: thin: Data device (dm-3) discard unsupported: Disabling discard passdown.
[...]





============================================================
Iteration 2 of 2 started at Wed Dec 12 17:33:50 CST 2012
============================================================
SCENARIO - [valid_non_power_2_chunksizes]
Create pool volumes using possible (*non* power of 2) chunksizes from 68K to 1048572K

Creating [64] chunksize thinpool volume and corresponding thin virtual volume and thin snapshot
lvcreate --thinpool POOL_64 --chunksize 64 -L 2G snapper_thinp
Removing [64] chunksize thinpool and corresponding thin virtual volume and thin snapshot

Creating [128] chunksize thinpool volume and corresponding thin virtual volume and thin snapshot
lvcreate --thinpool POOL_128 --chunksize 128 -L 2G snapper_thinp
Removing [128] chunksize thinpool and corresponding thin virtual volume and thin snapshot

Creating [192] chunksize thinpool volume and corresponding thin virtual volume and thin snapshot
lvcreate --thinpool POOL_192 --chunksize 192 -L 2G snapper_thinp
Removing [192] chunksize thinpool and corresponding thin virtual volume and thin snapshot

Creating [256] chunksize thinpool volume and corresponding thin virtual volume and thin snapshot
lvcreate --thinpool POOL_256 --chunksize 256 -L 2G snapper_thinp
Removing [256] chunksize thinpool and corresponding thin virtual volume and thin snapshot

Creating [384] chunksize thinpool volume and corresponding thin virtual volume and thin snapshot
lvcreate --thinpool POOL_384 --chunksize 384 -L 2G snapper_thinp
Removing [384] chunksize thinpool and corresponding thin virtual volume and thin snapshot

Creating [448] chunksize thinpool volume and corresponding thin virtual volume and thin snapshot
lvcreate --thinpool POOL_448 --chunksize 448 -L 2G snapper_thinp
Removing [448] chunksize thinpool and corresponding thin virtual volume and thin snapshot

[...]

Creating [712448] chunksize thinpool volume and corresponding thin virtual volume and thin snapshot
lvcreate --thinpool POOL_712448 --chunksize 712448 -L 2G snapper_thinp
Removing [712448] chunksize thinpool and corresponding thin virtual volume and thin snapshot

Creating [712512] chunksize thinpool volume and corresponding thin virtual volume and thin snapshot
lvcreate --thinpool POOL_712512 --chunksize 712512 -L 2G snapper_thinp
Removing [712512] chunksize thinpool and corresponding thin virtual volume and thin snapshot

Creating [712576] chunksize thinpool volume and corresponding thin virtual volume and thin snapshot
lvcreate --thinpool POOL_712576 --chunksize 712576 -L 2G snapper_thinp
Removing [712576] chunksize thinpool and corresponding thin virtual volume and thin snapshot

Creating [712640] chunksize thinpool volume and corresponding thin virtual volume and thin snapshot
lvcreate --thinpool POOL_712640 --chunksize 712640 -L 2G snapper_thinp
Removing [712640] chunksize thinpool and corresponding thin virtual volume and thin snapshot

Creating [1048576] chunksize thinpool volume and corresponding thin virtual volume and thin snapshot
lvcreate --thinpool POOL_1048576 --chunksize 1048576 -L 2G snapper_thinp
Removing [1048576] chunksize thinpool and corresponding thin virtual volume and thin snapshot



Deleting VG snapper_thinp
Deleting PVs /dev/sdb1 /dev/sdd1

Comment 23 Zdenek Kabelac 2012-12-13 08:27:11 UTC
(In reply to comment #22)
> No longer seeing "WARNING" messages when running this test case. That said,
> there are still messages to the console. Should those still exist?
> 
> [...]
> device-mapper: thin: Data device (dm-3) discard unsupported: Disabling
> discard passdown.
> device-mapper: thin: Data device (dm-3) discard unsupported: Disabling
> discard passdown.
> device-mapper: thin: Data device (dm-3) discard unsupported: Disabling
> discard passdown.
> device-mapper: thin: Data device (dm-3) discard unsupported: Disabling
> discard passdown.
> device-mapper: thin: Data device (dm-3) discard unsupported: Disabling
> discard passdown.
> [...]

These message states that your 'data' backend device does not support discard operation, thus  the pool will operate in  no_passdown mode.

The future version of lvm might try to detect stacked devices before finalizing table target line and switch to nopassdown with user-space warning.

For now it's just kernel information.

LVM2 metadata correctly keeps the information about discard passdown, and if the data device would be swapped with a discard-enabled device - it will properly use passdown mode. (Check with lvs -o+discards)

So to properly check there is right passdown mode - you could currently
look at 'dmsetup status' for thin pool device and try to use with i.e. SSD.

For 6.5 there will be improved lvs to display these all this info without dmsetup.

For 6.4 version it's expected behavior.

Comment 24 Zdenek Kabelac 2013-02-07 14:43:26 UTC
Improvement of lvs is tracked in Bug 908792.

Comment 25 errata-xmlrpc 2013-02-21 08:09:37 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-0501.html


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