[CentOS] how to replace a raid drive with mdadm

Sat May 10 17:29:45 UTC 2014
Dennis Jacobfeuerborn <dennisml at conversis.de>

On 10.05.2014 19:06, Keith Keller wrote:
> On 2014-05-10, CS_DBA <cs_dba at consistentstate.com> wrote:
>>
>> If we loose a drive in a raid 10 array (mdadm software raid) what are 
>> the steps needed to correctly do the following:
>> - identify which physical drive it is
> 
> This is controller dependent.  Some support blinking the drive light to
> identify it, others do not.  If yours does not you need to jury-rig
> something (e.g., either physically label the drive slot/drive, or send
> some dummy data to the drive to get it to blink).
> 

This can also be inverted especially if you cannot send data to the
drive anymore because it dies completely: Create lots of disk i/o with a
command like "grep -nri test /usr" and all drives except the broken one
should show activity.

Another way is to write down the serial numbers of the disks, the slots
you put the disks in and then use hdparm -I /dev/sdX to find which
device shows which serial number. That way once sdX dies you can check
the list to find which slot the disk for the failed device was put in.

Regards,
  Dennis