|
|
c0f891 |
From fea026b4849182fc8413014c81456e7215af28d9 Mon Sep 17 00:00:00 2001
|
|
|
c0f891 |
From: Mateusz Kusiak <mateusz.kusiak@intel.com>
|
|
|
c0f891 |
Date: Wed, 23 Mar 2022 15:05:19 +0100
|
|
|
c0f891 |
Subject: [PATCH 03/12] Grow_reshape: Add r0 grow size error message and update
|
|
|
c0f891 |
man
|
|
|
c0f891 |
|
|
|
c0f891 |
Grow size on r0 is not supported for imsm and native metadata.
|
|
|
c0f891 |
Add proper error message.
|
|
|
c0f891 |
Update man for proper use of --size.
|
|
|
c0f891 |
Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
|
|
|
c0f891 |
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
|
|
|
c0f891 |
---
|
|
|
c0f891 |
Grow.c | 6 ++++++
|
|
|
c0f891 |
mdadm.8.in | 19 ++++++++++++-------
|
|
|
c0f891 |
2 files changed, 18 insertions(+), 7 deletions(-)
|
|
|
c0f891 |
|
|
|
c0f891 |
diff --git a/Grow.c b/Grow.c
|
|
|
c0f891 |
index 9a947204..aa72490b 100644
|
|
|
c0f891 |
--- a/Grow.c
|
|
|
c0f891 |
+++ b/Grow.c
|
|
|
c0f891 |
@@ -1998,6 +1998,12 @@ int Grow_reshape(char *devname, int fd,
|
|
|
c0f891 |
goto release;
|
|
|
c0f891 |
}
|
|
|
c0f891 |
|
|
|
c0f891 |
+ if (array.level == 0) {
|
|
|
c0f891 |
+ pr_err("Component size change is not supported for RAID0\n");
|
|
|
c0f891 |
+ rv = 1;
|
|
|
c0f891 |
+ goto release;
|
|
|
c0f891 |
+ }
|
|
|
c0f891 |
+
|
|
|
c0f891 |
if (reshape_super(st, s->size, UnSet, UnSet, 0, 0, UnSet, NULL,
|
|
|
c0f891 |
devname, APPLY_METADATA_CHANGES,
|
|
|
c0f891 |
c->verbose > 0)) {
|
|
|
c0f891 |
diff --git a/mdadm.8.in b/mdadm.8.in
|
|
|
c0f891 |
index be902dba..e2a42425 100644
|
|
|
c0f891 |
--- a/mdadm.8.in
|
|
|
c0f891 |
+++ b/mdadm.8.in
|
|
|
c0f891 |
@@ -459,7 +459,8 @@ number of spare devices.
|
|
|
c0f891 |
|
|
|
c0f891 |
.TP
|
|
|
c0f891 |
.BR \-z ", " \-\-size=
|
|
|
c0f891 |
-Amount (in Kilobytes) of space to use from each drive in RAID levels 1/4/5/6.
|
|
|
c0f891 |
+Amount (in Kilobytes) of space to use from each drive in RAID levels 1/4/5/6/10
|
|
|
c0f891 |
+and for RAID 0 on external metadata.
|
|
|
c0f891 |
This must be a multiple of the chunk size, and must leave about 128Kb
|
|
|
c0f891 |
of space at the end of the drive for the RAID superblock.
|
|
|
c0f891 |
If this is not specified
|
|
|
c0f891 |
@@ -478,10 +479,19 @@ To guard against this it can be useful to set the initial size
|
|
|
c0f891 |
slightly smaller than the smaller device with the aim that it will
|
|
|
c0f891 |
still be larger than any replacement.
|
|
|
c0f891 |
|
|
|
c0f891 |
+This option can be used with
|
|
|
c0f891 |
+.B \-\-create
|
|
|
c0f891 |
+for determining initial size of an array. For external metadata,
|
|
|
c0f891 |
+it can be used on a volume, but not on a container itself.
|
|
|
c0f891 |
+Setting initial size of
|
|
|
c0f891 |
+.B RAID 0
|
|
|
c0f891 |
+array is only valid for external metadata.
|
|
|
c0f891 |
+
|
|
|
c0f891 |
This value can be set with
|
|
|
c0f891 |
.B \-\-grow
|
|
|
c0f891 |
-for RAID level 1/4/5/6 though
|
|
|
c0f891 |
+for RAID level 1/4/5/6/10 though
|
|
|
c0f891 |
DDF arrays may not be able to support this.
|
|
|
c0f891 |
+RAID 0 array size cannot be changed.
|
|
|
c0f891 |
If the array was created with a size smaller than the currently
|
|
|
c0f891 |
active drives, the extra space can be accessed using
|
|
|
c0f891 |
.BR \-\-grow .
|
|
|
c0f891 |
@@ -501,11 +511,6 @@ problems the array can be made bigger again with no loss with another
|
|
|
c0f891 |
.B "\-\-grow \-\-size="
|
|
|
c0f891 |
command.
|
|
|
c0f891 |
|
|
|
c0f891 |
-This value cannot be used when creating a
|
|
|
c0f891 |
-.B CONTAINER
|
|
|
c0f891 |
-such as with DDF and IMSM metadata, though it perfectly valid when
|
|
|
c0f891 |
-creating an array inside a container.
|
|
|
c0f891 |
-
|
|
|
c0f891 |
.TP
|
|
|
c0f891 |
.BR \-Z ", " \-\-array\-size=
|
|
|
c0f891 |
This is only meaningful with
|
|
|
c0f891 |
--
|
|
|
c0f891 |
2.31.1
|
|
|
c0f891 |
|