On 31/01/18 03:23, Kenneth Garges wrote:
I’m having trouble getting a tape library to work. Individual tape drive seems 
ok but the library sometimes makes btape hang requiring a reboot. Or it fails.


>  # Define a Virtual autochanger

Remove anything you're not actually using. They're just going to add confusion.

# Quantum Scalar i80 tape library at UCSC
# Hostname of library: core-prod-jb-2
#
Autochanger {
   Name = "core-prod-jb-2"
   Device = "Drive1"
# Device = "Drive2"
   Changer Command = "/usr/local/etc/bacula/mtx-changer %c %o %S %a %d"
#  Changer Device = /dev/ch0
   Changer Device = /dev/pass42
}

*ahem*

MTX is _only_ designed to interface to scsi generic devices. Unless /dev/pass42 is another name for the generic device you'll have problems.

What do "tapeinfo -f /dev/pass42" and "loaderinfo -f /dev/pass42" give you?

You should see something like this:

# tapeinfo -f /etc/bacula/DEVICES/MSSLYF-changer
Product Type: Medium Changer
Vendor ID: 'QUANTUM '
Product ID: 'Scalar i500     '
Revision: '690G'
Attached Changer API: No
SerialNumber: 'QUANTUMA0C0xxxxxx_LLA   '
SCSI ID: 2
SCSI LUN: 1
Ready: yes

# loaderinfo -f /etc/bacula/DEVICES/MSSLYF-changer
Product Type: Medium Changer
Vendor ID: 'QUANTUM '
Product ID: 'Scalar i500     '
Revision: '690G'
Attached Changer: No
Bar Code Reader: Yes
EAAP: Yes
Number of Medium Transport Elements: 1
Number of Storage Elements: 83
Number of Import/Export Elements: 18
Number of Data Transfer Elements: 6
Transport Geometry Descriptor Page: Yes
Invertable: No
Device Configuration Page: Yes
Storage: Data Transfer, Import/Export, Storage
SCSI Media Changer (rev 2): No
Transfer Medium Transport: ->Import/Export, ->Storage
Transfer Storage: ->Data Transfer, ->Import/Export, ->Storage
Transfer Import/Export: ->Data Transfer, ->Import/Export, ->Storage
Transfer Data Transfer: ->Data Transfer, ->Import/Export, ->Storage
Exchange Medium Transport: None
Exchange Storage: None
Exchange Import/Export: None
Exchange Data Transfer: None


Operating systems may provide a /dev/changer or /dev/chio device but that doesn't mean it's the same thing as the generic.

The other thing to check is that the device is readable _and writable_ by the UID that's running bacula-sd - the default for the /dev/pass devices on the BSD systems here is 0600:root:operator and bacula-sd runs as user bacula.



------------------------------------------------------------------------------
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

Reply via email to