Amanda-Users

Re: Tape and disk mirror configuration

2003-01-29 22:16:56
Subject: Re: Tape and disk mirror configuration
From: "John R. Jackson" <jrj AT purdue DOT edu>
To: mbrkic AT farelogix DOT com
Date: Wed, 29 Jan 2003 21:45:41 -0500
>I have seen a number of suggetstions that it is
>possible to configure the rait driver to mirror
>backups to disk and tape.  ...

That should be do-able.

>Is there anyone out there that has this going that
>can post their exact config and procedures? 

I'm not doing this locally, only during debugging (*), but the theory
goes like this.

The RAIT syntax usually looks something like this:

  rait:/dev/rmt/{0,1,2,3,4}n

The code parses that and expands the stuff in the curly braces so it
ends up using:

  /dev/rmt/0n
  /dev/rmt/1n
  /dev/rmt/2n
  /dev/rmt/3n
  /dev/rmt/4n

Now, the beauty of this is, the parsing code doesn't care where the
curly braces are.  And the second bit of magic is that the RAIT code
calls the generic "open a tape output driver" code for each item, not
the low level OS open() call.

So you can put any other type of output device you want inside a RAIT
specification (I think I even tried nesting a RAIT inside another RAIT
once, just for the heck of it).  If you want to use the following two
devices as a mirror:

  tape:/dev/rmt/0n
  file:/amanda/online/backups

you would set tapedev to:

  rait:{tape:/dev/rmt/0n,file:/amanda/online/backups}

(the "tape:" may be omitted since that's the default driver).

The only other thing you need to remember is that the tapetype length
value is a hard limit for the "file:" driver.  If you set it to, say,
10 GBytes, then when /amanda/online/backups gets to 10 GBytes it will
report an error back upline to emulate end of tape.  If you're using
tapes that hold 20 GBytes, they will only be half utilized since an
error on any device during RAIT processing closes all of the devices.

Does that help?

>Milos

John R. Jackson, Technical Software Specialist, jrj AT purdue DOT edu

(*)  During debugging of the RAIT code (actually, the integration of
what Marc provided with how I wanted to do the output drivers), I could
simulate a "failed" tape by inserting "null:" for one of the devices.
I was also using multiple "file:" devices for the I/O -- I've never
actually used RAIT on real tapes :-).

  rait:{file:/tmp/part0,file:/tmp/part1,null:,file:/tmp/part3,file:/tmp/part4}

This made debugging pretty neat (which shows you how geeky I can get :-),
but it was also a wonder to behold the first time the code regenerated
the input exactly the way it should.  Of course, I'm still amazed I
get back 2 when I ask a computer to add 1 and 1 (and you would be, too,
if you knew what all the little transistors went through :-).

Note -- this is from memory and I may not have the syntax exactly right,
but the technique does work this way in general.

<Prev in Thread] Current Thread [Next in Thread>