[CentOS] Re: Replacing failed software RAID drive

Scott Silva ssilva at sgvwater.com
Mon Oct 8 19:36:52 UTC 2007

on 10/8/2007 6:03 AM Tony Mountifield spake the following:
> In article <47098D7B.9020104 at gmail.com>,
> Les Mikesell <lesmikesell at gmail.com> wrote:
>> The only tricky part is what happens to the drive names if you boot with 
>> /dev/sda broken (depending on the failure mode) or missing.  If the 
>> controller doesn't see it, all of the other drive names will shift up. 
>> This normally won't affect md device detection, but you may have a non 
>> md device mentioned in /etc/fstab, especially for swap devices.
> I normally put swap on a /dev/mdN device too. I have seen different people
> say you should and you shouldn't, but my reasoning is this: if I have swap
> just on raw partitions, e.g. /dev/sda2 and /dev/sdb2, what happens if a
> drive dies while running programs are partly swapped out to the failed
> drive? I expect at least that the programs would die, and at worst I might
> get a kernel panic.
> But if I am swapping to /dev/md2 that contains /dev/sda2 and /dev/sdb2 in
> a RAID1 mirror, the swapped-out data is preserved on a drive failure, and
> the programs should be able to keep running.
> Swapping to /dev/mdN certainly seems to work fine, but I haven't yet had
> a drive failure to test!
> Cheers
> Tony
When I use software raid I always use a mirrored swap partition. It is a 
little slower, but if you lose a drive, the system won't boink.
Otherwise, the system will panic if it can't get back from the swap. Of course 
the best way it to have enough memory that you don't need swap.

MailScanner is like deodorant...
You hope everybody uses it, and
you notice quickly if they don't!!!!

More information about the CentOS mailing list