All of lore.kernel.org
 help / color / mirror / Atom feed
* Swap on RAID1?
@ 2003-10-13 22:12 Hermann Himmelbauer
  2003-10-13 22:20 ` Thomas Horsten
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Hermann Himmelbauer @ 2003-10-13 22:12 UTC (permalink / raw)
  To: Linux RAID

Hi,
I am considering putting my Swap on a RAID1.

I am aware that using 2 seperate Swap-Spaces without RAID would probably speed 
things up as Linux distributes the swap.

But what happens if a disk fails and the swap is on this disk? I assume Linux 
would crash? Wouldn't a swap on a RAID prevent such a crash?

		Best Regards,
		Hermann

-- 
x1@aon.at
GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9  4902 64B4 D16B 2998 93C7


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Swap on RAID1?
  2003-10-13 22:12 Swap on RAID1? Hermann Himmelbauer
@ 2003-10-13 22:20 ` Thomas Horsten
  2003-10-13 23:05 ` Matti Aarnio
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Horsten @ 2003-10-13 22:20 UTC (permalink / raw)
  To: Hermann Himmelbauer, Linux RAID

On Monday 13 October 2003 23:12, Hermann Himmelbauer wrote:

> I am considering putting my Swap on a RAID1.
>
> I am aware that using 2 seperate Swap-Spaces without RAID would probably
> speed things up as Linux distributes the swap.
>
> But what happens if a disk fails and the swap is on this disk? I assume
> Linux would crash? Wouldn't a swap on a RAID prevent such a crash?

It would, and if the hardware RAID is well implemented it'll probably spread the swap better than Linux could.

Kind regards,

Thomas


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Swap on RAID1?
  2003-10-13 22:12 Swap on RAID1? Hermann Himmelbauer
  2003-10-13 22:20 ` Thomas Horsten
@ 2003-10-13 23:05 ` Matti Aarnio
  2003-10-13 23:25 ` Paul Clements
  2003-10-14  8:48 ` Gordon Henderson
  3 siblings, 0 replies; 5+ messages in thread
From: Matti Aarnio @ 2003-10-13 23:05 UTC (permalink / raw)
  To: Hermann Himmelbauer; +Cc: Linux RAID

On Tue, Oct 14, 2003 at 12:12:33AM +0200, Hermann Himmelbauer wrote:
> Hi,
> I am considering putting my Swap on a RAID1.
> 
> I am aware that using 2 seperate Swap-Spaces without RAID would
> probably speed things up as Linux distributes the swap.

Actually the swap-out will be slightly SLOWER, than without RAID-1.

However I do use RAID-1 setup extensively in my machines even with
this slow-down of writing to disks (must write to two disks!).
I want to have the added RELIABILITY benefit.

> But what happens if a disk fails and the swap is on this disk?
> I assume Linux would crash? Wouldn't a swap on a RAID prevent
> such a crash?

You will see messages telling that MDnn carrying your swap has
failed to write to one of the disks, and is now running in
degraded mode.  The system will continue to function just fine.
(Until your last RAID-1 sub-disk fails ...)

Actually I tested that "fail a disk -> observe RAID-1 manage it"
just the other day at one machine I am builting presently.

As important as having runtime reliability, I consider bootup
reliability.  Standard bios bootup picks up a disk (or fails),
which can suck major way.

On a hunch (reading kernel driver sources) I did buy HighPoint
RocketRaid card (RR-1520 to be precise), which actually is
_software_raid_, e.g. it is simple two channel Serial-ATA
interface, but with BIOS understanding its own RAID-labels,
and knowing which disks form my bootable RAID-1.

The HighPoint allows machine to boot with degraded disks,
however it does that by demanding operator intervention,
which I am not entirely happy with when considering
systems running at remote sites doing their things...
(Compare with Sun SPARCs booting autonomously.)

Oh yes.  I didn't use HPTRAID as it is in 2.4.22 kernel,
as that doesn't have code to handle disk offlineness.
I allocated lowest cylinder for HPT BIOS raid label
(actually that is mere 512 byte block, not needing
a megabyte or whatever my "cylinder" became), and
then placed usual auto-detect RAID (partition type FD)
slices on the rest of the disk, bound slices in between
two disks with RAID-1 to become my /boot, swap, and root.

> 		Best Regards,
> 		Hermann
> -- 
> x1@aon.at

/Matti Aarnio

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Swap on RAID1?
  2003-10-13 22:12 Swap on RAID1? Hermann Himmelbauer
  2003-10-13 22:20 ` Thomas Horsten
  2003-10-13 23:05 ` Matti Aarnio
@ 2003-10-13 23:25 ` Paul Clements
  2003-10-14  8:48 ` Gordon Henderson
  3 siblings, 0 replies; 5+ messages in thread
From: Paul Clements @ 2003-10-13 23:25 UTC (permalink / raw)
  To: Hermann Himmelbauer; +Cc: Linux RAID

Hermann Himmelbauer wrote:

> But what happens if a disk fails and the swap is on this disk? I assume Linux
> would crash? Wouldn't a swap on a RAID prevent such a crash?

Yes and yes. One other possible alternative would be to fork out the
money for more RAM rather than a second disk for swap. And just don't
use swap, if you're worried about swap crashing the system...and
performance will be much better, too.

--
Paul

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Swap on RAID1?
  2003-10-13 22:12 Swap on RAID1? Hermann Himmelbauer
                   ` (2 preceding siblings ...)
  2003-10-13 23:25 ` Paul Clements
@ 2003-10-14  8:48 ` Gordon Henderson
  3 siblings, 0 replies; 5+ messages in thread
From: Gordon Henderson @ 2003-10-14  8:48 UTC (permalink / raw)
  To: Hermann Himmelbauer; +Cc: Linux RAID

On Tue, 14 Oct 2003, Hermann Himmelbauer wrote:

> Hi,
> I am considering putting my Swap on a RAID1.
>
> I am aware that using 2 seperate Swap-Spaces without RAID would probably
> speed things up as Linux distributes the swap.
>
> But what happens if a disk fails and the swap is on this disk? I assume
> Linux would crash? Wouldn't a swap on a RAID prevent such a crash?

It works for me. I even have it on RAID5 on some servers I manage.

Swap is no substitute for memory though - if you are worried about swap
speed, then get more memory.

Gordon

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-10-14  8:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-13 22:12 Swap on RAID1? Hermann Himmelbauer
2003-10-13 22:20 ` Thomas Horsten
2003-10-13 23:05 ` Matti Aarnio
2003-10-13 23:25 ` Paul Clements
2003-10-14  8:48 ` Gordon Henderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.