Replacing HDD and rebuild linux raid1 with mdadmn

1) fdisk -l Record the partition size 2) watch cat /proc/mdstat Then open other terminal console 3) server1:~# mdadm --manage /dev/md0 --fail /dev/sdb1 server1:~# mdadm --manage /dev/md0 --remove /dev/sdb1 4) server1:~# mdadm --manage /dev/md1 --fail /dev/sdb2 server1:~# mdadm --manage /dev/md1 --remove /dev/sdb2 Repeat 3~4 , if you have /dev/mdX with member /dev/sdbX 5) hdparm -I /dev/sdb |grep Serial To know the problem disk serial number 6) Shutdown and Replace problem HDD (check serial number) , Start back server 7) fdisk /dev/sdb Create the same partition sizes as same as old bad hdd record 8) server1:~# mdadm --manage /dev/md0 --add /dev/sdb1 server1:~# mdadm --manage /dev/md1 --add /dev/sdb2 9) server1:~# watch cat /proc/mdstat Every 2.0s: cat /proc/mdstat Personalities : [raid1] md0 : active raid1 sda1[0] sdb1[1] 24418688 blocks [2/1] [U_] [=>...................] recovery = 9.9% (2423168/24418688) finish=2.8min speed=127535K/sec md1 : active raid1 sda2[0] sdb2[1] 24418688 blocks [2/1] [U_] [=>...................] recovery = 6.4% (1572096/24418688) finish=1.9min speed=196512K/sec

Server is hosted by Alanstudio
Linux Operating System

Recommend screen resolution 1024 x 768 / IE / FireFox
Alan Studio © 2007 by Alan Cheung Hin Lun. All rights reserved.