Hot-swap drive got new name. If I add it back to the `md` array and it gets renamed on reboot, will the array still work?
It's fine to go ahead and add it as /dev/sdc
. Reading through the kernel md
documentation, if the name changes on reboot, it doesn't matter. (Good design, that.) Here's why:
Boot time autodetection of RAID arrays
When md is compiled into the kernel (not as module), partitions of type 0xfd are scanned and automatically assembled into RAID arrays. This autodetection may be suppressed with the kernel parameter "raid=noautodetect". As of kernel 2.6.9, only drives with a type 0 superblock can be autodetected and run at boot time.
The kernel parameter "raid=partitionable" (or "raid=part") means that all auto-detected arrays are assembled as partitionable.
Although I didn't have md
compiled into the kernel, my setup does the same thing as the above because it's auto-loading mdadm
and the mdadm.conf
is set up to scan all partitions for a superblock just like the kernel would:
# by default, scan all partitions (/proc/partitions) for MD superblocks. # alternatively, specify devices to scan, using wildcards if desired. DEVICE partitions
So it's fine to rebuild the array with /dev/sdc
; the name probably will change to /dev/sda
on reboot, but that won't cause any trouble if md
is set up as above.