Busybox's blkid and Util-linux blkid disagree about UUIDs of softraid devices
Alpine 3.16.2 standard ISO used to install on a VM using BIOS, 2 disks provided and "USE_RAID=1 setup-disk -m sys /dev/sda /dev/sdb" uses on create /boot, swap, and / on top of software RAID1. As BIOS is in use the Alpine installer uses Syslinux, which has a dependancy on the "blkid" package (Util-linux's blkid).
After installion and reboot notice 2 entries in /dev/disk/by-uuid which appear to be a result of Busybox's blkid (used by mdev/persistent-storage in the initramfs) and Util-linux's blkid (used by mdev/persistent-storage in rootfs) reporting differing UUIDs for /dev/sda1, /dev/sdb1.
Output of (util-linux's) blkid:
# blkid
/dev/sda3: UUID="69a7217e-42a2-eacd-f85d-b521ae83ebdd" UUID_SUB="d5bd6d3e-9c00-c273-6e98-64e00bfe0711" LABEL="waffle:2" TYPE="linux_raid_member" PARTUUID="3f10e60e-03"
/dev/sdb2: UUID="b9f26310-032e-e9b1-e6ab-c2591ef09995" UUID_SUB="bc5ec3f0-e89c-90e5-70bc-61d26d364fd1" LABEL="waffle:1" TYPE="linux_raid_member" PARTUUID="5542d69c-02"
/dev/sda1: UUID="cad9b576-5669-3da8-febf-243c217ef642" TYPE="linux_raid_member" PARTUUID="3f10e60e-01"
/dev/sdb3: UUID="69a7217e-42a2-eacd-f85d-b521ae83ebdd" UUID_SUB="ed7cc048-c546-6a10-024e-2b5ec69c5395" LABEL="waffle:2" TYPE="linux_raid_member" PARTUUID="5542d69c-03"
/dev/sda2: UUID="b9f26310-032e-e9b1-e6ab-c2591ef09995" UUID_SUB="98f9168d-586d-10cd-3b6d-cb1fca75b1f2" LABEL="waffle:1" TYPE="linux_raid_member" PARTUUID="3f10e60e-02"
/dev/sdb1: UUID="cad9b576-5669-3da8-febf-243c217ef642" TYPE="linux_raid_member" PARTUUID="5542d69c-01"
/dev/md2: UUID="525176d9-00ce-4607-a8cb-c1b8f669ef5a" BLOCK_SIZE="1024" TYPE="ext4"
/dev/md0: UUID="a545af26-4b4b-4166-9179-c2c3e6303a8a" BLOCK_SIZE="1024" TYPE="ext4"
/dev/md1: UUID="222ff9bc-a503-4fe3-a628-fbdd97703ae6" TYPE="swap"
Output of (busybox's) blkid:
# busybox blkid
/dev/md2: UUID="525176d9-00ce-4607-a8cb-c1b8f669ef5a" TYPE="ext4"
/dev/md1: UUID="222ff9bc-a503-4fe3-a628-fbdd97703ae6" TYPE="swap"
/dev/md0: UUID="a545af26-4b4b-4166-9179-c2c3e6303e8a" TYPE="ext4"
/dev/sdb1: UUID="76b5d9ca-a83d-6956-3c24-bffe42f67e21" TYPE="linux_raid_member"
/dev/sda1: UUID="76b5d9ca-a83d-6956-3c24-bffe42f67e21" TYPE="linux_raid_member"
So util-linux's blkid reports the UUID of /dev/sda1 and /dev/sdb1 as "cad9b576-5669-3da8-febf-243c217ef642" whereas busybox's blkid report their UUID as "76b5d9ca-a83d-6956-3c24-bffe42f67e21".
Util-linux's blkid UUID for sda1/sdb1 matches the UUID of /dev/md0 in mdadm.conf:
# cat /etc/mdadm.conf
ARRAY /dev/md0 metadata=0.90 UUID=cad9b576:56693da8:febf243c:217ef642
ARRAY /dev/md1 metadata=1.2 name=waffle:1 UUID=b9f26310:032ee9b1:e6abc259:1ef09995
ARRAY /dev/md2 metadata=1.2 name=waffle:2 UUID=69a7217e:42a2eacd:f85db521:ae83ebdd
Additional background info:
# cat /proc/dmstat
Personalities: [raid1]
md2 : active raid1 sdb3[1] sda3[0]
288768 blocks super 1.2 [2/2] [UU]
md1 : active (auto-read-only) raid1 sdb2[1] sda2[0]
130048 blocks super 1.2 [2/1] [U_]
md0 : active raid1 sdb1[1] sda1[0]
102336 blocks [2/2] [UU]
unused device: <none>
# mdadm --misc --detail /dev/md0 | grep -i uuid
UUID: cad9b576:56693da8:febf243c:217ef642 (local to host waffle)
# mdadm --misc --detail /dev/md1 | grep -i uuid
UUID: b9f26310:032ee9b1:e6abc259:1ef09995 (local to host waffle)
# mdadm --misc --detail /dev/md2 | grep -i uuid
UUID: 69a7217e:42a2eacd:f85db521:ae83ebdd (local to host waffle)
# tune2fs -l /dev/sda1 |grep -i uuid
Filesystem UUID: a545af26-4b4b-4166-9179-c2c3e6303e8a
# tune2fs -l /dev/sdb1 |grep -i uuid
Filesystem UUID: a545af26-4b4b-4166-9179-c2c3e6303e8a
End result is that /dev/disk/by-uuid is populated with 2 entries for sda1/sdb1 UUID rather than a single one. The "76b5d9ca-a83d-6956-3c24-bffe42f67e21" would be populated by mdev/persistent-storage running in the initramfs, and then later in the boot the "cad9b576-5669-3da8-febf-243c217ef642" entry would be populated by mdev/persistent-storage running from the rootfs.
/dev/disk/by-uuid:
total 0
lrwxrwxrwx 1 root root 10 Oct 6 17:44 76b5d9ca-a83d-6956-3c24-bffe42f67e21 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Oct 6 17:44 cad9b576-5669-3da8-febf-243c217ef642 -> ../../sdb1
So either util-linux's or busybox's are wrong. I am assuming that this is a Busybox bug in its blkid implementation (which also, as seen above, seems to have a limitation (relating to v1.2 softraid devices?) where it does not show entries for sda2, sda3, sdb2, sdb3 in its output).