Mdadm- remove md0

I have an xcp-ng server that I had 3 drives in Zraid. One of the drives if removed, but the other 2 are still showing as part of raid 5. I have attempted to stop the raid, fail the drive to get rid of the md0, but it keeps telling me md0 doesn’t exist. but when I cat /proc/mdstat is shows the md0.

I’m just trying to remove the md0 and move on, but can’t figure this out. Attached are 3 screenshots of what is visible .

Thank you for any assistance.

Screenshot 2024-05-12 120803
Screenshot 2024-05-12 120515
Screenshot 2024-05-12 115757

Post text, not screen shots as it’s easier to parse.

Here is a write up on how to delete mdadm raid:

Yeah, @LTS_Tom 's Medium link will do the trick, but just to clarify: the mdadm --fail and --remove options are for raid member devices, not mdX devices themselves.

So in your scenario, first assure nothing is mounted or using /dev/md0, such as an LVM Physical Volume, then simply run:

mdadm --stop /dev/md0
mdadm --zero-superblock /dev/sda /dev/sdc

If you don’t zero the superblocks or wipefs or similar, mdadm will likely spot and spin up md0 again on restart.

Also check /etc/mdadm.conf and remove/comment the ARRAY /dev/md0 ... line if present.

Thank you, I will give that a shot.

Apologies on the image attachment, I will work on that any time in the future.

I love your forum, it is always very helpful just as the videos.

1 Like