Amanda-Users

RE: Have 2.4.4p1 RAIT over file: working sort of...

2003-11-20 02:37:08
Subject: RE: Have 2.4.4p1 RAIT over file: working sort of...
From: "Dana Bourgeois" <em-lists AT netgods DOT us>
To: "'Jean-Louis Martineau'" <martinea AT iro.umontreal DOT ca>
Date: Wed, 19 Nov 2003 23:34:53 -0800
Oh, this is even weirder.  As I finished up and sent that last long post, I
realized if it is a rewind command problem, I should be able to trace it and
catch the error.  So I ran 'strace -f -o /tmp/t amlabel daily1 daily10 slot
10' and watched the command output expecting to see the '... are you sure
you're using the non-rewinding device?' string.  Didn't happen.  Normal
label checking output.  OK, so maybe a second time.  Ran it again.  Hmmm....
Normal again.  Tried it twice more, same result, more head scratching
(Oww...getting tender).  Tried same command but without the strace.  This
time GOT the error.  Verified the info file contents.  Also verified when
stracing.  No error results in info file having position 0.  Error results
in info file having position 3.

Now it gets weird, as if this isn't weird yet.  

After running just the amlabel command and getting the error AND verifying
the info file contents, I ran the straced amlabel command.  NO ERROR!  Info
file is perfect.  Its late and I'm going to bed.  

But this sure looks like processes aren't waiting properly or something and
strace slows things down enough it works right.  

                                <small voice> help


Dana Bourgeois


