Hello Adam,
that is what I do:

I have an admin-Job:
Job {
  Name = "unload_tape"
  Type = admin
  Client = bacula-fd
  JobDefs = "backup"
  FileSet="Catalog"
  RunBeforeJob = "/usr/libexec/bacula/unload_tape"
  Schedule = "nachts"
  Priority = 99                  # 
}

/usr/libexec/bacula/unload_tape:
#!/bin/bash
/usr/sbin/bconsole -c /etc/bacula/bconsole.conf <<END_OF_DATA
unmount storage=DLT-S4
unmount storage=X
unmount storage=Y
END_OF_DATA

sleep 120

/usr/sbin/bconsole -c /etc/bacula/bconsole.conf <<END_OF_DATA
mount storage=DLT-S4
mount storage=X
mount storage=Y
END_OF_DATA

In the morning, I only have to collect the tapes from the library   :-)

regards
Thomas

Am Montag, 14. Mai 2007 09:40 schrieb Adam Cécile:
> Hi,
>
> All weeks I need to unload all tapes from drives to the library, so all
> tapes can be removed from the Autochanger easily.
> However, when I do "umount", device is marked as BLOCKED and no more
> jobs run until I mount the drive again.
> What's the right way to eject all tapes without blocking drives ?
>
> Thanks in advance.
>
>
> ##################### bacula-dir.conf
> # Autochanger Dell PV132T (21x LTO3)
> Storage {
>   Name = Autochanger
>   Address = srv-mpp-lrs
>   SDPort = 9103
>   Password = "ZK9nC86vuFvW80l28xQ3jaKtEJt89jXM3R31VjdZl"
>   Device = Dell-PV132T
>   Media Type = LTO3
>   Autochanger = yes
>   Maximum Concurrent Jobs = 2
> }
>
> ##################### bacula-sd.conf
> # An autochanger device with two drives
> Autochanger {
>   Name = Dell-PV132T
>   Device = ULTRIUM-TD3-1
>   Device = ULTRIUM-TD3-2
>   Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
>   Changer Device = /dev/sg2
> }
> Device {
>   Name = ULTRIUM-TD3-1
>   Drive Index = 0
>   Media Type = LTO3
>   Archive Device = /dev/nst0
>   AutomaticMount = yes;               # when device opened, read it
>   AlwaysOpen = yes;
>   RemovableMedia = yes;
>   Offline On Unmount = no;
>   #RandomAccess = no;
>   AutoChanger = yes
>   # Enable the Alert command only if you have the mtx package loaded
>   # Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
> }
> Device {
>   Name = ULTRIUM-TD3-2
>   Drive Index = 1
>   Media Type = LTO3
>   Archive Device = /dev/nst1
>   AutomaticMount = yes;               # when device opened, read it
>   AlwaysOpen = yes;
>   RemovableMedia = yes;
>   Offline On Unmount = no;
>   #RandomAccess = no;
>   AutoChanger = yes
>   # Enable the Alert command only if you have the mtx package loaded
>   # Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
> }

-- 
Mit freundlichen Grüßen

i.A. Thomas Sturm 
      EDV Abteilung 

Melle Dachbaustoffe GmbH
An der Unteren Söse 36
37520 Osterode

Telefon 05522 967-160
Fax     05522 967-149
eMail   [EMAIL PROTECTED]

Melle Dachbaustoffe GmbH, Registergericht Göttingen, HRB 130676
Sitz der Gesellschaft Osterode am Harz, Ust-ID-Nummer DE115896425
Geschäftsführer: Joel Bravard, Christopher J. Davies, Frank Engelmann
Geschäftsführer: Ralf Gehrke, Manfred Marks

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to