You have a dead disk and it needs replacing. This is going to be done on a CentOS box but it’s pretty distribution none specific.
First, lets have a look at whats dead:
[server ~]# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sdb1[1] sda1[0]
104320 blocks [2/2] [UU]
md2 : active raid1 sdb5[1] sda5[2](F)
226291456 blocks [2/1] [_U]
md1 : active raid1 sdb2[1] sda2[2](F)
10482304 blocks [2/1] [_U]
unused devices: <none>
OK so we can see that sda has failed for both md1 and md2. Lets replace it.
First we need to take sda out of the RAID completely which we do by the following commands:
# First we fail the drive
[server ~]# mdadm –manage /dev/md1 –fail /dev/sda2
# Then we delete it from the RAID
[server ~]# mdadm –manage /dev/md1 –remove /dev/sda2
# And the second and third partitions
[server ~]# mdadm –manage /dev/md0 –fail /dev/sda1
[server ~]# mdadm –manage /dev/md0 –remove /dev/sda1
[server ~]# mdadm –manage /dev/md2 –fail /dev/sda5
[server ~]# mdadm –manage /dev/md2 –remove /dev/sda5
OK so the drive has been removed from the RAID, next we need to setup GRUB on sdb so that it can boot without issue.
# We will set it up on the second HD, sdb.
[server ~]# grub
grub> root (hd1,0)
grub> setup (hd1)
grub> exit
OK, now we’ve grub installed. Shutdown the server and replace sda.
You may need to set the boot sequence in the BIOS to boot the second HD instead of the first.
Once the server comes back online – we need to partition the second HD the same as the first and then reintroduce it back into the array. We do this as follows:
# Copy the partition table from sdb and apply it to sda
[server ~]# sfdisk -d /dev/sdb | sfdisk /dev/sda
# Reintroduce to the array.
[server ~]# mdadm –manage /dev/md0 –add /dev/sda1
[server ~]# mdadm –manage /dev/md1 –add /dev/sda2
[server ~]# mdadm –manage /dev/md2 –add /dev/sda5
Your done!