Hi, 05.03.2009 21:57, (private) HKS wrote: > Hello, > > I'm introducing a Dell Powervault 124T autochanger to my Bacula > config, and am having a bit of trouble with the mtx-changer script. > > Bacula 2.2.8 on OpenBSD 4.4.
Hmm... OpenBSD is not something I'm very familiar with. IIRC, the tape and autochanger interfaces behave a bit differently than what you see under linux and solaris. > The problem is that "mtx-changer /dev/ch0 loaded 0 /dev/nrst0 0" does > not work as expected. Here's a quick cut/paste that shows what I mean. > ---- > # chio status -v Yup... you see, mtx-changer is supposed to use a generic SCSI interface - /dev/sgX under linux - and it might be possible that the /dev/chX interface works differently (under solaris this does not seem to be an issue, by the way). There's a changer control script suitable for chio somewhere in the Bacula distribution - you might try that. > <...snip...> > drive 0: <ACCESS,FULL> voltag: <000015L3:0> > # ./mtx-changer /dev/ch0 loaded 0 /dev/nrst0 0 > > # btape -c /etc/bacula/bacula-sd.conf 124T-Drive > Tape block granularity is 1024 bytes. > btape: butil.c:285 Using device: "124T-Drive" for writing. > 05-Mar 15:49 btape JobId 0: 3301 Issuing autochanger "loaded? drive 0" > command. > 05-Mar 15:49 btape JobId 0: 3302 Autochanger "loaded? drive 0", > result: nothing loaded. > > ---- > > The key seems to be that mtx-changer loaded is expecting a different > format than my system is returning. I modified mtx-changer so I'm now > getting the voltag when I check what's loaded, but now btape believes > the voltag indicates the slot that's loaded (whatever that means): Obviously the output format is different to what mtx-changer expects. > ---- > > # ./mtx-changer /dev/ch0 loaded 0 /dev/nrst0 0 > 000015L3 > # btape -c /etc/bacula/bacula-sd.conf 124T-Drive > Tape block granularity is 1024 bytes. > btape: butil.c:285 Using device: "124T-Drive" for writing. > 05-Mar 15:52 btape JobId 0: 3301 Issuing autochanger "loaded? drive 0" > command. > 05-Mar 15:52 btape JobId 0: 3302 Autochanger "loaded? drive 0", result > is Slot 15. > > ---- > > This causes issues because Bacula tries to unload the tape into slot > 15, which is not the right slot. Also, my barcodes go higher, so > there's going to be some weirdness when it tries to do this with a > barcode number greater than the number of slots. > > What exactly is Bacula expecting from the mtx-changer loaded command? > Is it supposed to be just a true-false value, an empty slot number, > what? The slot number where the tape came from (and which should be empty, but that's not verified). In your above output "voltag: <000015L3:0>" , guess the 0 behind the colon is the slot. If that's the case, fixing mtx-changer to return that number would not be too hard. I don't have access to an OpenBSD box or some sample outputs from chio / mtx there, but I believe modifying mtx-changer to correctly use the output generated there should be easy enough - if you know a bit about awk or sed. Arno > Thanks for the help. > > -HKS > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users > -- Arno Lehmann IT-Service Lehmann Sandstr. 6, 49080 Osnabrück www.its-lehmann.de ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users