It's been a while since I did this.  A search on google gives http://www.tcpdump.com/kb/os/linux/removing-failed-raid-devices.html which seems right. 


The commands (you will have to adjust it for your configuration) would be:

mdadm /dev/md0 --fail /dev/sdc1
This will fail the suspect drive (if not already).

mdadm /dev/md0 --remove /dev/sdc1
This will remove the drive from the array.

mdadm /dev/md0 --add /dev/sdc1
This adds the drive back into the array.  It will then resync the failed drive.  You can see this by doing cat /proc/mdstat:

# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md0 : active raid5 sdc1[1] sdb1[0] sdd1[2]
8385664 blocks level 5, 64k chunk, algorithm 2 [3/2] [U_U]
[=========>...........]  recovery = 47.8% (2007428/4192832) finish=0.5min speed=62732K/sec

unused devices: 


 


--- 
Wayne Johnson,                         | There are two kinds of people: Those 
3943 Penn Ave. N.          | who say to God, "Thy will be done," 
Minneapolis, MN 55412-1908 | and those to whom God says, "All right, 
(612) 522-7003                         | then,  have it your way." --C.S. Lewis



>________________________________
> From: Mike Miller <mbmiller+l at gmail.com>
>To: Wayne Johnson <wdtj at yahoo.com>; TCLUG Mailing List <tclug-list at mn-linux.org> 
>Sent: Monday, April 2, 2012 10:38 AM
>Subject: Re: [tclug-list] fixing a RAID1 after drive failure
> 
>On Mon, 2 Apr 2012, Wayne Johnson wrote:
>
>> On Mon, 2 Apr 2012, Mike Miller wrote:
>> 
>>> Suppose one drive failed in my RAID1 mirrored pair.  Can I then simply pull the bad drive, replace it with a good one (brand new), and have it work?  Will it just automagically rebuild the RAID1 by mirroring onto the new drive?
>>> 
>>> This is Ubuntu software RAID1.
>> 
>> Actually, in my experience, the drive may not have a permement failue.  You can re-activate the drive again, it will resync the failed drive, and you are running again.  If it happens too frequently, replace the drive. 
>
>How do I reactivate a drive?  That sounds like a great idea.
>
>Mike
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mn-linux.org/pipermail/tclug-list/attachments/20120402/2871c3b7/attachment.html>