Amanda-Users

Re: Make amanda unload tape drive?

2003-01-25 14:30:33
Subject: Re: Make amanda unload tape drive?
From: "John R. Jackson" <jrj AT purdue DOT edu>
To: simon-amanda-users AT blackstar.co DOT uk
Date: Sat, 25 Jan 2003 12:34:47 -0500
>Can amanda send a signal to my DLT IV to unload the tape after
>backups are finished, so whoever goes back to swap tapes can
>just do it without waiting to manually unload?

The standard "trick" is to call either "amtape <CONFIG> eject" or (what
I do) "amtape <CONFIG> slot advance" after the amdump run.  For instance:

  amdump <CONFIG> ; amtape <CONFIG> slot advance

This should "do the right" thing regardless of how many tapes the run
uses.  "slot advance" does an "eject" followed by advancing the concept
of "current" (without actually loading it) so the next "load current"
(what Amanda does at startup) gets the "right" tape".  Just doing an
"eject" does not advance "current" so the next load will ask for the
same tape that was just finished.

Without the amtape call, the next amdump run will do a "load current"
(which doesn't do anything because the tape is still loaded), check the
current tape (the one that was written "yesterday"), decide it does not
like it and then do a "load next", which ejects current and goes on to
the next tape.  That works but, as you noted, the last tape from a run
sits in the drive between runs.

>If you follow amdump with an amtape eject command, will you not be
>ejecting the tape in the 'current' slot?

Yes.  But "current" in this sense is the tape that was just written,
which is what you want to do.

>Once amdump has finished, isn't the current slot incremented?  ...

No.  "current" is only advanced when you move from tape to tape.
Just finishing a tape is not sufficient.

>And what if amanda uses more than one tape in a single run? Is there a
>nice way to have it eject only the tapes it used?

See above.

>Simon.

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

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