Amanda-Users

Re: Input/output error on tape drive with amcheck...

2005-06-29 13:24:49
Subject: Re: Input/output error on tape drive with amcheck...
From: Jon LaBadie <jon AT jgcomp DOT com>
To: amanda-users AT amanda DOT org
Date: Wed, 29 Jun 2005 13:13:07 -0400
On Wed, Jun 29, 2005 at 11:36:21AM -0400, Guy Dallaire wrote:
> This morning my amcheck (amanda 2.4.5) told me that I had to fix a
> problem before run:
> 
> Amanda Tape Server Host Check
> -----------------------------
> Holding disk /disk1/amanda/hd: 178138 MB disk space available, using 177638 MB
> amcheck-server: slot 1: date 20050629 label DailySet1-011 (active tape)
> amcheck-server: slot 2: reading label: Input/output error
> amcheck-server: slot 3: date 20050601 label DailySet1-013 (active tape)
> amcheck-server: slot 4: date 20050602 label DailySet1-014 (active tape)
> amcheck-server: slot 5: date 20050603 label DailySet1-015 (active tape)
> ERROR: label DailySet1-012 or new tape not found in rack
>        (expecting tape DailySet1-012 or a new tape)
> 
> After running:
> 
> amtape DailySet1 slot 2 
> and 
> amtape DailySet1 current, 
> 
> I got a correct tape label and no output errors ! What can be the
> cause of this ?

I see a similar behavior in my setup.  Sometimes it seems like the
timing of the system saying the tape is ready to read and reality
are two different things.  I ended up adjusting the mtx changer
script by putting in a set of sleeps.  I considered putting in
retries, but never did.

Other possibilities are general hardware problems, dirty or
failing tape, dirty heads, scsi bug-a-boos, ...

> 
> I have a tapecylce of 24 tapes. Does this mean that I should always
> have a "blank/new/inactive" tape in the changer for situations like
> this, where the amanda operator is not there to fix things up ? I use
> to load the changer with the next 5 tapes for the week.

I set the value of tapecycle to less than the tapes actually in
rotation, 18 rather than 24 (6 per week).  Then if there is a bad
read, or simply like your case, something unexplained, amanda is
willing to use any of the 6 tapes least recently used.  So if there
is a bad read, for whatever reason, amanda goes to the next slot
to see if that tape is one of the 6.

On the next rotation the skipped tape gets used, even in the original
order.  I found aging tapes when the same tape repeatedly was skipped.

> 
> If that DailySet1-012 tape were indeed BAD, how could I manage to
> insert a new tape with the same name in my rotation ?

Force option of amlabel ?

> 
> I know I could do an amrmtape, but it would probably refuse to remove
> an active tape without forcing it ? If I know that the tape would be
> reused anyway on the next run and my dumpcycle is one week anyway, so
> the tape is pretty old, I presume there is no danger in amrmtap'ing it
> and then relabel it with the correct name ?

That is my choice for a defective tape.

> 
> Or could I simply mark it as noreuse and amanda would ask for the next
> tape (DailySet1-013) ?

If your tapecycle was still 24, amanda would ask for a "new" tape
since only 23 were active.  One of the advantages of a tapecycle
less than actual tapes in rotation.

> 
> Also, is there a way to differentiate between a tape that is "active"
> (in rotation) and one that I would describe as "essential" (needed for
> a restore, one from the last "dumpcycle")  ?

Other than the last runs/cycle * runtapes, not of which I'm aware.
I can imagine a script going through the output of amoverview, or
the curinfo stuff and determining the date of the oldest level 0
and the tapes used since then.

-- 
Jon H. LaBadie                  jon AT jgcomp DOT com
 JG Computing
 4455 Province Line Road        (609) 252-0159
 Princeton, NJ  08540-4322      (609) 683-7220 (fax)