Bug 1722666
Summary: | lvextend alternate syntax percentage sizes do not work for stacked thin pool volumes: "VolumeType does not match" | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Corey Marthaler <cmarthal> | |
Component: | lvm2 | Assignee: | 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, brian, heinzm, jbrassow, lmiksik, mcsontos, msnitzer, prajnoha, rhandlin, thornber, zkabelac | |
Version: | 7.7 | |||
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | lvm2-2.02.186-4.el7.src.rpm | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1757899 (view as bug list) | Environment: | ||
Last Closed: | 2020-03-31 20:04:51 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: | 1757899 |
Description
Corey Marthaler
2019-06-20 22:52:24 UTC
The problem here was that extension of thin-pool data LV now also wants to resize 'metadata' LV if the growth of data is too big for existing metadata size. This executed code to change size of 2 volumes at the same time, however second extension expected (wrongly) same segtype is the 1st. LV had and also as a secondary bug tried to use 'percentage' extension for this 'in extent' computed resize. Both bugs are now fixed with git commit b9926fb1be3684926ac871b9397839df4c337237. https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b9926fb1be3684926ac871b9397839df4c337237 It might be worth to note here - since there are 2 independent extension going on here - it may happen with '%' specifier for some very specific corner cases that lvm2 will not be able to fulfill request as of current internal design limitation - all the space 'can be taken' by 1st. resize and there might not be enough space for secondary metadata resize - in that case user needs to specify smaller value... *** Bug 1771820 has been marked as a duplicate of this bug. *** Fix verified in the latest rpms. lvm2-2.02.186-4.el7 BUILT: Wed Nov 27 04:05:17 CST 2019 lvm2-libs-2.02.186-4.el7 BUILT: Wed Nov 27 04:05:17 CST 2019 lvm2-cluster-2.02.186-4.el7 BUILT: Wed Nov 27 04:05:17 CST 2019 lvm2-lockd-2.02.186-4.el7 BUILT: Wed Nov 27 04:05:17 CST 2019 lvm2-python-boom-0.9-22.el7 BUILT: Wed Nov 27 04:13:44 CST 2019 cmirror-2.02.186-4.el7 BUILT: Wed Nov 27 04:05:17 CST 2019 device-mapper-1.02.164-4.el7 BUILT: Wed Nov 27 04:05:17 CST 2019 device-mapper-libs-1.02.164-4.el7 BUILT: Wed Nov 27 04:05:17 CST 2019 device-mapper-event-1.02.164-4.el7 BUILT: Wed Nov 27 04:05:17 CST 2019 device-mapper-event-libs-1.02.164-4.el7 BUILT: Wed Nov 27 04:05:17 CST 2019 device-mapper-persistent-data-0.8.5-1.el7 BUILT: Mon Jun 10 03:58:20 CDT 2019 1. Mirror is no longer supported as a thin pool stack: # mirror can no longer be used as a thin pool [root@hayes-01 ~]# lvcreate --zero n -L 4M -n meta snapper_thinp WARNING: Logical volume snapper_thinp/meta not zeroed. Logical volume "meta" created. [root@hayes-01 ~]# 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-01 ~]# 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-01 ~]# 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. 2. Raid before fix: [root@hayes-01 ~]# lvcreate --zero n -L 4M -n meta snapper_thinp WARNING: Logical volume snapper_thinp/meta not zeroed. Logical volume "meta" created. [root@hayes-01 ~]# 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-01 ~]# 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-01 ~]# 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-01 ~]# 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-01 ~]# lvextend -l100%FREE snapper_thinp/100_percent Extending 2 mirror images. Rounding size to boundary between physical extents: 8.00 MiB. VolumeType does not match (raid1). 3. Raid after the fix: [root@hayes-01 ~]# lvcreate --zero n -L 4M -n meta snapper_thinp WARNING: Logical volume snapper_thinp/meta not zeroed. Logical volume "meta" created. [root@hayes-01 ~]# 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-01 ~]# 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-01 ~]# 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-01 ~]# 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-01 ~]# lvextend -l100%FREE snapper_thinp/100_percent Extending 2 mirror images. Rounding size to boundary between physical extents: 8.00 MiB. 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 8.00 MiB (2 extents). Size of logical volume snapper_thinp/100_percent_tdata changed from 100.00 MiB (25 extents) to <3.99 GiB (1021 extents). Logical volume snapper_thinp/100_percent_tdata successfully resized. 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/RHBA-2020:1129 |