Bug 1757899

Summary: lvextend alternate syntax percentage sizes do not work for stacked thin pool volumes: "VolumeType does not match"
Product: Red Hat Enterprise Linux 8 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Zdenek Kabelac <zkabelac>
lvm2 sub component: Thin Provisioning QA Contact: cluster-qe <cluster-qe>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: medium CC: agk, cluster-qe, heinzm, jbrassow, mcsontos, msnitzer, prajnoha, thornber, zkabelac
Version: 8.1Flags: pm-rhel: mirror+
Target Milestone: rc   
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.03.07-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1722666 Environment:
Last Closed: 2020-04-28 16:58:59 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: 1722666    
Bug Blocks:    

Comment 4 Corey Marthaler 2019-12-03 20:26:50 UTC
Fixed verified for raid1 stacked thinpools only. Mirror stacked thinpools are no longer supported in current lvm rpms.


kernel-4.18.0-151.el8    BUILT: Fri Nov 15 13:14:53 CST 2019
lvm2-2.03.07-1.el8    BUILT: Mon Dec  2 00:09:32 CST 2019
lvm2-libs-2.03.07-1.el8    BUILT: Mon Dec  2 00:09:32 CST 2019
lvm2-dbusd-2.03.07-1.el8    BUILT: Mon Dec  2 00:12:23 CST 2019
lvm2-lockd-2.03.07-1.el8    BUILT: Mon Dec  2 00:09:32 CST 2019
device-mapper-1.02.167-1.el8    BUILT: Mon Dec  2 00:09:32 CST 2019
device-mapper-libs-1.02.167-1.el8    BUILT: Mon Dec  2 00:09:32 CST 2019
device-mapper-event-1.02.167-1.el8    BUILT: Mon Dec  2 00:09:32 CST 2019
device-mapper-event-libs-1.02.167-1.el8    BUILT: Mon Dec  2 00:09:32 CST 2019
device-mapper-persistent-data-0.8.5-2.el8    BUILT: Wed Jun  5 10:28:04 CDT 2019



# Raid1 stacked thin pool can once again extended
[root@hayes-02 ~]# lvcreate   --zero n -L 4M -n meta snapper_thinp
  WARNING: Logical volume snapper_thinp/meta not zeroed.
  Logical volume "meta" created.
[root@hayes-02 ~]# lvcreate  --type raid1 -m 1  --zero n -L 100M -n 100_percent snapper_thinp
  WARNING: Logical volume snapper_thinp/100_percent not zeroed.
  Logical volume "100_percent" created.
[root@hayes-02 ~]# lvconvert --zero n --thinpool snapper_thinp/100_percent --poolmetadata meta --yes
  Thin pool volume with chunk size 64.00 KiB can address at most 15.81 TiB of data.
  WARNING: Converting snapper_thinp/100_percent and snapper_thinp/meta to thin pool's data and metadata volumes with metadata wiping.
  THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
  Converted snapper_thinp/100_percent and snapper_thinp/meta to thin pool.
[root@hayes-02 ~]# lvs -a -o +devices
  LV                           VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices
  100_percent                  snapper_thinp twi-a-t--- 100.00m             0.00   10.84                            100_percent_tdata(0)
  [100_percent_tdata]          snapper_thinp rwi-aor--- 100.00m                                    100.00           100_percent_tdata_rimage_0(0),100_percent_tdata_rimage_1(0)
  [100_percent_tdata_rimage_0] snapper_thinp iwi-aor--- 100.00m                                                     /dev/sdb1(2)
  [100_percent_tdata_rimage_1] snapper_thinp iwi-aor--- 100.00m                                                     /dev/sdc1(1)
  [100_percent_tdata_rmeta_0]  snapper_thinp ewi-aor---   4.00m                                                     /dev/sdb1(1)
  [100_percent_tdata_rmeta_1]  snapper_thinp ewi-aor---   4.00m                                                     /dev/sdc1(0)
  [100_percent_tmeta]          snapper_thinp ewi-ao----   4.00m                                                     /dev/sdb1(0)
  [lvol0_pmspare]              snapper_thinp ewi-------   4.00m                                                     /dev/sdb1(27)
