[Novalug] swap / raid
Roger W. Broseus
rogerb at bronord.com
Thu Mar 19 10:12:59 EDT 2009
I was curious so googled (sp?) "swap raid linux" --
2.3 Swapping on RAID
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.
http://www.linux.com/base/ldp/howto/Software-RAID-HOWTO-2.html
See also:
RAID-1, Part 2
August 14th, 2002 by Joe Edwards, Malmin
<http://www.linuxjournal.com/user/1001244> and Ron Shaker
<http://www.linuxjournal.com/user/1001245> in
* SysAdmin <http://www.linuxjournal.com/taxonomy/term/21>
How to make a RAID-1 swap device and how to boot from a RAID-1 device,
using RAID-1 to facilitate disk backups.
http://www.linuxjournal.com/article/5898
BUT, don't send me no questions: I know less than what I don't know.
--
Roger W. Broseus - Linux User
Email: RogerB at bronord.com
Web Site: www.bronord.com
novalug-request at calypso.tux.org wrote:
Message: 2
Date: Wed, 18 Mar 2009 18:26:55 -0700 (PDT)
From: Brandon Saxe <brandon20va at yahoo.com>
Subject: [Novalug] Any ideas on this weird issue?
To: novalug mailing list <novalug at calypso.tux.org>
Message-ID: <100561.59768.qm at web50811.mail.re2.yahoo.com>
Content-Type: text/plain; charset=us-ascii
I am running Ubuntu 8.04 LTS on my desktop. I am using software RAID1. Every so often X would lock up or crash and reboot. This would happen every 2-3 days. Recently, I added a different disk and moved my swap space there. Ever since the move, X has not crashed once. It's probably been two weeks now and the crash has not occurred. What's interesting is that swap is hardly ever used. I have 3gig RAM. The old swapfile was on the RAID1.
Does anybody have any thoughts as to why moving my swap off of the RAID1 *seems* to have made my system more stable? This is the only thing I can think of that has changed.
Seems weird to me, but with computers I know that just about anything is possible and probably can be explained somehow.
--Brandon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://calypso.tux.org/pipermail/novalug/attachments/20090319/efd866b2/attachment.html
More information about the Novalug
mailing list