Use UUID and label of SWRaid arrays too (#756829)
In cases where blkid wrongly reports a file system instead of an SWRaid member (sometimes confused by metadata 0.90/1.0 mirror array or old version not recognising SWRaid members), the UUID and label are obviously wrong too. Therefore have to use the UUID and label returned by the mdadm query command and never anything reported by blkid or any file system specific command. Example of blkid reporting the wrong type, UUID and label for /dev/sda1 and the correct values for /dev/sdb1: # blkid | egrep 'sd[ab]1' /dev/sda1: UUID="10ab5f7d-7d8a-4171-8b6a-5e973b402501" TYPE="ext4" LABEL="chimney-boot" /dev/sdb1: UUID="15224a42-c25b-bcd9-15db-60004e5fe53a" UUID_SUB="0a095e45-9360-1b17-0ad1-1fe369e22b98" LABEL="chimney:1" TYPE="linux_raid_member" # mdadm -E -s -v ARRAY /dev/md/1 level=raid1 metadata=1.0 num-devices=2 UUID=15224a42:c25bbcd9:15db6000:4e5fe53a name=chimney:1 devices=/dev/sda1,/dev/sdb1 ... ARRAY /dev/md127 level=raid1 num-devices=2 UUID=8dc7483c:d74ee0a8:b6a8dc3c:a57e43f8 devices=/dev/sdb6,/dev/sda6 ... NOTES: * In mdadm terminology the label is called the array name, hence name= parameter for array md/1 in the above output. * Metadata 0.90 arrays don't support naming, hence the missing name= parameter for array md127 in the above output. Bug 756829 - SWRaid member detection enhancements
parent
0ce98573
Please register or sign in to comment