size, though if there is a variance among the drives of greater than 1%, a warning is
issued.
+A suffix of 'M' or 'G' can be given to indicate Megabytes or
+Gigabytes respectively.
+
This value can be set with
.B \-\-grow
for RAID level 1/4/5/6. If the array was created with a size smaller
.BR \-Z ", " \-\-array-size=
This is only meaningful with
.B \-\-grow
-and its effect is not persistent: when the array is stopped an
+and its effect is not persistent: when the array is stopped and
restarted the default array size will be restored.
Setting the array-size causes the array to appear smaller to programs
is, it is required that the array size is reduced as appropriate
before the number of devices in the array is reduced.
+A suffix of 'M' or 'G' can be given to indicate Megabytes or
+Gigabytes respectively.
+A value of
+.B max
+restores the apparent size of the array to be whatever the real
+amount of available space is.
+
.TP
.BR \-c ", " \-\-chunk=
Specify chunk size of kibibytes. The default when creating an
default when Building and array with no persistent metadata is 64KB.
This is only meaningful for RAID0, RAID4, RAID5, RAID6, and RAID10.
+A suffix of 'M' or 'G' can be given to indicate Megabytes or
+Gigabytes respectively.
+
.TP
.BR \-\-rounding=
Specify rounding factor for a Linear array. The size of each
bitmap, the chunksize defaults to 64Meg, or larger if necessary to
fit the bitmap into the available space.
+A suffix of 'M' or 'G' can be given to indicate Megabytes or
+Gigabytes respectively.
+
.TP
.BR \-W ", " \-\-write\-mostly
subsequent devices listed in a
should be stored on a separate device, not on the RAID array being
reshaped.
-.TP
-.BR \-\-array-size= ", " \-Z
-Set the size of the array which is seen by users of the device such as
-filesystems. This can be less that the real size, but never greater.
-The size set this way does not persist across restarts of the array.
-
-This is most useful when reducing the number of devices in a RAID5 or
-RAID6. Such arrays require the array-size to be reduced before a
-reshape can be performed that reduces the real size.
-
-A value of
-.B max
-restores the apparent size of the array to be whatever the real
-amount of available space is.
-
.TP
.BR \-N ", " \-\-name=
Set a
"Second value is %s.\n", optarg);
exit(2);
}
- chunk = strtol(optarg, &c, 10);
- if (!optarg[0] || *c || chunk<4 || ((chunk-1)&chunk)) {
+ chunk = parse_size(optarg);
+ if (chunk < 8 || ((chunk-1)&chunk)) {
fprintf(stderr, Name ": invalid chunk/rounding value: %s\n",
optarg);
exit(2);
}
+ /* Covert sectors to K */
+ chunk /= 2;
continue;
#if 0
case O(GROW,BitmapChunk):
case O(BUILD,BitmapChunk):
case O(CREATE,BitmapChunk): /* bitmap chunksize */
- bitmap_chunk = strtol(optarg, &c, 10);
- if (!optarg[0] || *c || bitmap_chunk < 0 ||
- bitmap_chunk & (bitmap_chunk - 1)) {
- fprintf(stderr, Name ": invalid bitmap chunksize: %s\n",
- optarg);
+ bitmap_chunk = parse_size(optarg);
+ if (bitmap_chunk < 0 ||
+ bitmap_chunk & (bitmap_chunk - 1)) {
+ fprintf(stderr,
+ Name ": invalid bitmap chunksize: %s\n",
+ optarg);
exit(2);
}
- /* convert K to B, chunk of 0K means 512B */
- bitmap_chunk = bitmap_chunk ? bitmap_chunk * 1024 : 512;
+ /* convert sectors to B, chunk of 0 means 512B */
+ bitmap_chunk = bitmap_chunk ? bitmap_chunk * 512 : 512;
continue;
case O(GROW, WriteBehind):