Strange Behavior From Software RAID

Home » CentOS » Strange Behavior From Software RAID
CentOS 4 Comments

Somewhere, mdadm is cacheing information. Here is my /etc/mdadm.conf file:

more /etc/mdadm.conf
# mdadm.conf written out by anaconda DEVICE partitions MAILADDR root array /dev/md0 level=raid1 num-devices=4 metadata=0.90 UUIDUff58b2:0abb5bad:42911890:5950dfce ARRAY /dev/md1 level=raid1 num-devices=2 metadata=0.90 UUID15eaf5c:776c85bd:5fa8189c:68a99382
ARRAY /dev/md2 level=raid1 num-devices=2 metadata=0.90 UUID[017f95:b7e266cc:f17a7611:8b752a02
ARRAY /dev/md3 level=raid1 num-devices=2 metadata=0.90 UUIDLc310ee:60201e16:c7017bd4:9feea350
ARRAY /dev/md4 level=raid1 num-devices=2 metadata=0.90 UUID

4 thoughts on - Strange Behavior From Software RAID

  • Here I am following up on my own post…

    It occurred to me that all of this stuff must be magic.

    How does it work when the mdadm.conf file is on a raid/LVM volume which is not available at boot time?

    I looked in the /boot filesystem, the only one which is available at boot time and there is nothing there, unless this data is actually saved in one of the kernel modules or other binary files…


  • You can usually generate a new mdadm.conf using:

    rm /etc/mdadm.conf mdadm –detail –scan >> /etc/mdadm.conf

  • “RAID set” is a better term. The term “volume group” describes components of the LVM system, which is not directly related to md raid.

    Well, md125 is the other half of md1. Check which of those two devices has the correct data. Destroy the other, then add that partition to the remaining RAID device.

    I think you’ll need to do two things. First, automatically-detected RAID sets get an automatic minor number assigned. That number is stored in the RAID metadata, so if you want to change it, you’ll need to manually update the metadata. I think that’s done by:
    mdadm –stop /dev/md127
    mdadm –assemble /dev/md2 –update=super-minor /dev/sdd3 /dev/sdb3

    As Maxim suggested, you may also need to re-build your initrd.

    As always, make sure you have backups first.