Bug 2070211

Summary: keep support for type "mirror" in lvconvert to allow conversion to striped
Product: [Community] LVM and device-mapper Reporter: Joachim Wagner <jo4rht>
Component: lvm2Assignee: LVM Team <lvm-team>
lvm2 sub component: Changing Logical Volumes QA Contact: cluster-qe <cluster-qe>
Status: NEW --- Docs Contact:
Severity: low    
Priority: unspecified CC: agk, heinzm, jbrassow, msnitzer, prajnoha, zkabelac
Version: unspecifiedFlags: pm-rhel: lvm-technical-solution?
pm-rhel: lvm-test-coverage?
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

Description Joachim Wagner 2022-03-30 16:03:56 UTC
Description of problem: Man pages and https://unix.stackexchange.com/questions/697364/in-what-cases-will-type-mirror-continue-to-be-a-good-choice-is-not-depre suggest that the "mirror" LV type may be removed soon. However, lvconvert ignores instruction to create a striped leg when type raid1 is used and discussion in https://bugzilla.redhat.com/show_bug.cgi?id=1483530 from 2017 (reopened) suggests that this is the right behaviour and the only problem is that lvcreate should reject option `--stripes` when creating a new raid1 leg. `raid1` can therefore not be used as a replacement for `mirror`, e.g. when creating a mirror to change the number of stripes of an LV (and then deleting the source) as in the accepted answer in https://unix.stackexchange.com/questions/348873/convert-a-single-drive-lvm-volume-to-a-striped-volume-across-3-drives

At the same time, `pvmove` seems to be still using the `mirror` type for its work, as suggested by inspecting hidden volumes with `lvdisplay -am`, indicating that `raid1` is not ready or suitable to replace `mirror` in this internal application. If internal support is to stay and `mirror` has also at least one strong use case for users why not keep support and re-phrase man pages to say that `mirror` has certain disadvantages for permanent use but can facilitate LV stripe conversions, instead of saying that it is "deprecated", which in software usually means that there are plans to drop the feature in a future release?

Version-Release number of selected component (if applicable): 2.03.15-2.1 openSUSE Tumbleweed 20220328, lvconvert

(meta-bug: versions after 2.02.185 missing in the "Version" drop-down list)

Steps to Reproduce:
1. Read man pages
2. Conclude that `raid1` replaces `mirror`
3. Try to convert linear LV to striped LV with `raid1` instead of `mirror`, following https://unix.stackexchange.com/questions/348873/convert-a-single-drive-lvm-volume-to-a-striped-volume-across-3-drives

Actual results: LV is still linear

Expected results: LV is striped

Additional info:
* https://bugzilla.redhat.com/show_bug.cgi?id=1494135 argues that type mirror vs raid1 needs review
* https://bugzilla.redhat.com/show_bug.cgi?id=1720705 fixes a CLI regression causing `--stripes` to be ignored with `--type mirror`
* https://bugzilla.redhat.com/show_bug.cgi?id=1483530 claims that it is correct behaviour that `--stripes` cannot be used with `--type raid1` (patch to print error message still not merged 4 years later)