int layout = UnSet;
char *layout_str = NULL;
int raiddisks = 0;
- int max_disks = MD_SB_DISKS; /* just a default */
int sparedisks = 0;
struct mddev_ident_s ident;
char *configfile = NULL;
fprintf(stderr, Name ": unrecognised metadata identifier: %s\n", optarg);
exit(2);
}
- max_disks = ss->max_devs;
continue;
case O(MANAGE,'W'):
continue;
if (strcmp(update, "devicesize")==0)
continue;
+ if (strcmp(update, "no-bitmap")==0)
+ continue;
if (strcmp(update, "byteorder")==0) {
if (ss) {
fprintf(stderr, Name ": must not set metadata type with --update=byteorder.\n");
}
fprintf(outf, "Valid --update options are:\n"
" 'sparc2.2', 'super-minor', 'uuid', 'name', 'resync',\n"
- " 'summaries', 'homehost', 'byteorder', 'devicesize'.\n");
+ " 'summaries', 'homehost', 'byteorder', 'devicesize',\n"
+ " 'no-bitmap'\n");
exit(outf == stdout ? 0 : 2);
case O(INCREMENTAL,NoDegraded):
+ fprintf(stderr, Name ": --no-degraded is deprecated in Incremental mode\n");
case O(ASSEMBLE,NoDegraded): /* --no-degraded */
runstop = -1; /* --stop isn't allowed for --assemble,
* so we overload slightly */
devmode = 'r';
continue;
case O(MANAGE,'f'): /* set faulty */
+ case O(INCREMENTAL,'f'): /* r for incremental is taken, use f
+ * even though we will both fail and
+ * remove the device */
devmode = 'f';
continue;
case O(INCREMENTAL,'R'):
}
runstop = -1;
continue;
+ case O(MANAGE,'t'):
+ test = 1;
+ continue;
case O(MISC,'Q'):
case O(MISC,'D'):
}
if (raiddisks) {
- if (raiddisks > max_disks) {
- fprintf(stderr, Name ": invalid number of raid devices: %d\n",
- raiddisks);
- exit(2);
- }
if (raiddisks == 1 && !force && level != -5) {
fprintf(stderr, Name ": '1' is an unusual number of drives for an array, so it is probably\n"
" a mistake. If you really mean it you will need to specify --force before\n"
exit(2);
}
}
- if (sparedisks) {
- if ( sparedisks > max_disks - raiddisks) {
- fprintf(stderr, Name ": invalid number of spare-devices: %d\n",
- sparedisks);
- exit(2);
- }
- }
if (homehost == NULL)
homehost = conf_get_homehost(&require_homehost);
rv = Manage_ro(devlist->devname, mdfd, readonly);
if (!rv && devs_found>1)
rv = Manage_subdevs(devlist->devname, mdfd,
- devlist->next, verbose-quiet);
+ devlist->next, verbose-quiet, test);
if (!rv && readonly < 0)
rv = Manage_ro(devlist->devname, mdfd, readonly);
if (!rv && runstop)
": --incremental --scan meaningless without --run.\n");
break;
}
+ if (devmode == 'f') {
+ fprintf(stderr, Name
+ ": --incremental --scan --fail not supported.\n");
+ break;
+ }
rv = IncrementalScan(verbose);
}
if (!devlist) {
rv = 1;
break;
}
+ if (devmode == 'f') {
+ rv = IncrementalRemove(devlist->devname, verbose-quiet);
+ break;
+ }
rv = Incremental(devlist->devname, verbose-quiet, runstop,
ss, homehost, require_homehost, autof);
break;