> -----Original Message-----
> From: Jean-Louis Martineau [mailto:martinea AT iro.umontreal DOT ca] 
> Sent: Wednesday, November 19, 2003 6:54 AM
> To: Dana Bourgeois
> Cc: amanda-users AT amanda DOT org
> Subject: Re: Have 2.4.4p1 RAIT over file: working sort of...
> 
> 
> Hi Dana,
> 
> Your setup should works correctly, what's in the changer debug file?
> 
> Jean-Louis
> 
> On Tue, Nov 18, 2003 at 09:52:26PM -0800, Dana Bourgeois wrote:
> > Is there no one who has an idea of what's wrong here?  I 
> followed the 
> > examples but used the chg-multi changer rather than the 
> chg-mtx.  Any 
> > help? Can I use chg-multi with a /dev/null tape device?  I don't 
> > really have any hardware, its all the file: driver writing to disk.
> > 
> > 
> > Dana Bourgeois
> > 
> > 
> > > -----Original Message-----
> > > From: owner-amanda-users AT amanda DOT org
> > > [mailto:owner-amanda-users AT amanda DOT org] On Behalf Of Dana Bourgeois
> > > Sent: Monday, November 17, 2003 12:58 AM
> > > To: amanda-users AT amanda DOT org
> > > Subject: Have 2.4.4p1 RAIT over file: working sort of...
> > > 
> > > 
> > > The good news is that its really easy to set up the RAIT with
> > > three disks. The bad news is that taper complains about not 
> > > finding an Amanda tape which is like totally bogus because I 
> > > read the label(s) myself.  Can someone who knows the code 
> > > help me figure this out?  See the last section below for errors.
> > > 
> > > I will include the relevant config files and the error
> > > message.  I'd really like to get this working.  
> > > 
> > > 
> > > Dana Bourgeois
> > > 
> > > =========   Amanda.conf
> > > #
> > > # amanda.conf - sample Amanda configuration file.  This
> > > started off life as
> > > #               the actual config file in use at CS.UMD.EDU.
> > > 
> > > org "daily"             # your organization name for reports
> > > dumpuser "amanda"       # the user to run dumps under
> > > inparallel 4            # maximum dumpers that will run 
> in parallel
> > > netusage  100000        # maximum net bandwidth for Amanda, 
> > > in KB per sec
> > > dumpcycle 1 weeks       # the number of days in the 
> normal dump cycle
> > > runspercycle 5 days    # the number of amdump runs in 
> dumpcycle days
> > > tapecycle 7 tapes       # the number of tapes in rotation
> > > bumpsize 20 Mb          # minimum savings (threshold) to bump 
> > > level 1 -> 2
> > > bumpdays 1              # minimum days at each level
> > > bumpmult 4              # threshold = bumpsize * 
> bumpmult^(level-1)
> > > etimeout 300            # number of seconds per filesystem 
> > > for estimates.
> > > runtapes 1              # number of tapes to be used in a 
> > > single run of
> > > amdump
> > > tpchanger "chg-rait"    # This one stripes across 
> multiple changers
> > > changerfile "/var/lib/amanda/config/rait-changer.conf"
> > > tapetype file           # what kind of tape it is (see 
> > > tapetypes below)
> > > labelstr "^daily[0-9][0-9]*$"   # label constraint regex: all 
> > > tapes must
> > > match
> > > infofile "/var/lib/amanda/daily1/curinfo"       # 
> database filename
> > > logdir   "/var/lib/amanda/daily1"               # log directory
> > > indexdir "/var/lib/amanda/daily1/index"         # index directory
> > > # Dumpers write to the holding disk, taper reads from the
> > > holding disk. holdingdisk hd1 {
> > >     comment "main holding disk"
> > >     directory "/backup1/holding"        # where the 
> holding disk is
> > >     use -10 Gb         # how much space can we use on it
> > >                         # a negative value means use all 
> > > space except <value>
> > >     }
> > > holdingdisk hd2 {
> > >     comment "main holding disk"
> > >     directory "/backup2/holding"        # where the 
> holding disk is
> > >     use -10 Gb         # how much space can we use on it
> > >                         # a negative value means use all 
> > > space except <value>
> > >     }
> > > 
> > > # tapetype
> > > define tapetype file {
> > >     comment "File on large disk"
> > >     length 15 gb
> > >     filemark 0 kbytes
> > >     speed 10000 kbytes
> > > }
> > > 
> > > define dumptype global {
> > >     comment "Global definitions"
> > >     index yes
> > >     compress client fast        # can be 'none'
> > >     program "GNUTAR"
> > >     maxdumps 1
> > > }
> > > 
> > > define dumptype tar-compress {
> > >     global
> > >     comment "Dump of my systems"
> > > }
> > > 
> > > # network interfaces
> > > define interface local {
> > >     comment "a local disk"
> > >     use 10000 kbps
> > > }
> > > 
> > > define interface eth0 {
> > >     comment "100 Mbps ethernet"
> > >     use 1000 kbps
> > > }
> > > 
> > > =========     rait-changer.conf
> > > # chg-rait config file
> > > #
> > > # This assumes we have rait-striped drives in several
> > > # other amanda changer configs.
> > > 
> > >    nchangers=3
> > > 
> > > # Changer #1
> > >    tpchanger_1="chg-multi"
> > >    changerfile_1="/etc/amanda/daily1/changer1.conf"
> > > 
> > > # Changer #2
> > >    tpchanger_2="chg-multi"
> > >    changerfile_2="/etc/amanda/daily1/changer2.conf"
> > > 
> > > # Changer #3
> > >    tpchanger_3="chg-multi"
> > >    changerfile_3="/etc/amanda/daily1/changer3.conf"
> > > 
> > > =========     changer1.conf
> > > # config file for the chg-multi tape changer program.
> > > # Used when tpchanger "chg-multi" is specified in amanda.conf.
> > > 
> > > multieject 0
> > > gravity 0
> > > needeject 0
> > > ejectdelay 0
> > > statefile /etc/amanda/daily1/changer-status1
> > > firstslot 1
> > > lastslot 15
> > > slot  1 file:/backup1/daily01
> > > slot  2 file:/backup1/daily02
> > > slot  3 file:/backup1/daily03
> > > slot  4 file:/backup1/daily04
> > > slot  5 file:/backup1/daily05
> > > slot  6 file:/backup1/daily06
> > > slot  7 file:/backup1/daily07
> > > slot  8 file:/backup1/daily08
> > > slot  9 file:/backup1/daily09
> > > slot 10 file:/backup1/daily10
> > > slot 11 file:/backup1/daily11
> > > slot 12 file:/backup1/daily12
> > > slot 13 file:/backup1/daily13
> > > slot 14 file:/backup1/daily14
> > > slot 15 file:/backup1/daily15
> > > 
> > > ===========  changer2 and 3 conf files
> > > The same as changer1.conf except the status file is
> > > changer-status2 and changer-status3 respectively AND the 
> > > tapes for changer 2 are on /backup2 while the tapes for 
> > > changer 3 are on /backup3.
> > > 
> > > ===========     OK, Errors
> > > 1. amlabel labels the tapes but then doesn't rewind them.  I
> > > wrote a little script to do that for me since all that is 
> > > required is to muck with the info file.  Once I labelled and 
> > > rewound the tapes, amtape and amlabel acted normally.  For 
> > > example, during the amdump taper reported: 
> > > 
> > > taper: slot 4: date X        label daily04 (exact label match)
> > > 
> > > 2. when I ran amdump, the taper complained and wouldn't
> > > write.  Here's the error line:
> > > 
> > > driver: result time 484.574 from taper: TAPE-ERROR [not an
> > > amanda tape]
> > > 
> > > 3. Ahh...OK.  Found something!!  I thought it was just the
> > > initial labelling of a new tape that was not rewinding but 
> > > amcheck and amlable both don't rewind, even when they say 
> > > they will.  If I run amlabel after my rewinding program, it 
> > > acts normally but if I run it a second time the info file 
> > > reports position 2 and amlabel reports it can't find the 
> > > label and errors. This might be the problem with amdump but 
> > > I'm too burned out to work on this anymore.
> > > 
> 
>