JP Vossen on 13 Jun 2011 21:01:25 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] Hot-swapping Linux RAID1 (was Re: Computer case)


On 06/13/2011 12:51 PM, plug-request@lists.phillylinux.org wrote:
Date: Mon, 13 Jun 2011 12:51:46 -0400
From: Julien Vehent<julien@linuxwall.info>

  I've never tried hot swapping sata drives used in a linux soft raid.
  Might be an interesting experience though:)

I have not tried this, but I'd *guess* that if you use 'mdadm' appropriately, it would be fine. YMMV!

Before:
	mdadm --manage $RAID --fail $DISK
	mdadm --manage $RAID --remove $DISK

After hot-swap:
	sfdisk -d $GOOD_DISK | sfdisk $BAD_DISK
	mdadm --manage $RAID --add $DISK

One of the tricks is to get "$RAID" & "$DISK" right. 'cat /proc/mdstat' can help. And you may need to loop though the mdadm commands if you've got multiples of anything.

See http://www.kernelhardware.org/replacing-failed-raid-drive/ for more info.

Let us know if this works,  :-)
JP
----------------------------|:::======|-------------------------------
JP Vossen, CISSP            |:::======|      http://bashcookbook.com/
My Account, My Opinions     |=========|      http://www.jpsdomain.org/
----------------------------|=========|-------------------------------
"Microsoft Tax" = the additional hardware & yearly fees for the add-on
software required to protect Windows from its own poorly designed and
implemented self, while the overhead incidentally flattens Moore's Law.
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug