According to Mr. Luca Berra -- [EMAIL PROTECTED], swapping on RAID is not
safe. This is an excerpt of our discussion on the list just recently, I'm
the one starting, commenting on a regular swap setup with several non-RAID
swap partitions:

> > > > Alright, but this approach is still vulnerable to a disk crash. I
one of the
> > > > disks currently used for swapping goes down, the machine goes with
it. At
> > > > least according to Jacobs HOWTO... Maybe it's a question of choosing
between
> > > > swap speed and stability. In my case it's more important that the
machine
> > > > can suffer a disk failure without going down.
> > > sorry, but swap-on-raid is not stable.
> > > raid uses the buffer cache,
> > > swap does not
> > > result: when your swap partition is resyncing, due to disk failure or
> > > unclean shutdown swap gets corruppted.
> > Is this a fact even when using a swapfile? That's what I do. No swap
> yes, sorry.

Below is an excerpt from The Software-RAID HOWTO, section 2.4:

<<END_QUOTE
Another reason to use RAID for swap is high availability. If you set up a
system to boot on eg. a RAID-1 device, the system should be able to survive
a disk crash. But if the system has been swapping on the now faulty device,
you will for sure be going down. Swapping on the RAID-1 device would solve
this problem.

With the newer RAID patches, swapping on RAID should now be safe. Previously
swap on RAID was unsafe because of possible (and likely) deadlock
situations, but this should be fixed now.

You can set up RAID in a swap file on a filesystem on your RAID device, or
you can set up a RAID device as a swap partition, as you see fit. As usual,
the RAID device is just a block device.
END_QUOTE

As I see it, either the HOWTO is wrong, Mr Berra is wrong, or I'm not really
understanding what the HOWTO is saying. In the first case it would be good
to correct/expand the HOWTO, in the other cases I would be very happy for a
clarification from Mr. Ostergaard or any other authority on RAID. I'm
currently using a swapfile on a RAID-5 device since I assumed this would
offer the best protection from a disk crash.

Most grateful for your responses and clarification!

/Johan Ekenberg

Reply via email to