In my server there's an mdadm RAID-1 array consisting of two SATA disks, named sdb and sdc. The sdb disk might fail soon (according to SMART data), and I want to replace it with a newly bought disk. The solution at https://unix.stackexchange.com/a/104052 sounds good for copying contents from the failing disk to the new one without stressing the remaining good disk too much (essentially the new disk is added as spare, then all data is copied from sdb to the spare).
Unfortunately the server only has two SATA ports, so I'd like to attach the new disk via a USB-SATA adapter for the copy operation, and later attach it to the SATA port.
But I guess this way the new disk will first get a name like /dev/sdd when attached via USB, and when I disconnect the failing disk and connect the new disk via SATA the new disk will be named /dev/sdb. Will the RAID software cope with this gracefully? Or will this confuse the RAID array? Will it cause an unnecessary rebuild of the array? And if so, what would be a better way to perform this procedure?
This is on Debian 7 (Wheezy), with Linux 3.2 and mdadm 3.2.5.
mdadm
works with disks UUIDS on its later versions, so it's not important which device they are on. So, for this question, the answer is: No, there is no problem if your system is newer than 5 years ago.