Removing a software RAID in Fedora

- by

I’ve been playing with various configurations of my software RAID and thought I’d start again from scratch. The obvious question then was, how would I remove my previous efforts? This seems to be different depending on the distribution, so here’s what worked for me in Fedora 33. I’m assuming here that my RAID is /dev/md1.

First we’ll take a look at which drives are currently in use on the existing configuration. We can do that in two ways, either by using

mdadm --detail /dev/md1

or read this file:

cat /proc/mdstat

Make a note of the drives involved. Now we’ll need to stop the array with

mdadm --stop /dev/md1

In Fedora, it appears that this both stops and removes the array. On other distributions the optional “mdadm –remove /dev/md1” is necessary, but not here.

All that remains to be done now is to clean the individual drives of any information.

mdadm --zero-superblock /dev/sdc1 /dev/sdd1 /dev/sdf1

We can specify multiple drives (or rather partitions), all of which remain formatted with “Linux raid autodetect”, ready for the next adventure.

Further Reading



If you enjoy my content, please consider supporting me on Ko-fi. In return you can browse this whole site without any pesky ads! More details here.

Leave a Comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.