mdadm: Disk configuration by UUID
You first create the RAID5 device and then use the UUID of it in your mdadm.conf, not the UUID for a filesystem:
# mdadm --detail /dev/md0
/dev/md0:
Version : 1.2
....
Name : enterprise:0 (local to host enterprise)
UUID : 7d2bf7e5:dc6edd5c:3ca12e46:8c9e5d4b
Events : 48
Number Major Minor RaidDevice State
So I have a mdadm.conf
of
ARRAY /dev/md/0 metadata=1.2 UUID=7d2bf7e5:dc6edd5c:3ca12e46:8c9e5d4b name=enterprise:0
Use the entries in /dev/disk/by-id
to reference the parts of the RAID. For example:
/dev/disk/by-id/ata-ST9320423AS_5VH56VSB
First create your desired raid array with mdadm command. As soon as this is done you will have a UUID for the md. Then you can create a mdadm.conf with
mdadm --examine --scan > /etc/mdadm.conf
Verify later on with ls -l /dev/disk/by-uuid/