I found no way to remove a mdraid from a server with one command.
I can stop it via mdadm --stop /dev/md0
But the superblock is still in the devices.
mdadm --zero-superblock DEVICE
needs every device (like /dev/sdb1)
I know that I can do mdadm --detail /dev/md0
and then I see the devices.
I could write a fragile script to fetch the /dev/sd... strings from the output of mdadm --detail /dev/md0
, but I would like to avoid this.
Is there a one-liner to remove the superblock from all devices of a mdraid?
I would like to avoid to parse the output of mdadm --detail
, since this feels fragile.