Delete a Linux Software Raid Array

We have a single /dev/md0 raid1 array that is no longer needed.

Stop the array first:

# mdadm --stop /dev/md0

And then remove it:

# mdadm --remove /dev/md0

Zero the superblocks for the array disks:

# mdadm --zero-superblock /dev/xvdh
# mdadm --zero-superblock /dev/xvdi

Wipe out the config file as we don’t have any other arrays on the system:

# > /etc/mdadm/mdadm.conf

Finally, remove from /etc/fstab if any records were there.

Leave a Reply

Your email address will not be published. Required fields are marked *