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 861456 - mirrored thin pool volume creation attempt ignores --thinpool flag
Summary: mirrored thin pool volume creation attempt ignores --thinpool flag
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Zdenek Kabelac
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-28 16:19 UTC by Corey Marthaler
Modified: 2013-02-21 08:13 UTC (History)
9 users (show)

Fixed In Version: lvm2-2.02.98-1.el6
Doc Type: Bug Fix
Doc Text:
Usage of lvcreate options --thinpool together with --mirror caused unexpected mirrored lV being created. This behavior has been fixed by adding explicit check for this case and failing the command with proper error message.
Clone Of:
Environment:
Last Closed: 2013-02-21 08:13:58 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 Corey Marthaler 2012-09-28 16:19:58 UTC
Description of problem:
# Creates a linear Pool Volume
[root@taft-04 ~]# lvcreate --thinpool POOL_lin -L 100M taft
  Rounding up size to full physical extent 4.00 MiB
  WARNING: Thin pool target does not support discards (needs kernel >= 3.4).
  Logical volume "POOL_lin" created
[root@taft-04 ~]# lvs -a -o +devices
  LV               VG    Attr     LSize   Pool Data%  Devices
  POOL_lin         taft  twi-a-tz 100.00m        0.00 POOL_lin_tdata(0)
  [POOL_lin_tdata] taft  Twi-aot- 100.00m             /dev/sdb1(0)
  [POOL_lin_tmeta] taft  ewi-aot-   4.00m             /dev/sdh1(0)


# Creates a striped Pool Volume
[root@taft-04 ~]# lvcreate --thinpool POOL_str -i 2 -L 100M taft
  Using default stripesize 64.00 KiB
  Rounding up size to full physical extent 4.00 MiB
  Rounding size (25 extents) up to stripe boundary size (26 extents)
  WARNING: Thin pool target does not support discards (needs kernel >= 3.4).
  Logical volume "POOL_str" created
[root@taft-04 ~]# lvs -a -o +devices
  LV               VG    Attr     LSize   Pool Data%  Devices
  POOL_str         taft  twi-a-tz 104.00m        0.00 POOL_str_tdata(0)
  [POOL_str_tdata] taft  Twi-aot- 104.00m             /dev/sdb1(25),/dev/sdc1(0)
  [POOL_str_tmeta] taft  ewi-aot-   4.00m             /dev/sdh1(1)


# Creates just a regular Mirror, ignores --thinpool flag
[root@taft-04 ~]# lvcreate --thinpool POOL_mir -m 1 -L 100M taft
  Logical volume "lvol0" created
[root@taft-04 ~]# lvs -a -o +devices
  LV               VG    Attr     LSize   Pool Data% Log        Copy%  Devices
  lvol0            taft  mwi-a-m- 100.00m            lvol0_mlog 100.00 lvol0_mimage_0(0),lvol0_mimage_1(0)
  [lvol0_mimage_0] taft  iwi-aom- 100.00m                              /dev/sdb1(38)
  [lvol0_mimage_1] taft  iwi-aom- 100.00m                              /dev/sdc1(13)
  [lvol0_mlog]     taft  lwi-aom-   4.00m                              /dev/sdh1(2)


Version-Release number of selected component (if applicable):
2.6.32-279.el6.x86_64

lvm2-2.02.97-3.el6    BUILT: Tue Sep 11 05:06:56 CDT 2012
lvm2-libs-2.02.97-3.el6    BUILT: Tue Sep 11 05:06:56 CDT 2012
lvm2-cluster-2.02.97-3.el6    BUILT: Tue Sep 11 05:06:56 CDT 2012
udev-147-2.41.el6    BUILT: Thu Mar  1 13:01:08 CST 2012
device-mapper-1.02.76-3.el6    BUILT: Tue Sep 11 05:06:56 CDT 2012
device-mapper-libs-1.02.76-3.el6    BUILT: Tue Sep 11 05:06:56 CDT 2012
device-mapper-event-1.02.76-3.el6    BUILT: Tue Sep 11 05:06:56 CDT 2012
device-mapper-event-libs-1.02.76-3.el6    BUILT: Tue Sep 11 05:06:56 CDT 2012
cmirror-2.02.97-3.el6    BUILT: Tue Sep 11 05:06:56 CDT 2012

Comment 1 Zdenek Kabelac 2012-10-12 11:13:22 UTC
Prohibit --thinpool to be used with --mirrors with upstream commit:

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

Comment 3 Corey Marthaler 2013-01-24 23:46:04 UTC
Fix verified that --thinpool and --mirrors are no longer allowed:

[root@qalvm-01 ~]# lvcreate --thinpool POOL_mir -m 1 -L 100M taft
  --thin,--thinpool  and --mirrors are incompatible.
  Run `lvcreate --help' for more information.


However it is still possible to convert an existing mirror to a thin pool. Should that still be allowed? If so should this have been fixed to work with mirrors instead of just turning this options off. Are converted mirrored thin pool volumes supported?

# converted mirror to thin pool

[root@qalvm-01 ~]# lvs -a -o +devices
 LV                               Attr      LSize   Pool            Data%  Log                       Cpy%Sync Devices
 origin                           Vwi-a-tz- 500.00m to_pool_convert   0.00
 to_pool_convert                  twi-a-tz- 100.00m                   0.00                                    to_pool_convert_tdata(0)
 [to_pool_convert_tdata]          mwi-aot-- 100.00m                        to_pool_convert_tdata_mlog  100.00 to_pool_convert_tdata_mimage_0(0),to_pool_convert_tdata_mimage_1(0)
 [to_pool_convert_tdata_mimage_0] iwi-aom-- 100.00m                                                           /dev/vdc1(0)
 [to_pool_convert_tdata_mimage_1] iwi-aom-- 100.00m                                                           /dev/vdg1(0)
 [to_pool_convert_tdata_mlog]     lwi-aom--   4.00m                                                           /dev/vdg1(25)
 [to_pool_convert_tmeta]          mwi-aot-- 100.00m                        to_pool_convert_tmeta_mlog  100.00 to_pool_convert_tmeta_mimage_0(0),to_pool_convert_tmeta_mimage_1(0)
 [to_pool_convert_tmeta_mimage_0] iwi-aom-- 100.00m                                                           /dev/vdc1(25)
 [to_pool_convert_tmeta_mimage_1] iwi-aom-- 100.00m                                                           /dev/vdg1(26)
 [to_pool_convert_tmeta_mlog]     lwi-aom--   4.00m                                                           /dev/vdg1(51)

Comment 4 Zdenek Kabelac 2013-01-25 19:15:29 UTC
Yes - it's desired behavior - you could select some LV to be converted into thin pool data (--thinpool) and metadata (--poolmetadata) devices.

So you may create mirrored LV - and use it for data or metadata - since you cannot create them via one command.

Mirror devices are renamed to make it clear which pool they create.

Comment 5 errata-xmlrpc 2013-02-21 08:13:58 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.