On 8/27/24 8:29 AM, Marco Gaiarin wrote:
Mandi! Bill Arlofski via Bacula-users
   In chel di` si favelave...

You cannot tell Bacula to load a cleaning tape without experiencing
these kinds of errors, because when the SD is told to
load a tape from a slot into a drive, the 'mtx-changer' script calls the 'mtx' 
utility to load, then, once that returns OK,
the script calls `mt -f /tape/nodeid status` over and over (with time/iteration 
limits and some sleep time between each call)
until it sees a "ONLINE" in the `mt status` output (in the case of a Linux 
distribution).

In the case of a cleaning tape, this "ONLINE" will never appear, and the 
mtx-changer script will always time out and fail,
then return with errorlevel 1, and the SD will complain exactly as you have 
demonstrated above.

I supposed that. Super clear! And thanks to all!

Welcome!  :)


You have two choices for cleaning tape drives with Bacula:
- Manual: Issue a disable command to the drive in bconsole, then manually 
load/unload a cleaning tape, then re-enable the drive.

Only a note: you meant 'disable job(s)', right? 'disable [command to] the
drive' seems not possible in bconsole, or i'm missing something...
Nope... You want to disable the drive in bconsole.

Then, the drive will not be used for any jobs that start on the SD - this is nice when you have library with several drives because other jobs can continue to be started and run on the other drives while this one is disabled:
----8<----
*disable storage=mhvtl-waa_a-Autochanger drive=0                                
                          │
Automatically selected Catalog: MyCatalog                                       
                          │
Using Catalog "MyCatalog"                                                       
                          │
3002 Device ""mhvtl-waa_a-Autochanger_Dev0" 
(/dev/tape/by-id/scsi-350223344ab001700-nst)" disabled.
----8<----


And a status storage=mhvtl-waa_a-Autochanger now shows the device is currently 
disabled:
----8<----
Device Tape: "mhvtl-waa_a-Autochanger_Dev0" 
(/dev/tape/by-id/scsi-350223344ab001700-nst) is not open.
Device is disabled. User command.
Drive 0 is not loaded.
----8<----


Hope this helps!
Bill

--
Bill Arlofski
w...@protonmail.com

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to