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 to install Windows or other OS and then bring to another computer by using a physical drive and Virtual Machine with QEMU
  • PXE-E23 Error BOOTx64.EFI GRUB booting is 0 bytes tftp pxe dhcp solution NBP filesize is 0 Bytes
  • vagrant install on Debian Mint Ubuntu Linux RHEL Quick Setup Guide Tutorial
  • RHEL 8 CentOS 8, Alma Linux 8, Rocky Linux 8 System Not Booting with RAID or on other servers/computers Solution for dracut and initramfs missing kernel modules
  • How to Upgrade to Debian 11 from Version 8,9,10
  • Ubuntu Linux Mint Debian Redhat Cannot View Files on Android iPhone USB File Transfer Not Working Solution
  • Virtualbox Best Networking Mode In Lab/Work Environment without using NAT Network or Bridged
  • debootstrap how to install Ubuntu, Mint, Debian install
  • Linux grub not using UUID for the root device instead it uses /dev/sda1 or other device name solution
  • How To Restore Partition Table on Running Linux Mint Ubuntu Debian Machine
  • Debian Ubuntu apt install stop daemon questions/accept the default action without prompting
  • iptables NAT how to enable PPTP in newer Debian/Ubuntu/Mint Kernels Linux
  • Grandstream Phone Vulnerability Security Issue Remote Backdoor Connection to 207.246.119.209:3478
  • Linux How to Check Which NIC is Onboard eth0 or eth1 Ubuntu Centos Debian Mint
  • VboxManage VirtualBox NAT Network Issues Managment Troubleshooting
  • Dell PowerEdge Server iDRAC Remote KVM/IP Default Username, Password Reset and Login Information Solution
  • Nvidia Tesla GPUs K40/K80/M40/P40/P100/V100 at home/desktop hacking, cooling, powering, cable solutions Tutorial AIO Solutions
  • Stop ls in Linux Debian Mint CentOS Ubuntu from applying quotes around filenames and directory names
  • Thunderbird Attachment Download Error Corrupt Wrong filesize of 29 or 27 bytes Solution
  • Generic IP Camera LAN Default IP Settings DVR