Amanda-Users

Re: Make amanda unload tape drive?

2003-01-22 09:59:03
Subject: Re: Make amanda unload tape drive?
From: Jon LaBadie <jon AT jgcomp DOT com>
To: amanda-users AT amanda DOT org
Date: Wed, 22 Jan 2003 09:28:12 -0500
On Wed, Jan 22, 2003 at 01:31:06PM +0000, Simon Young wrote:
> On Thu, Jan 16, 2003 at 01:13:14AM -0500, Jon LaBadie wrote:
> > 
> > On Fri, Jan 10, 2003 at 11:14:55AM +0000, Pavel Rabel wrote:
> > > 
> > > > > >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?
> > >  
> > > > For amdump this is easy.
> 
> Is it really easy when using a tape changer?
> 
> If you follow amdump with an amtape eject command, will you not be
> ejecting the tape in the 'current' slot?

The original OP did not specify a changer and I, perhaps incorrectly
formed my answer based on a single drive with no changer.

> Once amdump has finished, isn't the current slot incremented? Implying
> that you'll be ejecting the tape in the next slot, which is most likely
> the one amanda will be wanting to use next.
> 
> I'm not quite clear about this yet, so please correct me if I'm wrong.

My experience with changers is pretty limited and the changer script I
use (chg-mtx) does not maintain the state of the current slot in a disk
file.  But based on that limited experience I find that amdump leaves
the last tape used in the drive.  It leaves it at the end of media,
after the last file is written; i.e. not rewound.  The changer script
is not called again at this point.  From this I don't see where the
current slot state would be incremented past the last tape used.

Your experience may differ, if so I'd like to know for future reference.

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

My changer has only one drive.  Tapes are inserted into a carrier and
that is placed into the changer.  At any time, one or zero tapes are
loaded into the tape drive from the carrier.  Ejecting refers to
physically ejecting the entire carrier with all tapes from the
changer.  If a tape had been loaded into the drive, it is rewound and
unloaded first.

Again my lack of experience causes this question.  Do other changers
or libraries work differently?  Can some eject multiple individual tapes?
Curious minds would like to know.

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