I had a fully working server.
I booted with SystemRescueCD, without writing anything. I didn't even mounted a partition. Then rebooted the server.
The server no longer boot correctly because some partitions don't mount.

I see this is because the RAID partitions are not named as before.
/dev/md1 became /dev/md126
and /dev/md2 became /dev/127

I know how to rename a md device:

mdadm --stop /dev/126
mdadm --assemble --verbose --update=super-minor /dev/md1 /dev/sda6 /dev/sdb6
mount /dev/md1 /mnt/
echo 'dummy' > /mnt/dummy   # to be sure the kernel updates the superblock. See manpage

After that, the md1 device is okay... until I reboot.
After reboot it is returned to /dev/md126

Question 1: what's the magic behind the fact SystemRescueCD changed that ?
Question 2: what can I do to rename those md device as I want ?

  • If you can use UUIDs instead of /dev names for question 2 do that, because they won't change until you reformat the partition. – goldilocks Feb 16 '13 at 15:27

I don't know exactly how it can be possible, but I had a similar problem.
step 1: rename the md devices
step 2: update the initramfs
or step 2: remove the md device definition into mdadm.conf inside initramfs (will be overwritten on next kernel update)

Note /etc/mdadm/mdadm.conf is only used by mdadm. Not by mkinitramfs, not by kernel autodetection, nothing else. Never tested, but I think we can delete this file wihtout any impact on the system.

But inside initramfs, the /etc/mdadm/mdadm.conf is used to name the md devices. So you have to keep it up-to-date when you build-rebuils-change-delete your raid configuration.
This is weird because the kernel autodetection works well.

| improve this answer | |
  • 1
    Thanks, it works! I still wonder how SystemRescueCD did the mess, because the UUID are the same in the current md devices than in the untouched mdadm.conf. But the old initramfs contains bad UUIDs (probably old ones). So how the system started correcly before ? I don't understand something. – Gregory MOUSSAT Feb 16 '13 at 16:45

Make sure it is listed correctly in /etc/mdadm.conf and update your initramfs. The high numbers are auto assigned to arrays that aren't known in mdadm.conf.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.