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 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
  • Debian Ubuntu Mint Howto Create Bridge (br0)
  • How To Control Interface that dhcpd server listens to on Debian based Linux like Mint and Ubuntu
  • LUKS unable to type password to unlock during boot on Debian, Ubuntu and Mint
  • Debian Ubuntu and Linux Mint Broken Kernel After Date - New Extra Module Naming Convention
  • Wordpress overwrites and wipes out custom htaccess rules and changes soluton
  • Apache htaccess and mod_rewrite how to redirect and force all URLs and visitors to the SSL / HTTPS version
  • python 3 pip cannot install mysql module
  • QEMU-KVM won't boot Windows 2016 or 2019 server on an Intel Core i3
  • Virtualbox vbox not starting