RE: Software RAID

From: Leif Sawyer <lsawyer@gci.com>
Date: Wed Sep 27 2006 - 09:11:55 AKDT

Yay, top post!
I've got 3 boxes raid'ing. two are software raid, and one is hardware raid.

The hardware-raid box (mirrored drives) obviously has swap on raid.

The software-raid boxen (mirrored -partitions-) does not have swap on raid.

I've had disks fail in the middle of working. I've never had the
system crash, tho. I may have been lucky in that the processes
that might have been swapped out to raid have never been critical.

I still don't see a benefit to swap-on-sw-raid, tho, just due to the
large amount of overhead, and the fact that I gain resources by
letting the kernel stripe across multiple swap partitions.

> -----Original Message-----
> From: aklug-bounce@aklug.org [mailto:aklug-bounce@aklug.org]
> On Behalf Of Damien Hull
> Sent: Tuesday, September 26, 2006 5:43 PM
> To: aklug@aklug.org
> Subject: Re: Software RAID
>
> I just checked my CentOS file server (NFS). I configured it
> with RAID 1 and LVM. Swap is not only on the RAID set but
> it's part of an LVM.
> I have never had any problems with this setup in the past.
>
>
> Anthony Valentine wrote:
> > Probably. I've always put my swap partition on a RAID 1
> mirror when doing software raid. You may lose a little
> performance, but if you lose half your swap while you are
> running, then you will probably crash. I suppose that if all
> you are using raid for is to protect your data (or speed your
> system with a striped set) then that may not be a big deal
> for you, but if you are doing RAID for redundancy, then you
> may want to consider putting your swap on a RAID 1 partition.
> >
> > The software raid how-to, located here
> (http://tldp.org/HOWTO/Software-RAID-HOWTO-2.html) has this
> to say on the topic:
> >
> > There's no reason to use RAID for swap performance reasons.
> The kernel itself can stripe swapping on several devices, if
> you just give them the same priority in the /etc/fstab file.
> >
> > A nice /etc/fstab looks like:
> >
> > /dev/sda2 swap swap defaults,pri=1 0 0
> > /dev/sdb2 swap swap defaults,pri=1 0 0
> > /dev/sdc2 swap swap defaults,pri=1 0 0
> > /dev/sdd2 swap swap defaults,pri=1 0 0
> > /dev/sde2 swap swap defaults,pri=1 0 0
> > /dev/sdf2 swap swap defaults,pri=1 0 0
> > /dev/sdg2 swap swap defaults,pri=1 0 0
> >
> > This setup lets the machine swap in parallel on seven SCSI
> devices. No need for RAID, since this has been a kernel
> feature for a long time.
> >
> > 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 a RAID-1 device would
> solve this problem.
> >
> > There has been a lot of discussion about whether swap was
> stable on RAID devices. This is a continuing debate, because
> it depends highly on other aspects of the kernel as well. As
> of this writing, it seems that swapping on RAID should be
> perfectly stable, you should however stress-test the system
> yourself until you are satisfied with the stability.
> >
> > 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.
> >
> >
> >
> >
> > On Tue, 26 Sep 2006 15:40:03 -0800, Damien Hull
> <dhull@digitaloverload.net> wrote:
> >
> >> What happens when drive /dev/sda goes bad?
> >>
> >> Everything in swap on /dev/sda is gone. Will the system crash?
> >>
> >>
> >> Adam Bultman wrote:
> >>
> >>> NOOO!!!
> >>>
> >>> Swap goes on Swap. You do NOT set up swap on software RAID.
> >>>
> >>> You take say, hda1 and make it type fd, and you make hda2
> type swap.
> >>> You take say, hdb1 and make it type fd, and you make hdb2
> type swap.
> >>>
> >>> Then, in /etc/fstab, you specify the swap partitions on both.
> >>>
> >>> If you put swap on a RAID1 setup, you'll nuke performance
> and that's
> >>>
> >> what
> >>
> >>> you need with swap.- it'll be syncing every single write
> to swap, and
> >>>
> >> swap
> >>
> >>> isn't somethingyou need to make redundant. Just make
> enough swap on each
> >>> drive and mount 'em anyway. If it dies, it dies.
> >>>
> >>>
> >>> Adam
> >>>
> >>> On Tue, 26 Sep 2006, Damien Hull wrote:
> >>>
> >>>
> >>>
> >>>> Does swap need to be on a RAID partition?
> >>>>
> >>>> I'm doing software RAID 1 on Ubuntu Dapper. I couldn't
> get it to work
> >>>> the first time. The screen says I need to reboot :-) . Maybe it's
> >>>> working now.
> >>>> ---------
> >>>> To unsubscribe, send email to <aklug-request@aklug.org>
> >>>> with 'unsubscribe' in the message body.
> >>>>
> >>>>
> >>>>
> >>>>
> >>> ---------
> >>> To unsubscribe, send email to <aklug-request@aklug.org>
> >>> with 'unsubscribe' in the message body.
> >>>
> >>>
> >>>
> >> ---------
> >> To unsubscribe, send email to <aklug-request@aklug.org>
> >> with 'unsubscribe' in the message body.
> >>
> > --
> > Anthony Valentine
> >
> >
> > UNIX was not designed to stop you from doing stupid things,
> because that would also stop you from doing clever things.
> >
> > ---------
> > To unsubscribe, send email to <aklug-request@aklug.org>
> > with 'unsubscribe' in the message body.
> >
> >
>
> ---------
> To unsubscribe, send email to <aklug-request@aklug.org>
> with 'unsubscribe' in the message body.
>
>

-- Binary/unsupported file stripped by Ecartis --
-- Type: application/x-pkcs7-signature
-- File: smime.p7s

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Wed Sep 27 09:12:11 2006

This archive was generated by hypermail 2.1.8 : Wed Sep 27 2006 - 09:12:11 AKDT