Why does mdadm have two sets of UUID's?

Which one does the OS care about?  blkid says the UUID is "787f1fa4-b010-4d77-a010-795b42884f56" while md insists its UUID is "4d96dd3b:deb5d555:7adb93cb:ce9182d9"

When in doubt, do we assume the OS takes the one from blkid? 

/dev/md0: UUID="787f1fa4-b010-4d77-a010-795b42884f56" TYPE="ext3"
[root@localhost ~]# mdadm -D /dev/md0
/dev/md0:
        Version : 0.90
  Creation Time : Fri May 28 15:48:07 2010
     Raid Level : raid1
     Array Size : 307202816 (292.97 GiB 314.58 GB)
  Used Dev Size : 307202816 (292.97 GiB 314.58 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Mon May 31 05:23:48 2010
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : 4d96dd3b:deb5d555:7adb93cb:ce9182d9
         Events : 0.4

    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       1       8       17        1      active sync   /dev/sdb1

 

The real answer about the two sets of UUIDs

The blkid UUID above "787f1fa4-b010-4d77-a010-795b42884f56" is the correct one, that is what the OS will use to find the RAID array.

But mdadm has it's own "internal" UUID which is not used directly by the OS and is what you use in the mdadm.conf file eg:

ARRAY /dev/md0 level=raid1 num-devices=2 uuid=ffb40f02:91eebca2:cf946fc5:a655d98e
ARRAY /dev/md1 level=raid1 num-devices=2 uuid=0d4ae4bf:1b435759:c8f99160:83b906ee

This is another silly thing that programmers do without the implications of.  mdadm shouldn't call anything UUID when it is separate from the one that blkid and the OS recognize.  Maybe it should be called mduuid or something else to avoid confusion.


Tags:

mdadm, uuid, os, blkid, quot, fa, md, insists, dd, deb, adb, cb, ce, dev, ext, localhost, creation, fri, raid, array, gib, gb, devices, preferred, persistence, superblock, persistent, update, active, raiddevice, sync, sda, sdb, uuids, conf, eg, num, ffb, eebca, cf, fc, ae, bf, ee, programmers, implications, shouldn, mduuid, confusion,

Latest Articles

  • ImageMagick Convert PDF Not Authorized
  • ImageMagick Converted PDF to JPEG some files have a black background solution
  • Linux Mint Mate Customize the Lock screen messages and hide username and real name
  • Ubuntu/Gnome/Mint/Centos How To Take a partial screenshot
  • ssh how to verify your host key / avoid MIM attacks
  • Cisco IP Phone CP-8845 8800/8900 Series How To Reset To Factory Settings Instructions
  • ls how to list ONLY directories
  • How to encrypt your SSH private key file id_rsa
  • Linux Mint 18 Disable User Name List from showing on Login Screen
  • Firefox Cannot Hit Enter Key In Address Bar and Location History Not Working
  • Cisco Unified Communications Manager / CUCM IP 8.6,10,12 Install Error Solution
  • Ubuntu Debian Mint Linux SSHD OpenSSH Server Not Starting After Reboot Solution
  • nmap how to scan for all ports and not just the 1000 most common ports
  • Windows 7,8,10 and Server 2008, 2012, 2016, 2019 Read Only Attribute Won't Go Away
  • bind / named how to make a wildcard record and retain defined A records
  • Cisco Unified Communications Manager 12 Install Errors on Proxmox/KVM
  • Local Vs Universally Administered MAC Address NIC Refuses to come up
  • Cisco Unified Communications Manager 12 CUCM 12 - How To Enable Video Calling
  • Windows 7, 8, 10, Windows Server 2008, 2012, 2016, 2019 How To AC97 Audio Drivers and Other Unsigned Drivers
  • Cisco Unified Communications Manager / CUCM IP Telephony Definitions