RE: [Bacula-users] Tape ejecting problem

2005-08-31 Thread Chris Lee
> -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 < 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


Re: [Bacula-users] Tape ejecting problem

2005-08-31 Thread Florian Schnabel



seems an access right problem on /dev/st0.
I think the simpler is to add in your Device configuration in
bacula-sd.conf the directive : OfflineOnUnmount = yes
Then you can remove the shell commands with 'mt' in your script.
This directive will eject the tape if an 'umount'  or a 'release' is 
issued.


 Hope it helps.


 Loïs Lherbier

 


always full fo surprises ...
that did work, but bacula ejected the tape after job 1 of 5 ^^
thus failing the other jobs .. ah well ..

will have to see that the command is run once and only after the last 
job ^^


Florian


how to tell bacula to wait untill the last job is done (or add the 
unmound to the backupcatalog-job) ?


Florian


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


Re: [Bacula-users] Tape ejecting problem

2005-08-30 Thread Florian Schnabel



seems an access right problem on /dev/st0.
I think the simpler is to add in your Device configuration in
bacula-sd.conf the directive : OfflineOnUnmount = yes
Then you can remove the shell commands with 'mt' in your script.
This directive will eject the tape if an 'umount'  or a 'release' is issued.

 Hope it helps.


 Loïs Lherbier

 


always full fo surprises ...
that did work, but bacula ejected the tape after job 1 of 5 ^^
thus failing the other jobs .. ah well ..

will have to see that the command is run once and only after the last job ^^

Florian


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


Re: [Bacula-users] Tape ejecting problem

2005-08-30 Thread LHERBIER Lois
Florian Schnabel wrote:

> 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 < unmount storage=Tape
> END_OF_DATA
> # the following is a shell command
> mt -f /dev/st0 rewind
> mt -f /dev/st0 eject
>
seems an access right problem on /dev/st0.
I think the simpler is to add in your Device configuration in
bacula-sd.conf the directive : OfflineOnUnmount = yes
Then you can remove the shell commands with 'mt' in your script.
This directive will eject the tape if an 'umount'  or a 'release' is issued.

  Hope it helps.


  Loïs Lherbier


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


Re: [Bacula-users] Tape ejecting problem

2005-08-30 Thread Florian Schnabel

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 

Re: [Bacula-users] Tape ejecting problem

2005-08-30 Thread LHERBIER Lois
Florian Schnabel wrote:

> now for my (hopefully) last problem with bacula :-)
>
> the guy who had this job bevore me (he's not available for questions
> right now ..)
> did set it up so the tape gets ejected after the daily backup .. for
> some reason this doesn't work
> i don't know if it could have worked at all, i just know that some
> time ago when he was still here the tape did eject correctly .. dunno
> if he broke it ...
>
> snipet from bacula-dir.conf
>
> # Backup the catalog database (after the nightly save)
> Job {
>  Name = "BackupCatalog"
>  Type = "Backup"
>  Level = "Full"
>  Client = "-fd"
>  FileSet = "Catalog"
>  Schedule = "WeeklyCycleAfterBackup"
>  Storage = "Tape"
>  Messages = "Standard"
>  Pool = "Default"
> # This creates an ASCII copy of the catalog
>  RunBeforeJob = "/etc/bacula/scripts/make_catalog_backup bacula bacula"
>  RunAfterJob  = "/etc/bacula/eject_tape"
>  Write Bootstrap = "/var/lib/bacula/BackupCatalog.bsr"
>  Priority = 11   # run after main backup
>  Max Start Delay = 22h
> }
>
> snipet from bacula report
>
>  Termination:Backup OK
>
> 30-Aug 01:04 erde-dir: Begin pruning Jobs.
> 30-Aug 01:04 erde-dir: No Jobs found to prune.
> 30-Aug 01:04 erde-dir: Begin pruning Files.
> 30-Aug 01:04 erde-dir: No Files found to prune.
> 30-Aug 01:04 erde-dir: End auto prune.
>
> 30-Aug 01:04 erde-dir: RunAfter: Connecting to Director
> xxx.xxx.xxx.xxx:9101
> 30-Aug 01:04 erde-dir: RunAfter: 1000 OK: -dir Version: 1.36.3 (22
> April 2005)
> 30-Aug 01:04 erde-dir: RunAfter: Enter a period to cancel a command.
> 30-Aug 01:04 erde-dir: RunAfter: unmount storage=Tape
> 30-Aug 01:04 erde-dir: RunAfter: Using default Catalog name=MyCatalog
> DB=bacula
> 30-Aug 01:04 erde-dir: RunAfter: 3901 Device "/dev/nst0" is already
> unmounted.
> 30-Aug 01:04 erde-dir: RunAfter: You have messages.
> 30-Aug 01:04 erde-dir: RunAfter: /dev/st0: Permission denied
> 30-Aug 01:04 erde-dir: RunAfter: /dev/st0: Permission denied
> 30-Aug 01:04 erde-dir: BackupCatalog.2005-08-29_23.15.00 Warning:
> RunAfterJob error: ERR=Child exited with code 1
>
>
> any clues to that ?
>
> all help appreciated :-)
>
> Florian
>
>
>
> ---
> 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
>

Hello,

Can you show us the content of the file '/etc/bacula/eject_tape', please ?

  Loïs Lherbier


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