Dear List,
I was always intrigued by the fact there is no easy way of determining Linux
Tape-Library drives order, as displayed by mtx status command (Ref:
https://sourceforge.net/p/mtx/mailman/message/6018053/), that says the only way
to really make sure about the drives order is to insert tapes into each drive.
Also, I've been observing that the output of the ls -la /dev/tape/by-id/*
lately has been very accurate about the tape-library driver's order matching
the alphabetical and TL physical order.
Because of that, I wrote this script (https://pastebin.com/857Msd8b) that
prints the order and Bacula configuration directives suggestion for a single
installed TL.
Sample output:
=======================================================
Autochanger=0
Changer Device = /dev/tape/by-id/scsi-SSTK_L700_XYZZY_A
Drive-0 tape IBM ULT3580-TD5 0105 /dev/st0 /dev/sg3
Archive Device = /dev/tape/by-id/scsi-350223344ab000100-nst
Serial Number 'XYZZY_A1 '
Drive-1 tape IBM ULT3580-TD5 0105 /dev/st1 /dev/sg4
Archive Device = /dev/tape/by-id/scsi-350223344ab000200-nst
Serial Number 'XYZZY_A2 '
Drive-2 tape IBM ULT3580-TD4 0105 /dev/st2 /dev/sg5
Archive Device = /dev/tape/by-id/scsi-350223344ab000300-nst
Serial Number 'XYZZY_A3 '
Drive-3 tape IBM ULT3580-TD4 0105 /dev/st3 /dev/sg6
Archive Device = /dev/tape/by-id/scsi-350223344ab000400-nst
Serial Number 'XYZZY_A4 '
=======================================================
Is it useful?
I fetch the drives Serial Number because the correct order can be usually
validated via TL web console.
Regards.
--
Heitor Medrado de Faria | EB-1 Visa | LPIC-III | ITIL-F | EMC 05-001
• Check my Bacula Book at Amazon.com http://bacula.us/book
• Do you need Bacula training? http://bacula.us/video-classes/
• USA +1 (323) 300-5387 | Brazil +55 (61) 98268-4220 | http://bacula.us
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users