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

  • How high can a Xeon CPU get?
  • bash fix PATH environment variable "command not found" solution
  • Ubuntu Linux Mint Debian Redhat Youtube Cannot Play HD or 4K videos, dropped frames or high CPU usage with Nvidia or AMD Driver
  • hostapd example configuration for high speed AC on 5GHz using WPA2
  • hostapd how to enable and use WPS to connect wireless devices like printers
  • Dell Server Workstation iDRAC Dead after Firmware Update Solution R720, R320, R730
  • Cloned VM/Server/Computer in Linux won't boot and goes to initramfs busybox Solution
  • How To Add Windows 7 8 10 11 to GRUB Boot List Dual Booting
  • How to configure OpenDKIM on Linux with Postfix and setup bind zonefile
  • Debian Ubuntu 10/11/12 Linux how to get tftpd-hpa server setup tutorial
  • efibootmgr: option requires an argument -- 'd' efibootmgr version 15 grub-install.real: error: efibootmgr failed to register the boot entry: Operation not permitted.
  • Apache Error Won't start SSL Cert Issue Solution Unable to configure verify locations for client authentication SSL Library Error: 151441510 error:0906D066:PEM routines:PEM_read_bio:bad end line SSL Library Error: 185090057 error:0B084009:x509 certif
  • Linux Debian Mint Ubuntu Bridge br0 gets random IP
  • redis requirements
  • How to kill a docker swarm
  • docker swarm silly issues
  • isc-dhcp-server dhcpd how to get longer lease
  • nvidia cannot resume from sleep Comm: nvidia-sleep.sh Tainted: Linux Ubuntu Mint Debian
  • zfs and LUKS how to recover in Linux
  • [error] (28)No space left on device: Cannot create SSLMutex Apache Solution Linux CentOS Ubuntu Debian Mint