[lug] hotswap sw raid mirror

dio2002 at indra.com dio2002 at indra.com
Fri Jul 27 02:49:30 MDT 2007


my freshly installed system has 2 hotswap sata bays.

i'm trying to simulate raid failure /recovery situations.

each drive has 3 partitions and all are mdadm sw mirrored with raid 1.

i obviously don't expect to be able to just pull a drive on a running
array and expect that to work.  that's hw raid turf.

but i was thinking that while testing recovery scenarios, i could fail one
device in the mirror, stop the array and then pull the drive while the
system WAS STILL RUNNING versus having to bring it to a shutdown first. 
or not even fail the drive first, just stop the array.  then possibly
install a spare disk (would have to have been partitioned and formatted
correctly prior to insert) and reassemble the array back up and have it
resynch automatically.  is that possible on sw raid?

Basically i'm trying to eliminate shutdown to replace or pull devices in a
degraded or stopped array.

Also, since i have 3 partitions being mirrored and i only have a 2 drive
system, if it's actually possible to do the hotsynch as described above, i
imagine i would need to stop ALL three md mirrors, not just 1 or 2 of the
3 otherwise i could totally trash the arrays?

As i just typed that out, it occurred to me that if i have to stop all the
arrays (and one of them is my root filesystem) i wouldn't have access to
my root filesystem to access mdadm to issue the command in the first
place!

Which would mean i'd have no choice but to shutdown.  At least in my
scenario where i only have 2 drives and root lives on one of the drives
that i'm pulling.

So i may have answered my own question.  But if i had root on a separate
disk, my scenario above might entirely be possible.   i figure it couldn't
hurt to ask if anybody cares to share some knowledge.

Also, assuming you can't hotswap sw raid under any conditions, IF i had
pulled a drive, i'm curious as to the extent of the potential damage. 
Would it:

1) PHYSICALLY destroy / damage either the disk or the system
2) trash the system on the drive without physically damaging the hw
meaning a clean install would have the system up and running again
3) possibly both

thanks




More information about the LUG mailing list