diff options
author | NeilBrown <neilb@suse.de> | 2019-11-04 04:27:49 +0100 |
---|---|---|
committer | Jes Sorensen <jsorensen@fb.com> | 2019-12-02 22:14:49 +0100 |
commit | 329dfc28debb58ffe7bd1967cea00fc583139aca (patch) | |
tree | 91b570ff204f3356a2617b5cbaecee133627d74f /maps.c | |
parent | imsm: Change the way of printing nvme drives in detail-platform. (diff) | |
download | mdadm-329dfc28debb58ffe7bd1967cea00fc583139aca.tar.xz mdadm-329dfc28debb58ffe7bd1967cea00fc583139aca.zip |
Create: add support for RAID0 layouts.
Since Linux 5.4 a layout is needed for RAID0 arrays with
varying device sizes.
This patch makes the layout of an array visible (via --examine)
and sets the layout on newly created arrays.
--layout=dangerous
can be used to avoid setting a layout so that they array
can be used on older kernels.
Tested-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'maps.c')
-rw-r--r-- | maps.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -73,6 +73,18 @@ mapping_t r6layout[] = { { NULL, UnSet } }; +/* raid0 layout is only needed because of a bug in 3.14 which changed + * the effective layout of raid0 arrays with varying device sizes. + */ +mapping_t r0layout[] = { + { "original", RAID0_ORIG_LAYOUT}, + { "alternate", RAID0_ALT_MULTIZONE_LAYOUT}, + { "1", 1}, /* aka ORIG */ + { "2", 2}, /* aka ALT */ + { "dangerous", 0}, + { NULL, UnSet}, +}; + mapping_t pers[] = { { "linear", LEVEL_LINEAR}, { "raid0", 0}, |