match = array_list;
}
+ if (match && match->devname
+ && strcasecmp(match->devname, "<ignore>") == 0) {
+ if (verbose >= 0)
+ fprintf(stderr, Name ": array containing %s is explicitly"
+ " ignored by mdadm.conf\n",
+ devname);
+ return 1;
+ }
+
/* 3a/ if not, check for homehost match. If no match, continue
* but don't trust the 'name' in the array. Thus a 'random' minor
* number will be assigned, and the device name will be based
strcpy(chosen_name, mp->path);
} else {
- /* Check in mdadm.conf for devices == devname and
+ /* Check in mdadm.conf for container == devname and
* member == ra->text_version after second slash.
*/
char *sub = strchr(ra->text_version+1, '/');
break;
}
+ if (match && match->devname &&
+ strcasecmp(match->devname, "<ignore>") == 0) {
+ if (verbose > 0)
+ fprintf(stderr, Name ": array %s/%s is "
+ "explicitly ignored by mdadm.conf\n",
+ match->container, match->member);
+ return 2;
+ }
+
mdfd = create_mddev(match ? match->devname : NULL,
ra->name,
autof,
struct state *st;
if (mdlist->devname == NULL)
continue;
+ if (strcasecmp(mdlist->devname, "<ignore>") == 0)
+ continue;
st = malloc(sizeof *st);
if (st == NULL)
continue;
mis.member = NULL;
for (w=dl_next(line); w!=line; w=dl_next(w)) {
- if (w[0] == '/') {
+ if (w[0] == '/' || strcasecmp(w, "<ignore>") == 0) {
if (mis.devname)
fprintf(stderr, Name ": only give one device per ARRAY line: %s and %s\n",
mis.devname, w);
exit(1);
}
for (; array_list; array_list = array_list->next) {
+ if (array_list->devname &&
+ strcasecmp(array_list->devname, "<ignore>") == 0)
+ continue;
if (array_list->autof == 0)
array_list->autof = autof;
may be the name of the device where the array is normally
assembled, such as
.BR /dev/md1 .
+Alternately the word
+.B <ignore>
+(complete with angle brackets) can be given in which case any array
+which matches the rest of the line will never be automatically assembled.
If no device name is given,
.I mdadm
will use various heuristic to determine an appropriate name.
} else
for (; array_list; array_list = array_list->next) {
mdu_array_info_t array;
+ if (strcasecmp(array_list->devname, "<ignore>") == 0)
+ continue;
mdfd = open_mddev(array_list->devname, 0);
if (mdfd >= 0 && ioctl(mdfd, GET_ARRAY_INFO, &array) == 0) {
rv |= Manage_ro(array_list->devname, mdfd, -1); /* make it readwrite */