summaryrefslogtreecommitdiffstats
path: root/Assemble.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-05-11 15:17:33 +1000
committerNeilBrown <neilb@suse.de>2009-05-11 15:17:33 +1000
commit31015d5798c214ff416ff6ef6e10351944661362 (patch)
tree12cf88aac12757c0ae282b8613cc10be8f86de19 /Assemble.c
parent112cace627b02a7bc918e857cce03b2cc5fc3d52 (diff)
downloadmdadm-31015d5798c214ff416ff6ef6e10351944661362.tar.gz
mdadm-31015d5798c214ff416ff6ef6e10351944661362.tar.xz
mdadm-31015d5798c214ff416ff6ef6e10351944661362.zip
conf/assemble: new config line "auto".
The line 'auto' in mdadm.conf can be used to disable assembly of specific metadata types, or of all arrays. This does not affect assembly of arrays listed in mdadm.conf or on command line. auto -all will disable all auto-assembly. auto -ddf will cause mdadm to ignore ddf arrays that are not explicitly mentioned, and auto assemble anything else it finds. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Assemble.c')
-rw-r--r--Assemble.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Assemble.c b/Assemble.c
index 47b8839..4966a79 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -263,6 +263,13 @@ int Assemble(struct supertype *st, char *mddev,
fprintf(stderr, Name ": no recogniseable superblock on %s\n",
devname);
tmpdev->used = 2;
+ } else if (auto_assem && st == NULL &&
+ !conf_test_metadata(tst->ss->name)) {
+ if (report_missmatch)
+ fprintf(stderr, Name ": %s has metadata type %s for which "
+ "auto-assembly is disabled\n",
+ devname, tst->ss->name);
+ tmpdev->used = 2;
} else if (tst->ss->load_super(tst,dfd, NULL)) {
if (report_missmatch)
fprintf( stderr, Name ": no RAID superblock on %s\n",