Bug 1525711
| Summary: | [RFE] implement consistent --stripe warnings when attempting takeover + reshape in one cmd | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Corey Marthaler <cmarthal> | |
| Component: | lvm2 | Assignee: | Heinz Mauelshagen <heinzm> | |
| lvm2 sub component: | Mirroring and RAID | QA Contact: | cluster-qe <cluster-qe> | |
| Status: | CLOSED WONTFIX | Docs Contact: | ||
| Severity: | low | |||
| Priority: | unspecified | CC: | agk, heinzm, jbrassow, mcsontos, msnitzer, prajnoha, rhandlin, zkabelac | |
| Version: | 7.5 | Keywords: | FutureFeature | |
| Target Milestone: | rc | |||
| Target Release: | 7.8 | |||
| Hardware: | x86_64 | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | lvm2-2.02.184-1.el7 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1834428 (view as bug list) | Environment: | ||
| Last Closed: | 2020-05-11 17:26:27 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: | 1834428 | |||
|
Description
Corey Marthaler
2017-12-13 21:59:52 UTC
Addressed in the context of https://bugzilla.redhat.com/show_bug.cgi?id=1439925 and https://bugzilla.redhat.com/show_bug.cgi?id=1447809 lvm2 upstream commit e83c4f07ca4a84808178d5d22cba655e5e370cd8 I acked this for 7.7. Let me know if you need an exception for 7.6. What is the "fix" here to be verified? The original behavior appears mostly unchanged, with three different behaviors remaining depending on the takeover + stripe cmd ling given. No consistency yet: [root@hayes-01 ~]# lvcreate -L 1G -n lv vg Logical volume "lv" created. [root@hayes-01 ~]# lvs -a -o +devices,segtype LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices Type lv vg -wi-a----- 1.00g /dev/sdc1(0) linear [root@hayes-01 ~]# lvconvert --type raid1 -m 1 vg/lv Are you sure you want to convert linear LV vg/lv to raid1 with 2 images enhancing resilience? [y/n]: y Logical volume vg/lv successfully converted. # convert to raid5 (plus 2 stripes) [root@hayes-01 ~]# lvconvert --type raid5 --stripes 2 vg/lv Using default stripesize 64.00 KiB. --stripes not allowed for LV vg/lv when converting from raid1 to raid5. Are you sure you want to convert raid1 LV vg/lv to raid5 type? [y/n]: y Logical volume vg/lv successfully converted. [root@hayes-01 ~]# lvs -a -o +devices,segtype LV VG Attr LSize Cpy%Sync Convert Devices Type lv vg rwi-a-r--- 1.00g 100.00 lv_rimage_0(0),lv_rimage_1(0) raid5 [lv_rimage_0] vg iwi-aor--- 1.00g /dev/sdc1(0) linear [lv_rimage_1] vg iwi-aor--- 1.00g /dev/sde1(1) linear [lv_rmeta_0] vg ewi-aor--- 4.00m /dev/sdc1(256) linear [lv_rmeta_1] vg ewi-aor--- 4.00m /dev/sde1(0) linear # convert to raid5 (plus 4 stripes) [root@hayes-01 ~]# lvconvert --type raid5 --stripes 4 vg/lv Using default stripesize 64.00 KiB. --stripes not allowed for LV vg/lv when converting from raid1 to raid5. Are you sure you want to convert raid1 LV vg/lv to raid5 type? [y/n]: y Logical volume vg/lv successfully converted. [root@hayes-01 ~]# lvs -a -o +devices,segtype LV VG Attr LSize Cpy%Sync Convert Devices Type lv vg rwi-a-r--- 1.00g 100.00 lv_rimage_0(0),lv_rimage_1(0) raid5 [lv_rimage_0] vg iwi-aor--- 1.00g /dev/sdc1(0) linear [lv_rimage_1] vg iwi-aor--- 1.00g /dev/sde1(1) linear [lv_rmeta_0] vg ewi-aor--- 4.00m /dev/sdc1(256) linear [lv_rmeta_1] vg ewi-aor--- 4.00m /dev/sde1(0) linear # If this was now consistent, then it should do the same as above, convert to raid5_n, print warning that the "--stripes not allowed", but it continues to do something different. [root@hayes-01 ~]# lvconvert --type raid5_n --stripes 2 vg/lv Using default stripesize 64.00 KiB. Invalid conversion request on vg/lv. [root@hayes-01 ~]# lvconvert --type raid5_n vg/lv Using default stripesize 64.00 KiB. Converting raid5 (same as raid5_ls) LV vg/lv to raid5_n. Are you sure you want to convert raid5 LV vg/lv? [y/n]: y Logical volume vg/lv successfully converted. # Here, the convert *AND* stripe addition is allowed! I would have expected the "--stripes not allowed for LV vg/lv when converting from raid5_ls to raid0) [root@hayes-01 ~]# lvconvert --type raid0 --stripes 2 vg/lv Using default stripesize 64.00 KiB. Converting raid5_n LV vg/lv to 3 stripes first. Replaced LV type raid0 with possible type raid5_n. Repeat this command to convert to raid0 after an interim conversion has finished. WARNING: Adding stripes to active logical volume vg/lv will grow it from 256 to 512 extents! Run "lvresize -l256 vg/lv" to shrink it or use the additional capacity. Are you sure you want to add 1 images to raid5_n LV vg/lv? [y/n]: y Logical volume vg/lv successfully converted. [root@hayes-01 ~]# lvs -a -o +devices LV VG Attr LSize Cpy%Sync Devices lv vg rwi-a-r--- 2.00g 100.00 lv_rimage_0(0),lv_rimage_1(0),lv_rimage_2(0) [lv_rimage_0] vg iwi-aor--- 1.00g /dev/sdc1(257) [lv_rimage_0] vg iwi-aor--- 1.00g /dev/sdc1(0) [lv_rimage_1] vg iwi-aor--- 1.00g /dev/sde1(257) [lv_rimage_1] vg iwi-aor--- 1.00g /dev/sde1(1) [lv_rimage_2] vg iwi-aor--- 1.00g /dev/sdf1(257) [lv_rimage_2] vg iwi-aor--- 1.00g /dev/sdf1(1) [lv_rmeta_0] vg ewi-aor--- 4.00m /dev/sdc1(256) [lv_rmeta_1] vg ewi-aor--- 4.00m /dev/sde1(0) [lv_rmeta_2] vg ewi-aor--- 4.00m /dev/sdf1(0) # Here as well, the convert *AND* stripe addition is allowed! [root@hayes-01 ~]# lvconvert --type raid0_meta --stripes 4 vg/lv Using default stripesize 64.00 KiB. Converting raid5_n LV vg/lv to 5 stripes first. Replaced LV type raid0_meta with possible type raid5_n. Repeat this command to convert to raid0_meta after an interim conversion has finished. WARNING: Adding stripes to active logical volume vg/lv will grow it from 512 to 1024 extents! Run "lvresize -l512 vg/lv" to shrink it or use the additional capacity. Are you sure you want to add 2 images to raid5_n LV vg/lv? [y/n]: y Logical volume vg/lv successfully converted. [root@hayes-01 ~]# lvs -a -o +devices LV VG Attr LSize Cpy%Sync Devices lv vg rwi-a-r-s- 4.00g 12.02 lv_rimage_0(0),lv_rimage_1(0),lv_rimage_2(0),lv_rimage_3(0),lv_rimage_4(0) [lv_rimage_0] vg Iwi-aor--- 1.00g /dev/sdc1(255) [lv_rimage_0] vg Iwi-aor--- 1.00g /dev/sdc1(257) [lv_rimage_0] vg Iwi-aor--- 1.00g /dev/sdc1(0) [lv_rimage_1] vg Iwi-aor--- 1.00g /dev/sde1(256) [lv_rimage_1] vg Iwi-aor--- 1.00g /dev/sde1(1) [lv_rimage_2] vg Iwi-aor--- 1.00g /dev/sdf1(256) [lv_rimage_2] vg Iwi-aor--- 1.00g /dev/sdf1(1) [lv_rimage_3] vg Iwi-aor--- 1.00g /dev/sdg1(257) [lv_rimage_3] vg Iwi-aor--- 1.00g /dev/sdg1(1) [lv_rimage_4] vg Iwi-aor--- 1.00g /dev/sdh1(257) [lv_rimage_4] vg Iwi-aor--- 1.00g /dev/sdh1(1) [lv_rmeta_0] vg ewi-aor--- 4.00m /dev/sdc1(256) [lv_rmeta_1] vg ewi-aor--- 4.00m /dev/sde1(0) [lv_rmeta_2] vg ewi-aor--- 4.00m /dev/sdf1(0) [lv_rmeta_3] vg ewi-aor--- 4.00m /dev/sdg1(0) [lv_rmeta_4] vg ewi-aor--- 4.00m /dev/sdh1(0) 3.10.0-943.el7_bz1514539+1586123.x86_64 lvm2-2.02.180-6.el7 BUILT: Fri Aug 24 08:52:19 CDT 2018 lvm2-libs-2.02.180-6.el7 BUILT: Fri Aug 24 08:52:19 CDT 2018 lvm2-cluster-2.02.180-6.el7 BUILT: Fri Aug 24 08:52:19 CDT 2018 lvm2-lockd-2.02.180-6.el7 BUILT: Fri Aug 24 08:52:19 CDT 2018 lvm2-python-boom-0.9-9.el7 BUILT: Fri Aug 24 08:52:54 CDT 2018 cmirror-2.02.180-6.el7 BUILT: Fri Aug 24 08:52:19 CDT 2018 device-mapper-1.02.149-6.el7 BUILT: Fri Aug 24 08:52:19 CDT 2018 device-mapper-libs-1.02.149-6.el7 BUILT: Fri Aug 24 08:52:19 CDT 2018 device-mapper-event-1.02.149-6.el7 BUILT: Fri Aug 24 08:52:19 CDT 2018 device-mapper-event-libs-1.02.149-6.el7 BUILT: Fri Aug 24 08:52:19 CDT 2018 device-mapper-persistent-data-0.7.3-3.el7 BUILT: Tue Nov 14 05:07:18 CST 2017 In some scenarios, you'll see the stripe warning when not even providing the --stripe flag on the cmdline due to what's happening internally, which can also be confusing. [root@hayes-01 ~]# lvconvert --type raid5_n vg/lv Using default stripesize 64.00 KiB. --stripes not allowed for LV vg/lv when converting from raid1 to raid5_n. Are you sure you want to convert raid1 LV vg/lv to raid5_n type? [y/n]: y Logical volume vg/lv successfully converted. Stable branch commit: d910f75d89e02e46cd16f9ddbc8e8358c3c2efd3 comment#5 is correct in telling that a raid5(_ls) has to result in an error when you request to convert to raid5_n with 2 stripes, because you can opnly reshape for stripes but not for RAID algorithm (i.e. reaid5_n as you requested) in one step. I'll put down to drop the algorithm with a warning in that case for convenience. Corey, please retest #c6 based is fixed in lvm version 2.02.183: [root@o ~]# lvcreate -L 32m -nr o Logical volume "r" created. [root@o ~]# lvconvert -y --ty raid5_n o/r Using default stripesize 64.00 KiB. Replaced LV type raid5_n with possible type raid1. Repeat this command to convert to raid5_n after an interim conversion has finished. Logical volume o/r successfully converted. This bug was about implementing consistent warnings or actions when convert+reshapes are tried in one command line. Below are the current (different) behaviors using the examples in the original comment (and back in bug 1511047). I believe a user will find that most (if not all) convert+reshape in one cmdline examples will fall into one of these three behaviors. It's possible that this may be an insurmountable request given the amount of complexity and variability in reshaping and converting volumes in one command line and if so this RFE should probably just be closed WONTFIX. Current Results (Inconsistency): [root@hayes-02 ~]# lvconvert --type raid5 --stripes 2 vg/lv Using default stripesize 64.00 KiB. --stripes not allowed for LV vg/lv when converting from raid1 to raid5. [root@hayes-02 ~]# lvconvert --type raid5_n --stripes 4 vg/lv using default stripesize 64.00 kib. invalid conversion request on vg/lv. [root@hayes-02 ~]# lvconvert --type raid10 --stripes 3 vg/lv Using default stripesize 64.00 KiB. Converting raid5_n LV vg/lv to 4 stripes first. Replaced LV type raid10 (same as raid10_near) with possible type raid5_n. Repeat this command to convert to raid10 after an interim conversion has finished. WARNING: Adding stripes to active logical volume vg/lv will grow it from 256 to 384 extents! Run "lvresize -l256 vg/lv" to shrink it or use the additional capacity. Are you sure you want to add 1 images to raid5_n LV vg/lv? [y/n]: y Logical volume vg/lv successfully converted. Expected Results (Consistency): [root@hayes-02 ~]# lvconvert --type raid5 --stripes 2 vg/lv Using default stripesize 64.00 KiB. --stripes not allowed for LV vg/lv when converting from raid1 to raid5. [root@hayes-02 ~]# lvconvert --type raid5_n --stripes 4 vg/lv using default stripesize 64.00 kib. --stripes not allowed for LV vg/lv when converting from raid5 to raid5_n. [root@hayes-02 ~]# lvconvert --type raid10 --stripes 3 vg/lv Using default stripesize 64.00 KiB. --stripes not allowed for LV vg/lv when converting from raid5_n to raid10. *OR* [root@hayes-02 ~]# lvconvert --type raid5 --stripes 2 vg/lv Using default stripesize 64.00 KiB. invalid conversion request on vg/lv. [root@hayes-02 ~]# lvconvert --type raid5_n --stripes 4 vg/lv using default stripesize 64.00 kib. invalid conversion request on vg/lv. [root@hayes-02 ~]# lvconvert --type raid10 --stripes 3 vg/lv using default stripesize 64.00 kib. invalid conversion request on vg/lv. *OR* [root@hayes-02 ~]# lvconvert --type raid5 --stripes 2 vg/lv Using default stripesize 64.00 KiB. Converting raid1 LV vg/lv to 2 stripes first. [...] [root@hayes-02 ~]# lvconvert --type raid5_n --stripes 4 vg/lv using default stripesize 64.00 kib. Converting raid5 LV vg/lv to 4 stripes first. [...] [root@hayes-02 ~]# lvconvert --type raid10 --stripes 3 vg/lv Using default stripesize 64.00 KiB. Converting raid5_n LV vg/lv to 4 stripes first. [...] Here are the full scenarios in more detail: # Scenario 1 # # From raid1 (-m1) to raid5 (--stripes 2) # # User sees "--stripes not allowed for LV vg/lv", lvm ignores it and does the convert by throwing the stripe arg on the floor. [root@hayes-02 ~]# lvcreate -L 1G -n lv vg Logical volume "lv" created. [root@hayes-02 ~]# lvconvert --type raid1 -m 1 vg/lv Are you sure you want to convert linear LV vg/lv to raid1 with 2 images enhancing resilience? [y/n]: y Logical volume vg/lv successfully converted. [root@hayes-02 ~]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert lv vg rwi-a-r--- 1.00g 100.00 [root@hayes-02 ~]# lvconvert --type raid5 --stripes 2 vg/lv Using default stripesize 64.00 KiB. --stripes not allowed for LV vg/lv when converting from raid1 to raid5. Are you sure you want to convert raid1 LV vg/lv to raid5 type? [y/n]: y Logical volume vg/lv successfully converted. [root@hayes-02 ~]# lvs -a -o +devices,segtype LV VG Attr LSize Log Cpy%Sync Devices Type lv vg rwi-a-r--- 1.00g 100.00 lv_rimage_0(0),lv_rimage_1(0) raid5 [lv_rimage_0] vg iwi-aor--- 1.00g /dev/sdb1(0) linear [lv_rimage_1] vg iwi-aor--- 1.00g /dev/sdc1(1) linear [lv_rmeta_0] vg ewi-aor--- 4.00m /dev/sdb1(256) linear [lv_rmeta_1] vg ewi-aor--- 4.00m /dev/sdc1(0) linear # Scenario 2 # # From raid5 (--stripes 2) to raid5_n (--stripes 3) # # User sees "Invalid conversion request", lvm basically tell the user to fix their cmdline args and try again [root@hayes-02 ~]# lvcreate --type raid5 -n lv -L 1G --stripes 2 vg Using default stripesize 64.00 KiB. Logical volume "lv" created. [root@hayes-02 ~]# lvs -a -o +devices LV VG Attr LSize Log Cpy%Sync Devices lv vg rwi-a-r--- 1.00g 100.00 lv_rimage_0(0),lv_rimage_1(0),lv_rimage_2(0) [lv_rimage_0] vg iwi-aor--- 512.00m /dev/sdb1(1) [lv_rimage_1] vg iwi-aor--- 512.00m /dev/sdc1(1) [lv_rimage_2] vg iwi-aor--- 512.00m /dev/sdd1(1) [lv_rmeta_0] vg ewi-aor--- 4.00m /dev/sdb1(0) [lv_rmeta_1] vg ewi-aor--- 4.00m /dev/sdc1(0) [lv_rmeta_2] vg ewi-aor--- 4.00m /dev/sdd1(0) [root@hayes-02 ~]# lvconvert --type raid5_n --stripes 3 vg/lv Using default stripesize 64.00 KiB. Invalid conversion request on vg/lv. [root@hayes-02 ~]# lvconvert --type raid5_n --stripes 4 vg/lv Using default stripesize 64.00 KiB. Invalid conversion request on vg/lv. [root@hayes-02 ~]# lvconvert --type raid5_n vg/lv Using default stripesize 64.00 KiB. Converting raid5 (same as raid5_ls) LV vg/lv to raid5_n. Are you sure you want to convert raid5 LV vg/lv? [y/n]: y Logical volume vg/lv successfully converted. [root@hayes-02 ~]# lvs -a -o +devices,segtype LV VG Attr LSize Log Cpy%Sync Devices Type lv vg rwi-a-r--- 1.00g 100.00 lv_rimage_0(0),lv_rimage_1(0) raid5_n [lv_rimage_0] vg iwi-aor--- 1.00g /dev/sdb1(0) linear [lv_rimage_1] vg iwi-aor--- 1.00g /dev/sdc1(1) linear [lv_rmeta_0] vg ewi-aor--- 4.00m /dev/sdb1(256) linear [lv_rmeta_1] vg ewi-aor--- 4.00m /dev/sdc1(0) linear # Scenario 3 # # From raid5_n (--stripes 2) to raid10 (--stripes 3) # # User sees "Adding stripes...", lvm starts the stripe addition process, but throws the convert type on the floor now and then tells the to run it again to get the originally requested layout [root@hayes-02 ~]# lvcreate --type raid5_n -n lv -L 1G --stripes 2 vg Using default stripesize 64.00 KiB. Logical volume "lv" created. [root@hayes-02 ~]# lvs -a -o +devices LV VG Attr LSize Log Cpy%Sync Devices lv vg rwi-a-r--- 1.00g 100.00 lv_rimage_0(0),lv_rimage_1(0),lv_rimage_2(0) [lv_rimage_0] vg iwi-aor--- 512.00m /dev/sdb1(1) [lv_rimage_1] vg iwi-aor--- 512.00m /dev/sdc1(1) [lv_rimage_2] vg iwi-aor--- 512.00m /dev/sdd1(1) [lv_rmeta_0] vg ewi-aor--- 4.00m /dev/sdb1(0) [lv_rmeta_1] vg ewi-aor--- 4.00m /dev/sdc1(0) [lv_rmeta_2] vg ewi-aor--- 4.00m /dev/sdd1(0) [root@hayes-02 ~]# lvconvert --type raid10 --stripes 3 vg/lv Using default stripesize 64.00 KiB. Converting raid5_n LV vg/lv to 4 stripes first. Replaced LV type raid10 (same as raid10_near) with possible type raid5_n. Repeat this command to convert to raid10 after an interim conversion has finished. WARNING: Adding stripes to active logical volume vg/lv will grow it from 256 to 384 extents! Run "lvresize -l256 vg/lv" to shrink it or use the additional capacity. Are you sure you want to add 1 images to raid5_n LV vg/lv? [y/n]: y Logical volume vg/lv successfully converted. [root@hayes-02 ~]# lvs -a -o +devices,segtype LV VG Attr LSize Log Cpy%Sync Devices Type lv vg rwi-a-r-s- 1.50g 16.04 lv_rimage_0(0),lv_rimage_1(0),lv_rimage_2(0),lv_rimage_3(0) raid5_n [lv_rimage_0] vg Iwi-aor--- 516.00m /dev/sdb1(129) linear [lv_rimage_0] vg Iwi-aor--- 516.00m /dev/sdb1(1) linear [lv_rimage_1] vg Iwi-aor--- 516.00m /dev/sdc1(129) linear [lv_rimage_1] vg Iwi-aor--- 516.00m /dev/sdc1(1) linear [lv_rimage_2] vg Iwi-aor--- 516.00m /dev/sdd1(129) linear [lv_rimage_2] vg Iwi-aor--- 516.00m /dev/sdd1(1) linear [lv_rimage_3] vg Iwi-aor--- 516.00m /dev/sde1(129) linear [lv_rimage_3] vg Iwi-aor--- 516.00m /dev/sde1(1) linear [lv_rmeta_0] vg ewi-aor--- 4.00m /dev/sdb1(0) linear [lv_rmeta_1] vg ewi-aor--- 4.00m /dev/sdc1(0) linear [lv_rmeta_2] vg ewi-aor--- 4.00m /dev/sdd1(0) linear [lv_rmeta_3] vg ewi-aor--- 4.00m /dev/sde1(0) linear Thinking about closing this WONTFIX but want to discuss requierements with QE before doing that. Moving to 7.8. Closing this bug WONTFIX in lieu of rhel8 bug 1834428. It's too late in the rhel7 game to fix this. Feel free to close bug 1834428 as well if this is deemed not worth the risk due to the complexity and variability in reshaping and converting volumes in one command line. |