"/sbin/block detect" reports improper uuid for raid partitions
Username: rdslw
Origin: https://bugs.openwrt.org/index.php?do=details&task_id=1781
This bug is device independent (I think).
As a result of this bug, /etc/config/fstab may contain damaged content, and also block mount may fail.
‘block detect’ reports bad uuid for /dev/sda1 (and others) mixing inside uuid of raid volume with outside of the partitions.
Bug is ‘block detect’ showing the same uuid for /dev/sda1 and /dev/md1 while they are different, as you can observe in /sbin/blkid output at the middle of output below.
Important: /sbin/blkid from busybox may have same/similar bug as its reporting even different uuid. The standalone /usr/sbin/blkid works properly (shown in the middle of below) and should be basis for comparison.
root@bee:/tmp# block detect config 'global' option anon_swap '0' option anon_mount '0' option auto_swap '1' option auto_mount '1' option delay_root '5' option check_fs '0'
config 'mount' option target '/mnt/sda1' option uuid '48f38899-5efb-4477-adca-bf11d81df99f' option enabled '0'
config 'mount' option target '/mnt/sdb1' option uuid '48f38899-5efb-4477-adca-bf11d81df99f' option enabled '0'
config 'mount' option target '/mnt/md1' option uuid '48f38899-5efb-4477-adca-bf11d81df99f' option enabled '0'
root@bee:/tmp# which blkid /usr/sbin/blkid root@bee:/tmp# blkid /dev/mtdblock5: TYPE="squashfs" /dev/sda1: UUID="8b2d137c-4973-133d-6de4-7e91c4a4cdb0" TYPE="linux_raid_member" PARTUUID="f6eb912c-6ef7-4b8b-90d7-3ccc4e05d0c3" /dev/sdb1: UUID="8b2d137c-4973-133d-6de4-7e91c4a4cdb0" TYPE="linux_raid_member" PARTUUID="731a8023-5734-463e-8866-46ea97a3f928" /dev/md1: LABEL="OVERLAYROOT" UUID="48f38899-5efb-4477-adca-bf11d81df99f" TYPE="ext4"
root@bee:/tmp# /sbin/blkid /dev/md1: LABEL="OVERLAYROOT" UUID="48f38899-5efb-4477-adca-bf11d81df99f" TYPE="ext4" /dev/sda1: UUID="7c132d8b-3d13-7349-917e-e46db0cda4c4" TYPE="linux_raid_member" /dev/sdb1: UUID="7c132d8b-3d13-7349-917e-e46db0cda4c4" TYPE="linux_raid_member"