diff options
author | NeilBrown <neilb@suse.de> | 2013-05-15 03:03:25 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2013-05-15 03:03:25 +0200 |
commit | eca944fa9ca52b24d0aa4d1034066bbd148e529a (patch) | |
tree | 79cb8cf17254de953ea67aaafa5e5e2790cb0ea7 /config.c | |
parent | Incremental: remove partitions when assembling. (diff) | |
download | mdadm-eca944fa9ca52b24d0aa4d1034066bbd148e529a.tar.xz mdadm-eca944fa9ca52b24d0aa4d1034066bbd148e529a.zip |
create_mddev: add support for /dev/md_XXX non-numeric names.
With the 'devnm' infrastructure fixed, it is quite easy to support
names like "md_home" for md arrays.
The currently defaults to "off" and can be enabled in mdadm.conf with
CREATE names=yes
This is incase other tools get confused by the new names.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -219,6 +219,7 @@ struct mddev_dev *load_containers(void) struct createinfo createinfo = { .autof = 2, /* by default, create devices with standard names */ .symlinks = 1, + .names = 0, /* By default, stick with numbered md devices. */ #ifdef DEBIAN .gid = 6, /* disk */ .mode = 0660, @@ -334,6 +335,10 @@ static void createline(char *line) createinfo.symlinks = 1; else if (strncasecmp(w, "symlinks=no", 11) == 0) createinfo.symlinks = 0; + else if (strncasecmp(w, "names=yes", 12) == 0) + createinfo.names = 1; + else if (strncasecmp(w, "names=no", 11) == 0) + createinfo.names = 0; else { pr_err("unrecognised word on CREATE line: %s\n", w); |