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 1132211 - thin pool conversion fails when the size gap between the pool and meta device is too great
Summary: thin pool conversion fails when the size gap between the pool and meta device...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.6
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Zdenek Kabelac
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1119323 1168140
TreeView+ depends on / blocked
 
Reported: 2014-08-20 22:04 UTC by Corey Marthaler
Modified: 2015-07-22 07:35 UTC (History)
10 users (show)

Fixed In Version: lvm2-2.02.117-1.el6
Doc Type: Bug Fix
Doc Text:
Missing rounding of chunk size during thin pool creation could have resulted into failing activation of the created thin pool with unsupported chunk size. Tool now properly rounds to 64kB thin pool chunk size.
Clone Of:
: 1168140 (view as bug list)
Environment:
Last Closed: 2015-07-22 07:35:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
-vvvv of the lvconvert (179.43 KB, text/plain)
2014-08-20 22:04 UTC, Corey Marthaler
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1411 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2015-07-20 18:06:52 UTC

Description Corey Marthaler 2014-08-20 22:04:57 UTC
Created attachment 928953 [details]
-vvvv of the lvconvert

Description of problem:
I started seeing this when I lowered the size of the meta device to only 4M but had a pool device of 10G. If the meta device is say 400M, or the pool device is only 1G, i wont see this issue.

[root@host-050 ~]# lvs -a -o +devices
  LV   VG            Attr       LSize   Pool Origin Data% Devices        
  POOL snapper_thinp -wi-a-----  10.00g                   /dev/sdb1(1)   
  meta snapper_thinp -wi-a-----   4.00m                   /dev/sdb1(0)   

[root@host-050 ~]# lvconvert --thinpool snapper_thinp/POOL --poolmetadata meta --yes
  WARNING: Converting logical volume snapper_thinp/POOL and snapper_thinp/meta to pool's data and metadata volumes.
  THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
  Logical volume "lvol0" created
  device-mapper: reload ioctl on  failed: Invalid argument
  Failed to activate pool logical volume snapper_thinp/POOL.


I tried the version before this (.109-1) and the bug exists there as well.

Version-Release number of selected component (if applicable):
2.6.32-495.el6.x86_64
lvm2-2.02.109-2.el6    BUILT: Tue Aug 19 09:32:25 CDT 2014
lvm2-libs-2.02.109-2.el6    BUILT: Tue Aug 19 09:32:25 CDT 2014
lvm2-cluster-2.02.109-2.el6    BUILT: Tue Aug 19 09:32:25 CDT 2014
udev-147-2.57.el6    BUILT: Thu Jul 24 08:48:47 CDT 2014
device-mapper-1.02.88-2.el6    BUILT: Tue Aug 19 09:32:25 CDT 2014
device-mapper-libs-1.02.88-2.el6    BUILT: Tue Aug 19 09:32:25 CDT 2014
device-mapper-event-1.02.88-2.el6    BUILT: Tue Aug 19 09:32:25 CDT 2014
device-mapper-event-libs-1.02.88-2.el6    BUILT: Tue Aug 19 09:32:25 CDT 2014
device-mapper-persistent-data-0.3.2-1.el6    BUILT: Fri Apr  4 08:43:06 CDT 2014
cmirror-2.02.109-2.el6    BUILT: Tue Aug 19 09:32:25 CDT 2014

Comment 2 Zdenek Kabelac 2014-11-26 09:12:53 UTC
The code was missing rounding to 64kb when chunk size was estimated.
Code in 2.02.113 catches the problem before metadata are written.

With this upstream patch:
https://www.redhat.com/archives/lvm-devel/2014-November/msg00199.html

missed rounding is fixed:

# lvcreate -L10G --poolmetadatasize 4M  -T vg/pool1
  Logical volume "pool1" created.

# lvs -o+chunk_size
  LV    VG   Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Chunk  
  pool1 vg   twi-a-tz-- 10,00g             0,00   1,17                             192,00k

Comment 4 Nenad Peric 2015-04-23 09:52:37 UTC
[root@tardis-02 ~]# lvcreate -L 4M -n meta vg
  Logical volume "meta" created.
[root@tardis-02 ~]# lvcreate -L 10G -n pool vg
  Logical volume "pool" created.
[root@tardis-02 ~]# lvconvert --thinpool vg/pool --poolmetadata meta --yes
  WARNING: Converting logical volume vg/pool and vg/meta to pool's data and metadata volumes.
  THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
  Converted vg/pool to thin pool.
[root@tardis-02 ~]# lvs -a
  LV              VG          Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  [lvol0_pmspare] vg          ewi-------   4.00m                                                    
  pool            vg          twi-a-tz--  10.00g             0.00   1.17                            
  [pool_tdata]    vg          Twi-ao----  10.00g                                                    
  [pool_tmeta]    vg          ewi-ao----   4.00m                                                    
  lv_home         vg_tardis02 -wi-ao---- 224.88g                                                    
  lv_root         vg_tardis02 -wi-ao----  50.00g                                                    
  lv_swap         vg_tardis02 -wi-ao----   4.00g    


The test/issue mentioned in the opening comment passes with lvm2-2.02.118-2.el6.x86_64

marking as VERIFIED

Comment 5 errata-xmlrpc 2015-07-22 07:35:10 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/RHBA-2015-1411.html


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