Managing an MD Device
Removing and Adding an MD Mirror Component Disk
Example
To remove a failed MD component disk from /dev/md0, run the following command:
# mdadm –-remove /dev/md0 /dev/hpdev/sde
Following is an example of the status message that is displayed when a failed component is removed from the MD array:
[root@dlhct1 dev]# cat /proc/mdstat Personalities : [raid1]
md0 : active raid1 sdf[0] 9766784 blocks [2/1] [U_] unused devices: <none>
Adding a Mirror Component Device
As mentioned earlier, in certain failure scenarios, you need to remove a failed mirror disk component, repair it and then add it back into an MD array. Run the following command to add a mirror component back into the MD array:
# mdadm -
<md_mirror_component_persistent_name>
Example
# mdadm - -add /dev/md0 /dev/hpdev/sde
Following is an example of the status message displayed in the /proc/mdstat file once the disk is added:
Personalities : [raid1]
md0 : active raid1 sde[2] sdf[0] 9766784 blocks [2/1] [U_]
[=> | ] recovery = 8.9% (871232/9766784) finish=2.7min |
speed=54452K/sec |
|
unused devices: <none> |
|
102 | Appendix A |