summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-05-15 01:58:47 +0000
committerNeil Brown <neilb@suse.de>2006-05-15 01:58:47 +0000
commita99d6b669c4dbe7f9609c720c9f114e278b4388b (patch)
treef7863b7768a45950e7f3e87aabd797af7ca295c9
parentd1732eebaca58830d3c9e76a5c42a0622510a424 (diff)
downloadmdadm-a99d6b669c4dbe7f9609c720c9f114e278b4388b.tar.gz
mdadm-a99d6b669c4dbe7f9609c720c9f114e278b4388b.tar.xz
mdadm-a99d6b669c4dbe7f9609c720c9f114e278b4388b.zip
Assume "DEVICE partitions" if no DEVICE line present.
This means the output of "mdadm -Es" can be used as a complete mdadm.conf file .... if you really want to do that. Signed-off-by: Neil Brown <neilb@suse.de>
-rw-r--r--ChangeLog1
-rw-r--r--config.c6
-rw-r--r--mdadm.conf.52
3 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 64b760a..28e6240 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@ Changes Prior to this release
emails can be explicitly set.
- Arrange that SparesMissing (which is similar in import to
DegradedArray) generates an Email.
+ - Assume "DEVICE partitions" if no DEVICE line is given.
Changes Prior to 2.4.1 release
- Honour --write-mostly when adding to an array without persistent
diff --git a/config.c b/config.c
index b1f51d9..0388b5e 100644
--- a/config.c
+++ b/config.c
@@ -569,7 +569,11 @@ mddev_dev_t conf_get_devs(char *conffile)
}
load_conffile(conffile);
-
+
+ if (cdevlist == NULL)
+ /* default to 'partitions */
+ dlist = load_partitions();
+
for (cd=cdevlist; cd; cd=cd->next) {
if (strcasecmp(cd->name, "partitions")==0 && dlist == NULL)
dlist = load_partitions();
diff --git a/mdadm.conf.5 b/mdadm.conf.5
index f96476c..56a5444 100644
--- a/mdadm.conf.5
+++ b/mdadm.conf.5
@@ -61,6 +61,8 @@ but only the major and minor device numbers. It scans
.I /dev
to find the name that matches the numbers.
+If no DEVICE line is present, then "DEVICE partitions" is assumed.
+
For example:
.IP
DEVICE /dev/hda* /dev/hdc*