.BR \-\-backup\-file=
This is needed when
.B \-\-grow
- is used to increase the number of
- raid-devices in a RAID5 if there are no spare devices available.
- See the GROW MODE section below on RAID\-DEVICES CHANGES. The file
- should be stored on a separate device, not on the RAID array being
- reshaped.
+ is used to increase the number of raid-devices in a RAID5 or RAID6 if
+ there are no spare devices available, or to shrink, change RAID level
+ or layout. See the GROW MODE section below on RAID\-DEVICES CHANGES.
+ The file must 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
.B \-\-backup\-file
must be presented to
.B \-\-assemble
- to allow possibly corrupted data to be restored.
+ to allow possibly corrupted data to be restored, and the reshape
+ to be completed.
+.TP
+.BR \-\-invalid\-backup
+If the file needed for the above option is not available for any
+reason an empty file can be given together with this option to
+indicate that the backup file is invalid. In this case the data that
+was being rearranged at the time of the crash could be irrecoverably
+lost, but the rest of the array may still be recoverable. This option
+should only be used as a last resort if there is no way to recover the
+backup file.
+
+
.TP
.BR \-U ", " \-\-update=
Update the superblock on each device while assembling the array. The
int d = info->disk.number;
int want;
if (info->disk.state == 6)
- want = __cpu_to_le32(info->disk.raid_disk);
+ want = info->disk.raid_disk;
else
want = 0xFFFF;
- if (sb->dev_roles[d] != want) {
- sb->dev_roles[d] = want;
+ if (sb->dev_roles[d] != __cpu_to_le16(want)) {
+ sb->dev_roles[d] = __cpu_to_le16(want);
rv = 1;
}
- }
- if (strcmp(update, "linear-grow-new") == 0) {
+ } else if (strcmp(update, "linear-grow-new") == 0) {
unsigned int i;
int rfd, fd;
unsigned int max = __le32_to_cpu(sb->max_dev);