mdadm force/fix proper md127 name

I have an md0 arary that my Centos install refers to.  I feel this is half the reason why it won't boot anymore.

I saw the initrd for Centos was assembling it as md127 even though it was known as md0.

The reason for this is because I used mdadm --assemble --scan to detect the array on a LiveCD.  I had no idea this name would stick (but now I realize the name is permanently stored in the metadata once you mount md127 or whatever random name assemble gives it).  Why can't mdadm read the metadata first and assemble it is as the correct name?  This will kill a live server if you access the RAID array using the scan/assemble mode, the server won't boot again until you take the corrective/action/solution below!

So back in my LiveCD I forced it to go back to md0 (now initrd reports it as md0 since doing this):

Solution - Manually Assemble the md device with the correct name and mount it

mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1

*Note that you must actually mount the md device for it to keep the new name.

I think mdadm should store some information about the name of the device and default to the original md device even if it was assembled by some LiveCD as md127.

This is one of many things that make me question how practical and well thought out mdadm really is.


Tags:

mdadm, md, namei, arary, centos, install, refers, initrd, assembling, assemble, scan, detect, array, livecd, permanently, stored, metadata, mount, server, raid, mode, corrective, manually, dev, sda, sdb, default, assembled,

Latest Articles

  • Linux Ubuntu Cannot Print Large Images
  • Cannot Print PDF Solution and Howto Resize
  • Linux Console Login Screen TTY Change Message
  • Apache Cannot Start Listening Already on 0.0.0.0
  • MySQL Bash Query to pipe input directly without using heredoc trick
  • CentOS 6 and 7 / RHEL Persistent DHCP Solution
  • Debian Ubuntu Mint rc-local service startup error solution rc-local.service: Failed at step EXEC spawning /etc/rc.local: Exec format error
  • MySQL Cheatsheet Guide and Tutorial
  • bash script kill whois or other command that is running for too long
  • Linux tftp listens on all interfaces and IPs by DEFAULT Security Risk Hole Solution
  • python import docx error
  • Cisco Unified Communications Manager Express Cheatsheet CUCME CME
  • Linux Ubuntu Debian Missing privilege separation directory: /var/run/sshd
  • bash how to count the number of columns or words in a line
  • bash if statement how to test program output without assigning to variable
  • RTNETLINK answers: Network is unreachable
  • Centos 7 how to save iptables rules like Centos 6
  • nfs tuning maximum amount of connections
  • qemu-kvm error "Could not initialize SDL(No available video device) - exiting"
  • Centos 7 tftpd will not work with selinux enabled