[Tfug] raid help
John Gruenenfelder
johng at as.arizona.edu
Sun Mar 30 19:04:31 MST 2008
On Sun, Mar 30, 2008 at 06:01:07PM -0700, Ronald Sutherland wrote:
> If bad data gets to the hard drive then never mind, I vote back-up, but
> I still do not see a good reason for mirroring the swap files (other
> than speed). Virtual memory is an extension of main memory, and
> anything going wrong in main memory is grounds for stopping, this is
> indefinitely true. If I assign importance to memory I place my own bits
> as most valuable, system and service bits next, then main memory. I
> care least if main memory is lost. I care more if system or service
> bits are lost, and I will have a shit fit if my stuff is lost. So I try
> to separate these things physically, I have at least 3 drives, 2
> mirrored for my stuff, and one for system and swap. If the system and
> swap die I don't actually care very much, and can recreate it in about
> 1.5hr. The less the swap system is hammering on the stuff I care about,
> the better I feel (does that make sense?).
The purpose of RAID is first to protect the data on disk and second to keep
the machine up. Isn't that correct?
And in the case of RAID1, this protection only works if the drive itself
recognizes an error through parity, CRCs, diagnostics, or whatever.
Fortunately, drives today seem to do a fairly good job of letting the OS know
that something bad has happened. In this case, the OS/controller will know
that particular copy is bad and use the other(s).
In my small fileserver, I've got everything except /boot on RAID1+LVM,
including swap. Swap is necessary, but so unbelievably slow that the extra
layers of indirection don't matter at all. And swap is extremely small
compared to the size of the array that its usage does not impact anything
else.
So why not put swap on the RAID array? If one of the drives dies, the machine
will, in theory, keep running without skipping a beat. If I don't put swap on
the RAID array, then if the disk with swap dies and any swap is in use, then
the machine goes down. If swap isn't in use at the time, then I have a random
window in which to log in and disable swap before anything nasty occurs.
Basically, swap is small and only a poorly designed system would have it in
constant read/write use. I don't see a good reason not to put it on the RAID
array.
--
--John Gruenenfelder Research Assistant, UMass Amherst student
Systems Manager, MKS Imaging Technology, LLC.
Try Weasel Reader for PalmOS -- http://weaselreader.org
"This is the most fun I've had without being drenched in the blood
of my enemies!"
--Sam of Sam & Max
More information about the tfug
mailing list