From 112cace627b02a7bc918e857cce03b2cc5fc3d52 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Mon, 11 May 2009 15:17:05 +1000 Subject: config: support "ARRAY ..." 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 --- mdassemble.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mdassemble.c') diff --git a/mdassemble.c b/mdassemble.c index 2b955c5b..e2baf055 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, "") == 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 */ -- cgit v1.2.3