Admittedly I'm not too familiar with MDADM. I recently set up an array for a NAS, but incorrectly sized the partitions in my setup script, and need to remove the array, re-partition the disks, and re-create the array.
In my Googling, I found the following process to delete an mdadm array:
# mdadm --stop /dev/md0 # mdadm --remove /dev/md0 # mdadm --zero-superblock ( /dev/sda /dev/sdb ... ) However, I get the following output:
sudo mdadm --stop /dev/md0 mdadm: stopped /dev/md0 sudo mdadm --remove /dev/md0 mdadm: error opening /dev/md0: No such file or directory Then, if I attempt to format the drives, parted returns an error and the array re-appears in /proc/mdstat.
I've tried just running mdadm --remove /dev/md0 to no avail as well.
Any help with the issue would be appreciated.
1 Answer
After some more digging, I found the combination of commands that fixed the issue:
sudo mdadm --stop /dev/md0 sudo mdadm --zero-superblock /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1