Question: I have CentOS 5.8 on my computer, with 5x 1TB hard drives.

I used software RAID. (RAID 1 as a boot partition md0, RAID 0 as a root partition md1 and RAID 5 as /home partition md3).

Unfortunately one of these hard drives failed lately and I want to replace it with a new one.

I want to know that is it possible to change this hard drive without data loss?

The important partition is RAID 5 so in theory if one of hard drives failed I should be able to recover its data without any problem. But in practice how can I do that?

Answer: 
The folks at this location actually mapped the serial numbers of the physical disks to separate names to help identify those in the RAID array. They used UDEV rules for it. This eliminates the guesswork since serial numbers are typically written on the disk paper labels.

In the below link you'll find real 2 drive failure on a RAID6 setup (+) and recovery. Take a look. You might be able to identify in a similar way which drive you need to unplug.

Regards,

[RAID 6 + XFS + MDADM](http://www.microdevsys.com/WordPress/2012/04/02/linux-htpc-home-backup-mdadm-raid6-lvm-xfs-cifs-and-nfs/3/)

[RAID 6 UDEV Naming](http://www.microdevsys.com/WordPress/2012/04/01/linux-persistent-naming-of-sata-devices-through-udev-rules/)
It should be something like

```
mdadm --add /dev/md3 /dev/<disk>

```

… where `<disk>` is of the form `sda1`, `sdb1`, `sdc1`, etc.