Add a new disk to an array, possibly replacing a failed one:
mdadm --add /dev/md0 /dev/sdb1
ls -l /dev/disk/by-partuuid/
returns:
lrwxrwxrwx 1 root root 10 Sep 4 14:49 526e2405-0124-4baa-805f-335369588ddd -> ../../sda1 lrwxrwxrwx 1 root root 10 Sep 4 14:49 5d426ea0-5795-4165-863d-1ed947dc77fd -> ../../sda2 lrwxrwxrwx 1 root root 10 Sep 4 14:49 8e53314c-0814-46cd-9f13-c2bb2b7a14b6 -> ../../sdb1 lrwxrwxrwx 1 root root 10 Sep 4 14:49 90412d26-ebec-4996-96d6-a7a6c702e57e -> ../../sdc1
mdadm /dev/md0 --add /dev/disk/by-partuuid/90412d26-ebec-4996-96d6-a7a6c702e57e
returns:
mdadm: added /dev/disk/by-partuuid/90412d26-ebec-4996-96d6-a7a6c702e57e
mdadm --detail /dev/md0
returns:
NOTE: It reports /dev/sdc1 instead of the UUID.
This is not a problem.
mdadm allows disks to be moved around freely in the machine, regardless of how you add the disk to the array.