Ubuntu - Remove Mdadm RAID Array

If you need to reconfigure your mdadm RAID array, then it is probably easies to destroy it and then rebuild a new one. The following steps will show you how to destroy your existing mdadm RAID array.

WARNING: Make sure to move all of your data off the array before proceeding.


Stop the RAID array so that you can operate on it.

sudo mdadm --stop /dev/md0  

Query your arrays to find out what disks are contained using

sudo mdadm --detail /dev/md0  

Zero the superblock FOR EACH drive (or use gparted to delete the partitions if you have a GUI)

sudo mdadm --zero-superblock /dev/sdx  
sudo mdadm --zero-superblock /dev/sdy  

You may also want to move your mdadm config to a backup file just in case.

sudo mv /etc/mdadm/mdadm.conf /etc/mdadm/mdadm.conf.bak  




Stuart is a software developer with a passion for Linux and open source projects.

comments powered by Disqus
We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites. More info.