Bug 973419 - thin pool mda device swapping doesn't work
thin pool mda device swapping doesn't work
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2 (Show other bugs)
7.0
x86_64 Linux
high Severity high
: rc
: ---
Assigned To: Zdenek Kabelac
Cluster QE
: Reopened
Depends On:
Blocks: 1006062
  Show dependency treegraph
 
Reported: 2013-06-11 18:00 EDT by Corey Marthaler
Modified: 2014-06-17 21:18 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1006062 (view as bug list)
Environment:
Last Closed: 2014-06-13 08:31:00 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Corey Marthaler 2013-06-11 18:00:10 EDT
Description of problem:
# From man page
--poolmetadata ThinPoolMetadataLogicalVolume{Name|Path}
   Specifies thin pool metadata logical volume.  The size should be in between 2MiB and 16GiB.  Thin pool is specified with the option  --thinpool.   When
  the  specified  thin  pool  already  exists, the thin pool's metadata volume will be swapped with the given LV.  Properties of the thin pool like chunk

[root@qalvm-01 ~]# lvcreate -n newMDA -L 8M snapper_thinp
  Logical volume "newMDA" created
[root@qalvm-01 ~]# lvs -a -o +devices
  LV           VG            Attr      LSize  Pool Origin Devices
  POOL         snapper_thinp twi---tz-  5.00g             POOL_tdata(0)
  [POOL_tdata] snapper_thinp Twi---t--  5.00g             /dev/vdh1(0)
  [POOL_tdata] snapper_thinp Twi---t--  5.00g             /dev/vdg1(0)
  [POOL_tdata] snapper_thinp Twi---t--  5.00g             /dev/vdf1(0)
  [POOL_tmeta] snapper_thinp ewi---t--  8.00m             /dev/vdd1(0)
  newMDA       snapper_thinp -wi-a----  8.00m             /dev/vdf1(258)
  origin       snapper_thinp Vwi---tz-  1.00g POOL
  other1       snapper_thinp Vwi---tz-  1.00g POOL
  other2       snapper_thinp Vwi---tz-  1.00g POOL
  other3       snapper_thinp Vwi---tz-  1.00g POOL
  other4       snapper_thinp Vwi---tz-  1.00g POOL
  other5       snapper_thinp Vwi---tz-  1.00g POOL
  snap1        snapper_thinp Vwi---tz-  1.00g POOL origin

[root@qalvm-01 ~]# lvconvert --poolmetadata snapper_thinp/newMDA --thinpool snapper_thinp/POOL
Do you want to swap metadata of snapper_thinp/POOL pool with volume snapper_thinp/newMDA? [y/n]: y
  Check of thin pool snapper_thinp/POOL failed (status:1). Manual repair required (thin_dump --repair /dev/mapper/snapper_thinp-POOL_tmeta)!
  Failed to activate pool logical volume snapper_thinp/POOL.

[root@qalvm-01 ~]# lvremove snapper_thinp
Removing pool "POOL" will remove 7 dependent volume(s). Proceed? [y/n]: y
  Check of thin pool snapper_thinp/POOL failed (status:1). Manual repair required (thin_dump --repair /dev/mapper/snapper_thinp-POOL_tmeta)!
  Failed to update thin pool POOL.
  Failed to update thin pool POOL.
  Failed to update thin pool POOL.
  Failed to update thin pool POOL.
  Failed to update thin pool POOL.
  Failed to update thin pool POOL.
  Failed to update thin pool POOL.
  Logical volume "newMDA" successfully removed


Version-Release number of selected component (if applicable):
3.8.0-0.40.el7.x86_64

lvm2-2.02.99-0.46.el7    BUILT: Tue Jun  4 19:27:58 CDT 2013
lvm2-libs-2.02.99-0.46.el7    BUILT: Tue Jun  4 19:27:58 CDT 2013
lvm2-cluster-2.02.99-0.46.el7    BUILT: Tue Jun  4 19:27:58 CDT 2013
device-mapper-1.02.78-0.46.el7    BUILT: Tue Jun  4 19:27:58 CDT 2013
device-mapper-libs-1.02.78-0.46.el7    BUILT: Tue Jun  4 19:27:58 CDT 2013
device-mapper-event-1.02.78-0.46.el7    BUILT: Tue Jun  4 19:27:58 CDT 2013
device-mapper-event-libs-1.02.78-0.46.el7    BUILT: Tue Jun  4 19:27:58 CDT 2013
cmirror-2.02.99-0.46.el7    BUILT: Tue Jun  4 19:27:58 CDT 2013


