> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Florian Schnabel
> Sent: Tuesday, 30 August, 2005 02:34
> To: bacula-users@lists.sourceforge.net
> Subject: Re: [Bacula-users] Tape ejecting problem
> 
> LHERBIER Lois wrote
> 
> >Hello,
> >
> >Can you show us the content of the file 
> '/etc/bacula/eject_tape', please ?
> >
> >  Loïs Lherbier
> >  
> >
> whoops .. sorry, of course :-)
> 
> #!/bin/sh
> bconsole -c /etc/bacula/bconsole.conf <<END_OF_DATA
> unmount storage=Tape
> END_OF_DATA
> # the following is a shell command
> mt -f /dev/st0 rewind
> mt -f /dev/st0 eject
> 

AFAIK the rewind isn't really necessary since bacula rewinds the tape as
soon as it's mounted but this is up to you.

You might try using 'mt -f /dev/st0 offline' instead of 'mt -f /dev/st0
eject' since offline is supposed to be the same as eject according to mt(1).
>From the driver/hardware point of view I don't know what the difference is
between 'offline' and 'eject' but 'offline' works fine here.

The OfflineOnUnmount directive shouldn't eject the tape until the tape is
unmounted by bacula (either automatically or by the unmount command in the
console).  I suspect that what's happening here is that you're still using
the eject_tape script in the RunAfterJob and regardless of whether the 'mt
eject' is working it's still unmounting storage=Tape which is causing bacula
to eject the tape.

Personally, I would handle this by leaving the OfflineOnUnmount turned on
and creating an Admin job which executes your eject_tape script.  Then
comment out the mt rewind and eject lines so that the script just tells
bacula to unmount the drive.  Comment out the RunAfterJob which calls
eject_tape in your other Job(s).  Set a high number for Priority on this
Admin job, and schedule it to run at the same time as your other jobs.  In
theory this would let your jobs run normally, then when all of your jobs
have finished the Admin job will run, the script will unmount the storage
resource, and bacula will eject your tape.

Hope this helps. :-)

> 
> 
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development 
> Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * 
> Testing & QA
> Security * Process Improvement & Measurement * 
> http://www.sqe.com/bsce5sf
> _______________________________________________
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users


Thanks,
Chris  



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to