Bug 2179430 - allow snapshot of raid+integrity LV
Summary: allow snapshot of raid+integrity LV
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: lvm2
Version: 9.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: David Teigland
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-17 18:18 UTC by David Teigland
Modified: 2023-08-10 15:41 UTC (History)
8 users (show)

Fixed In Version: lvm2-2.03.21-2.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CLUSTERQE-6676 0 None None None 2023-05-11 17:18:18 UTC
Red Hat Issue Tracker RHELPLAN-152233 0 None None None 2023-03-17 18:19:00 UTC

Description David Teigland 2023-03-17 18:18:39 UTC
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:

Comment 1 David Teigland 2023-05-11 16:35:05 UTC
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

Comment 4 Corey Marthaler 2023-05-26 18:58:22 UTC
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.

Comment 7 Marian Csontos 2023-06-08 14:49:44 UTC
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?

Comment 8 Marian Csontos 2023-06-08 17:54:07 UTC
I checked the code and this only happens when creating snapshot of cached raid+integrity volume, and is expected behavior

Comment 9 Corey Marthaler 2023-06-21 19:56:29 UTC
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


Note You need to log in before you can comment on or make changes to this bug.