Zombie /dev/md that won't go away...how to kill it

Kent Borg kentborg-KwkGvOEf1og at public.gmane.org
Thu Apr 2 15:00:16 EDT 2009


I am a big fan of software raid 1.  A while back I glued together a
several raid 1 /dev/md's using raid 0 into a new larger /dev/md.

And then I didn't need it, and I forget what I did, but it didn't quite
go away.  The larger raid 0 md didn't seem to exist, but the little raid
1 md's thought they were busy.  I wanted the larger md again, and it
wasn't there--but I couldn't create it because part of the system
thought it was there.

It seems that the raid system leaves little metadata notes for itself,
and each of the little md's had an idea it was part of a larger md, yet
the larger one didn't exist.  I tried to use mdadm to
"--zero-superblock", but it wouldn't because it thought the little md's
and raw partitions were busy (having read the superblock and configuring
itself).

I finally managed to clear its brains:

 - run fdisk and change the partition type for the partitions that were
part of the little md's.
 - reboot, raid system doesn't look at these partitions.
 - run mdadm --zero-superblock on the raw disk partitions.
 - run fdisk and change the partition type back to raid.
 - reboot
 - use the partitions as I please...

There must have been a "correct" way to do this, but I couldn't figure
it out.  And, I am thinking I should have done a direct raid 10, but the
speccing of how the component partitions are put together is not obvious
and the internet is not awash with clear examples; get it wrong and the
raid 1 parts can be across different partitions on a single disk, losing
all the redundancy.

-kb






More information about the Discuss mailing list