[root@hayes-02 ~]# lvcreate  --virtualsize 1G -T snapper_thinp/100_percent -n origin
  WARNING: Sum of all thin volume sizes (1.00 GiB) exceeds the size of thin pool snapper_thinp/100_percent (100.00 MiB).
  WARNING: You have not turned on protection against thin pools running out of space.
  WARNING: Set activation/thin_pool_autoextend_threshold below 100 to trigger automatic extension of thin pools before they get full.
  Logical volume "origin" created.
[root@hayes-02 ~]# lvs -a -o +devices
  LV                           VG            Attr       LSize   Pool        Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices
  100_percent                  snapper_thinp twi-aot--- 100.00m                    0.00   10.94                            100_percent_tdata(0)
  [100_percent_tdata]          snapper_thinp rwi-aor--- 100.00m                                           100.00           100_percent_tdata_rimage_0(0),100_percent_tdata_rimage_1(0)
  [100_percent_tdata_rimage_0] snapper_thinp iwi-aor--- 100.00m                                                            /dev/sdb1(2)
  [100_percent_tdata_rimage_1] snapper_thinp iwi-aor--- 100.00m                                                            /dev/sdc1(1)
  [100_percent_tdata_rmeta_0]  snapper_thinp ewi-aor---   4.00m                                                            /dev/sdb1(1)
  [100_percent_tdata_rmeta_1]  snapper_thinp ewi-aor---   4.00m                                                            /dev/sdc1(0)
  [100_percent_tmeta]          snapper_thinp ewi-ao----   4.00m                                                            /dev/sdb1(0)
  [lvol0_pmspare]              snapper_thinp ewi-------   4.00m                                                            /dev/sdb1(27)
  origin                       snapper_thinp Vwi-a-t---   1.00g 100_percent        0.00                                                                                               
[root@hayes-02 ~]# lvextend -l100%FREE snapper_thinp/100_percent
  Extending 2 mirror images.
  Rounding size to boundary between physical extents: <9.10 GiB.
  WARNING: Sum of all thin volume sizes (1.00 GiB) exceeds the size of thin pools (100.00 MiB).
  WARNING: You have not turned on protection against thin pools running out of space.
  WARNING: Set activation/thin_pool_autoextend_threshold below 100 to trigger automatic extension of thin pools before they get full.
  Size of logical volume snapper_thinp/100_percent_tmeta changed from 4.00 MiB (1 extents) to <9.10 GiB (2329 extents).
  Size of logical volume snapper_thinp/100_percent_tdata changed from 100.00 MiB (25 extents) to <9.08 TiB (2379336 extents).
  Logical volume snapper_thinp/100_percent_tdata successfully resized.


## Mirror stacking no longer supported
[root@hayes-02 ~]# lvcreate   --zero n -L 4M -n meta snapper_thinp
  WARNING: Logical volume snapper_thinp/meta not zeroed.
  Logical volume "meta" created.
[root@hayes-02 ~]# lvcreate  --type mirror -m 1  --zero n -L 100M -n 100_percent snapper_thinp
  WARNING: Logical volume snapper_thinp/100_percent not zeroed.
  Logical volume "100_percent" created.
[root@hayes-02 ~]# lvs -a -o +devices
  LV                     VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log                Cpy%Sync Convert Devices
  100_percent            snapper_thinp mwi-a-m--- 100.00m                                [100_percent_mlog] 100.00           100_percent_mimage_0(0),100_percent_mimage_1(0)
  [100_percent_mimage_0] snapper_thinp iwi-aom--- 100.00m                                                                    /dev/sdb1(1)
  [100_percent_mimage_1] snapper_thinp iwi-aom--- 100.00m                                                                    /dev/sdc1(0)
  [100_percent_mlog]     snapper_thinp lwi-aom---   4.00m                                                                    /dev/sdk1(0)
  meta                   snapper_thinp -wi-a-----   4.00m                                                                    /dev/sdb1(0)
[root@hayes-02 ~]# lvconvert --zero n --thinpool snapper_thinp/100_percent --poolmetadata meta --yes
  LV snapper_thinp/100_percent with type mirror cannot be used as a thin pool LV.

Comment 6 errata-xmlrpc 2020-04-28 16:58:59 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://access.redhat.com/errata/RHEA-2020:1881