dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

Blame SOURCES/0062-mdadm.8-add-note-information-for-raid0-growing-opera.patch

d805ba
From 2551061c253b8fd45ee93d1aab3e91d2c7ac9c20 Mon Sep 17 00:00:00 2001
d805ba
From: Coly Li <colyli@suse.de>
d805ba
Date: Mon, 24 Feb 2020 12:34:09 +0100
d805ba
Subject: [RHEL7.9 PATCH 62/77] mdadm.8: add note information for raid0 growing
d805ba
 operation
d805ba
d805ba
When growing a raid0 device, if the new component disk size is not
d805ba
big enough, the grow operation may fail due to lack of backup space.
d805ba
d805ba
The minimum backup space should be larger than:
d805ba
 LCM(old, new) * chunk-size * 2
d805ba
d805ba
where LCM() is the least common multiple of the old and new count of
d805ba
component disks, and "* 2" comes from the fact that mdadm refuses to
d805ba
use more than half of a spare device for backup space.
d805ba
d805ba
There are users reporting such failure when they grew a raid0 array
d805ba
with small component disk. Neil Brown points out this is not a bug
d805ba
and how the failure comes. This patch adds note information into
d805ba
mdadm(8) man page in the Notes part of GROW MODE section to explain
d805ba
the minimum size requirement of new component disk size or external
d805ba
backup size.
d805ba
d805ba
Reviewed-by: Petr Vorel <pvorel@suse.cz>
d805ba
Cc: NeilBrown <neilb@suse.de>
d805ba
Cc: Jes Sorensen <jsorensen@fb.com>
d805ba
Cc: Paul Menzel <pmenzel@molgen.mpg.de>
d805ba
Cc: Wols Lists <antlists@youngman.org.uk>
d805ba
Cc: Nix <nix@esperi.org.uk>
d805ba
Signed-off-by: Coly Li <colyli@suse.de>
d805ba
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
d805ba
---
d805ba
 mdadm.8.in | 6 ++++++
d805ba
 1 file changed, 6 insertions(+)
d805ba
d805ba
diff --git a/mdadm.8.in b/mdadm.8.in
d805ba
index 5d00faf..a3494a1 100644
d805ba
--- a/mdadm.8.in
d805ba
+++ b/mdadm.8.in
d805ba
@@ -2768,6 +2768,12 @@ option and it is transparent for assembly feature.
d805ba
 .IP \(bu 4
d805ba
 Roaming between Windows(R) and Linux systems for IMSM metadata is not
d805ba
 supported during grow process.
d805ba
+.IP \(bu 4
d805ba
+When growing a raid0 device, the new component disk size (or external
d805ba
+backup size) should be larger than LCM(old, new) * chunk-size * 2,
d805ba
+where LCM() is the least common multiple of the old and new count of
d805ba
+component disks, and "* 2" comes from the fact that mdadm refuses to
d805ba
+use more than half of a spare device for backup space.
d805ba
 
d805ba
 .SS SIZE CHANGES
d805ba
 Normally when an array is built the "size" is taken from the smallest
d805ba
-- 
d805ba
2.7.5
d805ba