summaryrefslogtreecommitdiffstats
path: root/mdassemble.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-05-11 15:17:05 +1000
committerNeilBrown <neilb@suse.de>2009-05-11 15:17:05 +1000
commit112cace627b02a7bc918e857cce03b2cc5fc3d52 (patch)
tree0cb29269fa3c3f625e6666ccf9ad26cb94ef7dc6 /mdassemble.c
parent745f72f61ab363dbc1c19fd00cc29edc42571f62 (diff)
downloadmdadm-112cace627b02a7bc918e857cce03b2cc5fc3d52.tar.gz
mdadm-112cace627b02a7bc918e857cce03b2cc5fc3d52.tar.xz
mdadm-112cace627b02a7bc918e857cce03b2cc5fc3d52.zip
config: support "ARRAY <ignore> ..." lines in mdadm.conf
Sometimes we want to ensure particular arrays are never assembled automatically. This might include an array made of devices that are shared between hosts. To support this, allow ARRAY lines in mdadm.conf to use the word "ignore" rather than a device name. Arrays which match such lines are never automatically assembled (though they can still be assembled by explicitly giving identification information on the mdadm command line. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdassemble.c')
-rw-r--r--mdassemble.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mdassemble.c b/mdassemble.c
index 2b955c5..e2baf05 100644
--- a/mdassemble.c
+++ b/mdassemble.c
@@ -100,6 +100,8 @@ int main(int argc, char *argv[]) {
} 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 */