Bug 1149287

Summary: pvmove doesn't work on exclusively activated clustered thin pool volumes
Product: Red Hat Enterprise Linux 7 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: David Teigland <teigland>
lvm2 sub component: Thin Provisioning QA Contact: cluster-qe <cluster-qe>
Status: CLOSED WONTFIX Docs Contact:
Severity: high    
Priority: low CC: agk, heinzm, jbrassow, msnitzer, prajnoha, thornber, zkabelac
Version: 7.0Keywords: Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-09 15:15:54 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:
Bug Depends On:    
Bug Blocks: 1119323    

Description Corey Marthaler 2014-10-03 16:29:30 UTC
Description of problem:
This is just like bugs 1133149 and 1100049 but for thin pools.


[root@taft-01 ~]# vgcreate VG /dev/mapper/mpath[abcdefgh]p*
  Volume group "VG" successfully created

[root@taft-01 ~]# vgs
  VG        #PV #LV #SN Attr   VSize  VFree
  VG          8   0   0 wz--n-  1.95t 1.95t

[root@taft-01 ~]# lvcreate --thinpool POOL  --zero n -L 4G --poolmetadatasize 100M VG
  Logical volume "lvol0" created
  Logical volume "POOL" created
[root@taft-01 ~]# lvs -a -o +devices
  LV              VG  Attr       LSize   Pool Origin Data%  Meta%  Devices
  POOL            VG  twi-a-t---   4.00g             0.00   0.05   POOL_tdata(0)
  [POOL_tdata]    VG  Twi-ao----   4.00g                           /dev/mapper/mpathap1(25)
  [POOL_tmeta]    VG  ewi-ao---- 100.00m                           /dev/mapper/mpathhp1(0)
  [lvol0_pmspare] VG  ewi------- 100.00m                           /dev/mapper/mpathap1(0)

[root@taft-01 ~]# lvcreate --virtualsize 1G -T VG/POOL -n origin
  Logical volume "origin" created

[root@taft-01 ~]# lvcreate -K -s /dev/VG/origin -n snap1
  Logical volume "snap1" created

[root@taft-01 ~]# lvs -a -o +devices
  LV              VG  Attr       LSize   Pool Origin Data%  Meta%  Devices
  POOL            VG  twi-a-t---   4.00g             0.00   0.06   POOL_tdata(0)
  [POOL_tdata]    VG  Twi-ao----   4.00g                           /dev/mapper/mpathap1(25)
  [POOL_tmeta]    VG  ewi-ao---- 100.00m                           /dev/mapper/mpathhp1(0)
  [lvol0_pmspare] VG  ewi------- 100.00m                           /dev/mapper/mpathap1(0)
  origin          VG  Vwi-a-t---   1.00g POOL        0.01
  snap1           VG  Vwi-a-t--k   1.00g POOL origin 0.01

[root@taft-01 ~]# pvmove /dev/mapper/mpathap1
  /dev/mapper/mpathap1: Moved: 0.2%
  /dev/mapper/mpathap1: Moved: 2.4%
  /dev/mapper/mpathap1: Moved: 20.9%
  /dev/mapper/mpathap1: Moved: 36.1%
  /dev/mapper/mpathap1: Moved: 51.4%
  /dev/mapper/mpathap1: Moved: 71.1%
  /dev/mapper/mpathap1: Moved: 89.6%
  /dev/mapper/mpathap1: Moved: 100.0%


# When that same command is done on a clustered VG but activated exclusively pool:
[root@taft-01 ~]# pvmove /dev/mapper/mpathap1
  Skipping thin-pool LV POOL
  Skipping thin-related LV POOL_tdata
  /dev/mapper/mpathap1: Moved: 8.0%
  /dev/mapper/mpathap1: Moved: 100.0%


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

lvm2-2.02.111-2.el6    BUILT: Mon Sep  1 06:46:43 CDT 2014
lvm2-libs-2.02.111-2.el6    BUILT: Mon Sep  1 06:46:43 CDT 2014
lvm2-cluster-2.02.111-2.el6    BUILT: Mon Sep  1 06:46:43 CDT 2014
udev-147-2.57.el6    BUILT: Thu Jul 24 08:48:47 CDT 2014
device-mapper-1.02.90-2.el6    BUILT: Mon Sep  1 06:46:43 CDT 2014
device-mapper-libs-1.02.90-2.el6    BUILT: Mon Sep  1 06:46:43 CDT 2014
device-mapper-event-1.02.90-2.el6    BUILT: Mon Sep  1 06:46:43 CDT 2014
device-mapper-event-libs-1.02.90-2.el6    BUILT: Mon Sep  1 06:46:43 CDT 2014
device-mapper-persistent-data-0.3.2-1.el6    BUILT: Fri Apr  4 08:43:06 CDT 2014
cmirror-2.02.111-2.el6    BUILT: Mon Sep  1 06:46:43 CDT 2014

Comment 2 Zdenek Kabelac 2014-11-25 13:54:21 UTC
The nature of pvmove code currently requires to activate LVs on pvmoved extents, so we needs to take a special care with 'special' volumes.