dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

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

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