For the past few years I’ve had a software raid array using mdadm. It works great.
And then I upgraded my kernel+mdadm last night; it broke. I was puzzled:
Do some reading and some more reading. Do some poking around to see where things stand. No dice.
fdisk -l was showing a /dev/dm-0 device. Never seen that before. More digging. Hmm,
dmraid -r is listing my drives. Why? Try removing them…
dmsetup remove_all Still no good.
So tonight I dive back into the fray. Eventually decide to see exactly what the output of
dmraid -r is indicating about those drives. Turns out that back when I originally created the array (several computers ago at this point) I was using a software BIOS RAID…with dmraid. The metadata was still there, and for whatever reason after all these years (two releases of debian had passed!) it suddenly starts reading that metadata again and usurping control of my drives.
dmraid -r -E to nuke the unneeded and mischievous metadata. Back in business.
TLDR: If your non-dmraid, mdadm RAID is suddenly borked, check to see if it’s got some crufty dmraid metadata stuck on there. If so, erase it.