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

Re: Software raid OK?



When the date was Monday 20 April 2009, Sam Kuper wrote:

> Michael,
>
> 2009/4/20 Michael Iatrou <m.iatrou@freemail.gr>
>
> > When the date was Monday 20 April 2009, Douglas A. Tutty wrote:
> > > On Mon, Apr 20, 2009 at 03:29:00PM +0300, Michael Iatrou wrote:
> > > > There is no particularly good reason to have the swap on RAID. You
> > > > should define three independed swap partitions; if disk fails,
> > > > kernel will use the other available.
> > >
> > > If swap fails, what happens if something important to the running of
> > > the system (not just a user app) is swapped-out?  I've seen advice on
> > > this list many times that to avoid a crash, if other system stuff is
> > > on raid, that swap should be as well.
> >
> > I cannot confirm that; instead I am assuming a workflow like the
> > following:
> >
> > 1. A disk is about to fail
> > 2. Notification from SMART hits sysadmin's mailbox
> > 3. # swapoff /dev/sdXY
> > 4. Replace disk, create partitions
> > 5. # swapon /dev/sdXY
> > 6. # mdadm /dev/mdK -a /dev/sdXZ
>
> If the system is running unattended - for instance if it's a server being
> run by a hobbyist, which doesn't have a sysadmin permanently available to
> respond to problems - then step 3 may not occur before the disk fails. In
> this scenario, isn't Douglas right that it's better to have the swap on
> (redundant) RAID?

I don't think there is a silver bullet for this.

There is a performance penalty related to soft-RAID. Also swappiness 
configuration must be taken into account. Physical memory and memory usage 
patterns from application perspective count too. And of course the required 
availability for the application is an important factor.

All I am saying is that when thorough evaluation of parameters like the 
above is out of scope, there is probably no good reason to have swap on 
RAID.

-- 
 Michael Iatrou


Reply to: