Re: Software RAID

From: Damien Hull <dhull@digitaloverload.net>
Date: Tue Sep 26 2006 - 17:39:46 AKDT

Thanks for the info. I'll do a reinstall and put swap on a raid device.
I can't have this thing crashing on me. I'm thinking that this should
all be done using hardware RAID. Software RAID hasn't failed me yet.
However, it's a lot more complex then hardware RAID.

I'll have to look into a two port 3ware SATA RAID card.

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.
Received on Tue Sep 26 17:37:45 2006

This archive was generated by hypermail 2.1.8 : Tue Sep 26 2006 - 17:37:45 AKDT