How reproducible:
Everytime
Comment 1 RHEL Product and Program Management 2013-09-03 04:45:53 EDT
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.
Comment 3 Corey Marthaler 2014-01-16 16:11:04 EST
Looks like this works in the latest rpms and can be added to the 7.0 errata.

3.10.0-54.0.1.el7.x86_64
lvm2-2.02.103-11.el7    BUILT: Wed Jan 15 06:44:23 CST 2014
lvm2-libs-2.02.103-11.el7    BUILT: Wed Jan 15 06:44:23 CST 2014
lvm2-cluster-2.02.103-11.el7    BUILT: Wed Jan 15 06:44:23 CST 2014
device-mapper-1.02.82-11.el7    BUILT: Wed Jan 15 06:44:23 CST 2014
device-mapper-libs-1.02.82-11.el7    BUILT: Wed Jan 15 06:44:23 CST 2014
device-mapper-event-1.02.82-11.el7    BUILT: Wed Jan 15 06:44:23 CST 2014
device-mapper-event-libs-1.02.82-11.el7    BUILT: Wed Jan 15 06:44:23 CST 2014
device-mapper-persistent-data-0.2.8-2.el7    BUILT: Wed Oct 30 10:20:48 CDT 2013
cmirror-2.02.103-11.el7    BUILT: Wed Jan 15 06:44:23 CST 2014


[root@harding-02 ~]# lvs -a -o +devices
  LV              VG              Attr       LSize  Pool Origin Devices
  POOL            snapper_thinp   twi---tz--  1.00g             POOL_tdata(0)
  [POOL_tdata]    snapper_thinp   Twi-------  1.00g             /dev/sdc3(1)
  [POOL_tmeta]    snapper_thinp   ewi-------  4.00m             /dev/sdb2(0)
  [lvol0_pmspare] snapper_thinp   ewi-------  4.00m             /dev/sdc3(0)
  newtmeta        snapper_thinp   -wi-------  8.00m             /dev/sdc3(257)
  origin          snapper_thinp   Vwi---tz--  1.00g POOL
  other1          snapper_thinp   Vwi---tz--  1.00g POOL
  other2          snapper_thinp   Vwi---tz--  1.00g POOL
  other3          snapper_thinp   Vwi---tz--  1.00g POOL
  other4          snapper_thinp   Vwi---tz--  1.00g POOL
  other5          snapper_thinp   Vwi---tz--  1.00g POOL
  snap            snapper_thinp   Vwi---tz-k  1.00g POOL origin
[root@harding-02 ~]# lvconvert --poolmetadata snapper_thinp/newtmeta --thinpool snapper_thinp/POOL
Do you want to swap metadata of snapper_thinp/POOL pool with volume snapper_thinp/newtmeta? [y/n]: y
  Converted snapper_thinp/POOL to thin pool.
[root@harding-02 ~]# lvs -a -o +devices
  LV              VG              Attr       LSize  Pool Origin Devices
  POOL            snapper_thinp   twi---tz--  1.00g             POOL_tdata(0)
  [POOL_tdata]    snapper_thinp   Twi-------  1.00g             /dev/sdc3(1)
  [POOL_tmeta]    snapper_thinp   ewi-------  8.00m             /dev/sdc3(257)
  [lvol0_pmspare] snapper_thinp   ewi-------  4.00m             /dev/sdc3(0)
  newtmeta        snapper_thinp   -wi-------  4.00m             /dev/sdb2(0)
  origin          snapper_thinp   Vwi---tz--  1.00g POOL
  other1          snapper_thinp   Vwi---tz--  1.00g POOL
  other2          snapper_thinp   Vwi---tz--  1.00g POOL
  other3          snapper_thinp   Vwi---tz--  1.00g POOL
  other4          snapper_thinp   Vwi---tz--  1.00g POOL
  other5          snapper_thinp   Vwi---tz--  1.00g POOL
  snap            snapper_thinp   Vwi---tz-k  1.00g POOL origin
Comment 5 Ludek Smid 2014-06-13 08:31:00 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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