Description of problem: lvm does not allow snapshots of raid+integrity LVs. Like bug 2159820 (cache|writecache over raid+integrity), this limitation was originally meant to introduce the integrity feature incrementally. The changes needed to do this are removing checks in the code that block it, and allowing standard raid+integrity manipulations when the raid+integrity LV is not the top level LV. Steps are: 1. lvcreate --type raidN --raidintegrity y -L size -n main vg 2. lvcreate --snapshot -L size -n snap vg/main Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
pushed to main: https://sourceware.org/git/?p=lvm2.git;a=commit;h=fd6e113bba5fed5ee41152cde33220294c24ce2b $ lvs -a test | grep ii ii test rwi-a-r--- 128.00m 100.00 [ii_rimage_0] test gwi-aor--- 128.00m [ii_rimage_0_iorig] 100.00 [ii_rimage_0_imeta] test ewi-ao---- 8.00m [ii_rimage_0_iorig] test -wi-ao---- 128.00m [ii_rimage_1] test gwi-aor--- 128.00m [ii_rimage_1_iorig] 100.00 [ii_rimage_1_imeta] test ewi-ao---- 8.00m [ii_rimage_1_iorig] test -wi-ao---- 128.00m [ii_rmeta_0] test ewi-aor--- 4.00m [ii_rmeta_1] test ewi-aor--- 4.00m $ lvcreate -s -L32M -n iisnap test/ii Logical volume "iisnap" created. $ lvs -a test | grep ii ii test owi-a-r--- 128.00m 100.00 [ii_rimage_0] test gwi-aor--- 128.00m [ii_rimage_0_iorig] 100.00 [ii_rimage_0_imeta] test ewi-ao---- 8.00m [ii_rimage_0_iorig] test -wi-ao---- 128.00m [ii_rimage_1] test gwi-aor--- 128.00m [ii_rimage_1_iorig] 100.00 [ii_rimage_1_imeta] test ewi-ao---- 8.00m [ii_rimage_1_iorig] test -wi-ao---- 128.00m [ii_rmeta_0] test ewi-aor--- 4.00m [ii_rmeta_1] test ewi-aor--- 4.00m iisnap test swi-a-s--- 32.00m ii 0.00
This feature is not in the latest build like mentioned in the Fixed in Version. kernel-5.14.0-284.11.1.el9_2 BUILT: Wed Apr 12 04:16:55 PM CEST 2023 lvm2-2.03.21-2.el9 BUILT: Thu May 25 12:03:04 AM CEST 2023 lvm2-libs-2.03.21-2.el9 BUILT: Thu May 25 12:03:04 AM CEST 2023 lvcreate --yes -s /dev/cache_sanity/corigin -c 64 -n fs_snap1 -L 4296704 Reducing COW size <4.10 TiB down to maximum usable size 4.00 GiB. Snapshots of raid with integrity are not supported.
Hi Corey, I verified this works, tried multiple snapshots, with or without -c, I just cannot reproduce this. corigin? What is the origin LV? Can you post more details, please?
I checked the code and this only happens when creating snapshot of cached raid+integrity volume, and is expected behavior
Marking Verified:Tested based on initial regression tests of snapshots of raid1 and raid10 + integrity origin volumes. *NOTE* no cache or writecache + raid integrity was tested with snapshots, due to that stack not yet being turned on. kernel-5.14.0-322.el9 BUILT: Fri Jun 2 10:00:53 AM CEST 2023 lvm2-2.03.21-2.el9 BUILT: Thu May 25 12:03:04 AM CEST 2023 lvm2-libs-2.03.21-2.el9 BUILT: Thu May 25 12:03:04 AM CEST 2023