[Tfug] raid help

Ronald Sutherland ronald.sutherland at gmail.com
Mon Mar 31 00:45:32 MST 2008


indefinitely = definitely, and my spelling and grammar is bad in general,
lol.

On Sun, Mar 30, 2008 at 7:04 PM, John Gruenenfelder <johng at as.arizona.edu>
wrote:

> 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?


protect is true in my case, but I'm not trying to use it as a tool to keep
the machine alive. In fact if a drive fails I want the machine to stop, but
that may just be me...


>
>
> 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.


Swap adds wear and tare on the drive, I don't want to wear out the drive
I've got important stuff on. Since swap and system access is wearing out the
drive I'd like to keep that isolated in terms of the physical hardware.

This may seem odd but once I've got over 4 years on a HD I try not to use it
for my important data, I also burn in new drives, usually testing new Linux
stuff, but once I got a good idea the drive is OK and is not very old then
thats what I use for my data. The thing that may seem odd is I use the old
drives as my system drive, I really don't give a crap if they die, and I
don't want heavy use of the drives I do care about, which is what many of
the system files get (how may times did the web server load python/php?).

Drives don't just die, they can slow down, or thats what it seems like. The
drive will keep trying to read the data and checking CRC/Parity and pass it
to the computer if its OK, it seems to slow down as the error rate goes up.
One thing I'm not to sure about is if the OS will pick the faster drive more
often, this would tend to cause both to ware to about the same error rate. I
had a few Win 2k servers eat both drives to almost within hours, so that was
a clue about drive failure.

>
>
> 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.
>

I tend to let my file/data server run for months on end, and I have ran
programs on it with memory leaks, so in my case swap was heavily used, I'm
not smart enough to pick programs that don't have those problems, so I play
it safe and assume I've got swap running and possibly wearing the drive.

I do backups, when I feel a need, like now...

This stuff is a big puzzle for me, which I like, but I'm not a trained IT
person, they may have very different reasons for what they do, but that does
not mean I have to by into it. This has me thinking... I'm considering a
cron job to shutdown if I have a bad data drive.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tfug.org/pipermail/tfug_tfug.org/attachments/20080331/b24f6e38/attachment-0002.html>


More information about the tfug mailing list