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

  • Cisco Unified Communication Manager (CUCM) - How To Add Phones
  • pptp / pptpd not working in DD-WRT iptables / router
  • systemd-journald high memory usage solution
  • How to Install FreePBX in Linux Debian Ubuntu Mint Guide
  • How To Install Cisco's CUCM (Cisco Unified Communication Manager) 12 Guide
  • Linux Ubuntu Redhat How To Extract Images from PDF
  • Linux and Windows Dual Boot Issue NIC Won't work After Booting Windows
  • Cisco CME How To Enable ACD hunt groups
  • How to install gns3 on Linux Ubuntu Mint
  • How to convert audio for Asterisk .wav format
  • Using Cisco CME Router with Asterisk as a dial-peer
  • Cisco CME How To Configure SIP Trunk VOIP
  • Virtualbox host Only Network Error Failed to save host network interface parameter - Cannot change gateway IP of host only network
  • Cisco CME and C7200 Router Testing and Learning Environment on Ubuntu 20+ Setup Tutorial Guide
  • Abusive IP ranges blacklist
  • How to Install Any OS on a Physical Drive from Windows Using VMware Workstation (Linux, Windows, BSD)
  • CDN Cloudflare how to set and preserve the real IP of the client without modifying application code on Apache
  • CentOS 7 fix Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=container error was 14: curl#6 -
  • Ubuntu Debian How To Install Recommended Packages Automatically
  • How to set Linux Ubuntu Redhat Debian Command Line http https socks proxy for yum apt