]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Assemble.c
mdadm.8: Man page updates
[thirdparty/mdadm.git] / Assemble.c
index 2c52f074dd540ea0fbdda9f3cdae35769cd322d6..963c95d4f72dc1c8384b2e92ead6c70d0bffe0e4 100644 (file)
@@ -188,6 +188,8 @@ int Assemble(struct supertype *st, char *mddev,
        if (!devlist &&
            ident->uuid_set == 0 &&
            ident->super_minor < 0 &&
+           ident->name[0] == 0 &&
+           (ident->container == NULL || ident->member == NULL) &&
            ident->devices == NULL) {
                fprintf(stderr, Name ": No identity information available for %s - cannot assemble.\n",
                        mddev ? mddev : "further assembly");
@@ -515,6 +517,11 @@ int Assemble(struct supertype *st, char *mddev,
            conf_name_is_free(name))
                trustworthy = LOCAL;
 
+       if (trustworthy == LOCAL &&
+           strchr(name, ':'))
+               /* Ignore 'host:' prefix of name */
+               name = strchr(name, ':')+1;
+
        mdfd = create_mddev(mddev, name, ident->autof, trustworthy,
                            chosen_name);
        if (mdfd < 0) {