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

  • 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