]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdadm.c
udev-md-raid-assembly.rules: Skip non-ready devices
[thirdparty/mdadm.git] / mdadm.c
diff --git a/mdadm.c b/mdadm.c
index b5ac06113747657723bf71afc081762963e872bb..08ddcabcc7865acfd9726c1758bf2963663bbb9e 100644 (file)
--- a/mdadm.c
+++ b/mdadm.c
@@ -1095,8 +1095,10 @@ int main(int argc, char *argv[])
                                pr_err("bitmap file needed with -b in --assemble mode\n");
                                exit(2);
                        }
-                       if (strcmp(optarg, "internal") == 0) {
-                               pr_err("there is no need to specify --bitmap when assembling arrays with internal bitmaps\n");
+                       if (strcmp(optarg, "internal") == 0 ||
+                           strcmp(optarg, "clustered") == 0) {
+                               pr_err("no need to specify --bitmap when assembling"
+                                       " arrays with internal or clustered bitmap\n");
                                continue;
                        }
                        bitmap_fd = open(optarg, O_RDWR);
@@ -1137,6 +1139,10 @@ int main(int argc, char *argv[])
                case O(CREATE,Bitmap): /* here we create the bitmap */
                case O(GROW,'b'):
                case O(GROW,Bitmap):
+                       if (s.bitmap_file) {
+                               pr_err("bitmap cannot be set twice. Second value: %s.\n", optarg);
+                               exit(2);
+                       }
                        if (strcmp(optarg, "internal") == 0 ||
                            strcmp(optarg, "none") == 0 ||
                            strchr(optarg, '/') != NULL) {