Bacula-users

Re: [Bacula-users] eject DLT

2008-09-29 06:22:04
Subject: Re: [Bacula-users] eject DLT
From: Tilman Schmidt <t.schmidt AT phoenixsoftware DOT de>
To: James Harper <james.harper AT bendigoit.com DOT au>
Date: Mon, 29 Sep 2008 11:35:26 +0200
On 28.09.2008 05:45, James Harper wrote:
>> When a
>> tape was full, Legato would not only unmount the volume, but also send a
>> command to the drive to unload the tape (as if someone had pressed the
>> unload button on the drive).
>> 
>> Can anyone suggest how I might get Bacula to do the same?
> 
> There is an 'offline on unmount' setting which I think may do what you
> want, and is documented in
> http://www.bacula.org/en/rel-manual/Storage_Daemon_Configuratio.html

I found that option to be rather problematic, as it would cause the tape
to be ejected at some inopportune moments, for example:
- whenever the backup server was rebooted (requiring someone to walk there
   and push it back in)
- during execution of the "label" command, immediately before actually
   trying to write the label to the tape (effectively preventing any
   labeling of new tapes)

> For me though, that never quite did the trick as I didn't want the tape
> always ejected whenever I issued an unmount command, so I use a 'Run
> After Job' command as part of the last job in the nightly backup batch.

That's probably the best solution.

> The script that is executed is this ('scuse the line wrapping):
> 
> "
> #!/bin/sh
> echo "unmount storage=bitvs2-tape-sd" | /usr/bin/bconsole -c 
> /etc/bacula/bconsole.conf
> /bin/mt -f /dev/nst0 eject 2>/dev/null >/dev/null
> echo "mount storage=bitvs2-tape-sd" | /usr/bin/bconsole -c 
> /etc/bacula/bconsole.conf
> "
> 
> I think I put the 'mount' command in so that Bacula knows that the tape
> drive is ready for use again. Otherwise it remained unmounted and bacula
> wouldn't touch it.

Interesting idea. I always assumed the "mount" command only made sense
after loading the next tape, because if I issued it with the drive still
empty it would complain thusly:

3901 open device failed: ERR=dev.c:433 Unable to open device "LTO1" 
(/dev/nst0): ERR=No medium found

Time for a little experiment, I guess.

> Because I run concurrent spooled backups, I have an admin job execute
> the command which runs with a lower priority (higher number) and
> therefore only gets executed when all the jobs with a higher priority
> have finished.

In my setup the "BackupCatalog" job is the natural candidate for that.

HTH
T.

-- 
Tilman Schmidt
Phoenix Software GmbH
Bonn, Germany

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

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