Skip to contentSkip to conversation

mdadm.8: add note information for raid0 growing operation

PATCH Applied Petr Vorel 2 participants 2 messages Feb 24, 2020 MD RAID

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH v2 1/1 mdadm.8: add note information for raid0 growing operation

From: Coly Li <[email protected]>

When growing a raid0 device, if the new component disk size is not big enough, the grow operation may fail due to lack of backup space.

The minimum backup space should be larger than:
LCM(old, new) * chunk-size * 2

where LCM() is the least common multiple of the old and new count of component disks, and "* 2" comes from the fact that mdadm refuses to use more than half of a spare device for backup space.

There are users reporting such failure when they grew a raid0 array with small component disk. Neil Brown points out this is not a bug and how the failure comes. This patch adds note information into mdadm(8) man page in the Notes part of GROW MODE section to explain the minimum size requirement of new component disk size or external backup size.

Cc NeilBrown <[email protected]>
Cc Jes Sorensen <[email protected]>
Cc Paul Menzel <[email protected]>
Cc Wols Lists <[email protected]>

---
Hi,

Coly haven't sent v2, but it's already prepared in openSUSE package [1], therefore sending it on his behalf.

Kind regards,
Petr

[1] https://build.opensuse.org/package/view_file/Base:System/mdadm/1002-mdadm.8-add-note-information-for-raid0-growing-opera.patch?expand=1

 mdadm.8.in | 6 ++++++
 1 file changed, 6 insertions(+)
mdadm.8.in +6 -0
index 5d00faf..a3494a1 100644
@@ -2768,6 +2768,12 @@ option and it is transparent for assembly feature.
 .IP \(bu 4
 Roaming between Windows(R) and Linux systems for IMSM metadata is not
 supported during grow process.
+.IP \(bu 4
+When growing a raid0 device, the new component disk size (or external
+backup size) should be larger than LCM(old, new) * chunk-size * 2,
+where LCM() is the least common multiple of the old and new count of
+component disks, and "* 2" comes from the fact that mdadm refuses to
+use more than half of a spare device for backup space.
 
 .SS SIZE CHANGES
 Normally when an array is built the "size" is taken from the smallest
Signature · 1 line
2.25.1
Applied
#1 lore raw
Quoted 26 lines · Petr Vorel

From: Coly Li <[email protected]>

When growing a raid0 device, if the new component disk size is not big enough, the grow operation may fail due to lack of backup space.

The minimum backup space should be larger than:
LCM(old, new) * chunk-size * 2

where LCM() is the least common multiple of the old and new count of component disks, and "* 2" comes from the fact that mdadm refuses to use more than half of a spare device for backup space.

There are users reporting such failure when they grew a raid0 array with small component disk. Neil Brown points out this is not a bug and how the failure comes. This patch adds note information into mdadm(8) man page in the Notes part of GROW MODE section to explain the minimum size requirement of new component disk size or external backup size.

Cc NeilBrown <[email protected]>
Cc Jes Sorensen <[email protected]>
Cc Paul Menzel <[email protected]>
Cc Wols Lists <[email protected]>
Quoted 8 lines

---
Hi,

Coly haven't sent v2, but it's already prepared in openSUSE package [1], therefore sending it on his behalf.

Kind regards,
Petr

Applied!

Thanks,
Jes