On Fri, Feb 03, 2006 at 07:21:33AM -0600, Steve Swantz wrote:
> On 2/2/06, Josh Trutwin <josh at trutwins.homeip.net> wrote:
> >
> > Any thoughts on this issue?  I had assumed that putting swap in the
> > RAID and having one partition (say /dev/md2) as the swap partition was
> > the way to go but some netizens argue that this is a performance
> > problem and that if one drive goes bad it'll still boot ok even though
> > one of the swap partitions is dead.
> >
> 
> I'm more interested in the machine staying up (as opposed to just booting
> up) if one of the swap drives dies, so I put swap on a RAID 1 partition. My
> server is lightly loaded, and I may not be able to get to it fix it for
> several days at a time, so staying up is most important to me than absolute
> maximum swap performance.

There are two issues to worry about here, and I believe you may be
getting incorrect information here.  

First, if you swap on a non-mirrored volume and that volume fails,
you'll likely crash.  Creating swap files on non-mirrored drives will
allow you to boot but not keep you up in the event of a drive failure.

Secondly, it's important to note that swap and normal file system
operations aren't the same thing.  If you need to swap and the software
mirror goes away, you may not recover anyway.  What I've been told is
that swapping is done at a layer that will not survive a drive failure.
Doing some googling, though, I see that this was an issue in 2002 and it
might actually be stable now.

Personally, I wouldn't worry about any potential performance problems
when swapping.  Swapping sucks anyway.  Buy memory :-).  There's no
point in having excellent performance if your system is flat down with a
busted swap drive.

-- 
Ed Wilts, RHCE
Mounds View, MN, USA
mailto:ewilts at ewilts.org
Member #1, Red Hat Community Ambassador Program