Is there any compelling reason why "update slots" forces the drives to be unloaded? "mtx status" usually(*) includes information about the designated slot number for any tape in a drive.


Once you get past forced unloading happening, it should be possible to make "mtx status" or an "update slots" command run as an bacula automatic background item (either pre/post tape change commands, or periodically), so that it is _always_ aware of where tapes are before performing any action and not reliant on someone remembering to run the command after every magazine/mailslot change.


(*) About the only time it doesn't is when the changer has just been power cycled(**) or if the changer is brain damaged.


In the power cycle case the changer will attempt to unload the tape to the lowest-numbered available slot

In the dain bramage case you'd need a directive to do forced unloading.

In either case, it should just be a matter of checking "mtx status" to see if there's a slot allocated against a tape loaded in the drive and only doing a forced unload if there is none showing, the allocated slot on the changer is full(***) or the slot mismatches where Bacula thinks it should be unloaded to.

(**) Some larger changers have battery backup to maintain state information across power cycles. It's a handy feature to say the least.

(***) MTX man page states that if the designated slot is full when the tape is unloaded the changer or MTX will attempt to unload to the next available higher-numbered slot.

I have not (yet) tried to see if MTX will wrap if there are no higher numbered slots available but lower slots are open, or what happens when all slots are full...



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to