]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Assemble.c
Remove partitions from components of an md array
[thirdparty/mdadm.git] / Assemble.c
index 5acb076caf01cec617d31a2d71f095f0583fe650..e8fec8e954cb19868351768d2630eb6163b27205 100644 (file)
@@ -421,6 +421,8 @@ int Assemble(struct supertype *st, char *mddev, int mdfd,
                        }
                        dfd = dev_open(devname, O_RDWR|O_EXCL);
 
+                       remove_partitions(dfd);
+
                        if (super) {
                                free(super);
                                super = NULL;
@@ -460,6 +462,8 @@ int Assemble(struct supertype *st, char *mddev, int mdfd,
                        int dfd;
                        dfd = dev_open(devname, O_RDWR|O_EXCL);
 
+                       remove_partitions(dfd);
+
                        if (super) {
                                free(super);
                                super = NULL;