-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
rhel-9.3.0
-
None
-
None
-
Moderate
-
rhel-sst-logical-storage
-
ssg_filesystems_storage_and_HA
-
None
-
False
-
-
None
-
None
-
None
-
None
-
-
x86_64
-
None
What were you trying to do that didn't work?
This is a regression test that we run to swap in a repaired _tmeta device for corrupted thin pools. It started failing with the latest d-m-p-d.
# OLD: device-mapper-persistent-data-0.9.0-13.el9 BUILT: Wed Jun 22 06:27:41 PM CEST 2022
[root@virt-506 ~]# lvcreate -yes -thinpool POOL -L 1G --zero y --poolmetadataspare n snapper_thinp
Thin pool volume with chunk size 64.00 KiB can address at most <15.88 TiB of data.
WARNING: recovery of pools without pool metadata spare LV is not automated.
Logical volume "POOL" created.
[root@virt-506 ~]# lvcreate -yes -virtualsize 250M -T snapper_thinp/POOL -n other1
Rounding up size to full physical extent 252.00 MiB
Logical volume "other1" created.
[root@virt-506 ~]# lvcreate --yes -V 250M -T snapper_thinp/POOL -n other2
Rounding up size to full physical extent 252.00 MiB
Logical volume "other2" created.
[root@virt-506 ~]# lvs -a -o +devices
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices
root rhel_virt-506 wi-ao--- <6.20g /dev/vda2(205)
swap rhel_virt-506 wi-ao--- 820.00m /dev/vda2(0)
POOL snapper_thinp twi-aotz-- 1.00g 0.00 11.13 POOL_tdata(0)
[POOL_tdata] snapper_thinp Twi-ao---- 1.00g /dev/sda1(0)
[POOL_tmeta] snapper_thinp ewi-ao---- 4.00m /dev/sdh1(0)
other1 snapper_thinp Vwi-a-tz-- 252.00m POOL 0.00
other2 snapper_thinp Vwi-a-tz-- 252.00m POOL 0.00
[root@virt-506 ~]# dd if=/dev/urandom of=/dev/mapper/snapper_thinp-POOL_tmeta count=512 seek=4096 bs=1
512+0 records in
512+0 records out
512 bytes copied, 0.00141767 s, 361 kB/s
[root@virt-506 ~]# lvchange -an --yes --select 'lv_name=POOL || pool_lv=POOL'
[root@virt-506 ~]# lvcreate --yes -L 4M -n meta_swap.269 snapper_thinp
Logical volume "meta_swap.269" created.
[root@virt-506 ~]# lvconvert --yes --thinpool snapper_thinp/POOL --poolmetadata snapper_thinp/meta_swap.269
[root@virt-506 ~]# lvchange -ay snapper_thinp/meta_swap.269
[root@virt-506 ~]# thin_check /dev/mapper/snapper_thinp-meta_swap.269
examining superblock
TRANSACTION_ID=2
METADATA_FREE_BLOCKS=1023
examining devices tree
examining mapping tree
thin device 1 is missing mappings [0, -]
bad checksum in btree node (block 1)
[root@virt-506 ~]# lvchange -an snapper_thinp/meta_swap.269
[root@virt-506 ~]# lvconvert --yes --thinpool snapper_thinp/POOL --poolmetadata snapper_thinp/meta_swap.269
[root@virt-506 ~]# lvremove -f snapper_thinp/meta_swap.269
Logical volume "meta_swap.269" successfully removed.
[root@virt-506 ~]# lvchange -ay --yes --select 'lv_name=POOL || pool_lv=POOL'
Check of pool snapper_thinp/POOL failed (status:1). Manual repair required!
[root@virt-506 ~]# lvconvert --yes --repair snapper_thinp/POOL /dev/sdb1
WARNING: LV snapper_thinp/POOL_meta0 holds a backup of the unrepaired metadata. Use lvremove when no longer required.
WARNING: New metadata LV snapper_thinp/POOL_tmeta might use different PVs. Move it with pvmove if required.
[root@virt-506 ~]# lvs -a -o +devices
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices
root rhel_virt-506 wi-ao--- <6.20g /dev/vda2(205)
swap rhel_virt-506 wi-ao--- 820.00m /dev/vda2(0)
POOL snapper_thinp twi--tz- 1.00g POOL_tdata(0)
POOL_meta0 snapper_thinp wi------ 4.00m /dev/sdh1(0)
[POOL_tdata] snapper_thinp Twi------- 1.00g /dev/sda1(0)
[POOL_tmeta] snapper_thinp ewi------- 4.00m /dev/sdb1(0)
[lvol1_pmspare] snapper_thinp ewi------- 4.00m /dev/sdb1(1)
other1 snapper_thinp Vwi--tz- 252.00m POOL
other2 snapper_thinp Vwi--tz- 252.00m POOL
- NEW: device-mapper-persistent-data-1.0.6-1.el9 BUILT: Fri Aug 11 10:13:30 AM EDT 2023
[root@megatest-11 ~]# lvcreate -yes -thinpool POOL -L 1G --zero y --poolmetadataspare n snapper_thinp
Thin pool volume with chunk size 64.00 KiB can address at most <15.88 TiB of data.
WARNING: recovery of pools without pool metadata spare LV is not automated.
Logical volume "POOL" created.
[root@megatest-11 ~]# lvcreate -yes -virtualsize 250M -T snapper_thinp/POOL -n other1
Rounding up size to full physical extent 252.00 MiB
Logical volume "other1" created.
[root@megatest-11 ~]# lvcreate --yes -V 250M -T snapper_thinp/POOL -n other2
Rounding up size to full physical extent 252.00 MiB
Logical volume "other2" created.
[root@megatest-11 ~]# lvs -a -o +devices
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices
root rhel_megatest-11 wi-ao--- <6.20g /dev/vda2(205)
swap rhel_megatest-11 wi-ao--- 820.00m /dev/vda2(0)
POOL snapper_thinp twi-aotz-- 1.00g 0.00 11.13 POOL_tdata(0)
[POOL_tdata] snapper_thinp Twi-ao---- 1.00g /dev/sdd1(0)
[POOL_tmeta] snapper_thinp ewi-ao---- 4.00m /dev/sda1(0)
other1 snapper_thinp Vwi-a-tz-- 252.00m POOL 0.00
other2 snapper_thinp Vwi-a-tz-- 252.00m POOL 0.00
[root@megatest-11 ~]# dd if=/dev/urandom of=/dev/mapper/snapper_thinp-POOL_tmeta count=512 seek=4096 bs=1
512+0 records in
512+0 records out
512 bytes copied, 0.00284311 s, 180 kB/s
[root@megatest-11 ~]# lvchange -an --yes --select 'lv_name=POOL || pool_lv=POOL'
[root@megatest-11 ~]# lvcreate --yes -L 4M -n meta_swap.269 snapper_thinp
Logical volume "meta_swap.269" created.
[root@megatest-11 ~]# lvconvert --yes --thinpool snapper_thinp/POOL --poolmetadata snapper_thinp/meta_swap.269
[root@megatest-11 ~]# lvchange -ay snapper_thinp/meta_swap.269
[root@megatest-11 ~]# thin_check /dev/mapper/snapper_thinp-meta_swap.269
TRANSACTION_ID=2
METADATA_FREE_BLOCKS=1012
Thin device 1 is missing root with 0 mappings
Check of mappings failed
[root@megatest-11 ~]# echo $?
64
[root@megatest-11 ~]# lvchange -an snapper_thinp/meta_swap.269
[root@megatest-11 ~]# lvconvert --yes --thinpool snapper_thinp/POOL --poolmetadata snapper_thinp/meta_swap.269
[root@megatest-11 ~]# lvremove -f snapper_thinp/meta_swap.269
Logical volume "meta_swap.269" successfully removed.
[root@megatest-11 ~]# lvchange -ay --yes --select 'lv_name=POOL || pool_lv=POOL'
Check of pool snapper_thinp/POOL failed (status:64). Manual repair required!
[root@megatest-11 ~]# lvconvert --yes --repair snapper_thinp/POOL /dev/sdb1
no compatible roots found
Repair of thin metadata volume of thin pool snapper_thinp/POOL failed (status:64). Manual repair required!
[root@megatest-11 ~]# echo $?
5