Bug 2070211 - keep support for type "mirror" in lvconvert to allow conversion to striped
Summary: keep support for type "mirror" in lvconvert to allow conversion to striped
Keywords:
Status: NEW
Alias: None
Product: LVM and device-mapper
Classification: Community
Component: lvm2
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
: ---
Assignee: LVM Team
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-30 16:03 UTC by Joachim Wagner
Modified: 2023-08-10 15:39 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:
pm-rhel: lvm-technical-solution?
pm-rhel: lvm-test-coverage?


Attachments (Terms of Use)

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)


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