Bacula-users

Re: [Bacula-users] mtx-changer loaded issues

2009-03-06 17:37:18
Subject: Re: [Bacula-users] mtx-changer loaded issues
From: "(private) HKS" <hks.private AT gmail DOT com>
To: "bacula-users AT lists.sourceforge DOT net" <Bacula-users AT lists.sourceforge DOT net>
Date: Fri, 6 Mar 2009 17:29:02 -0500
On Fri, Mar 6, 2009 at 3:29 PM,  <mark.bergman AT uphs.upenn DOT edu> wrote:
>
>
> In the message dated: Fri, 06 Mar 2009 14:30:12 EST,
> The pithy ruminations from "(private) HKS" on
> <Re: [Bacula-users] mtx-changer loaded issues> were:
> => On Fri, Mar 6, 2009 at 2:00 PM, Arno Lehmann <al AT its-lehmann DOT de> 
> wrote:
> => > Hi,
> => >
> => > 06.03.2009 16:20, (private) HKS wrote:
> => >> Thanks for the response.
> => >>
> => >> On Fri, Mar 6, 2009 at 3:12 AM, Arno Lehmann <al AT its-lehmann DOT de> 
> wrote:
> => >>> 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.
>
> I've got a Dell PV132T.
>
> Which "mtx" does the script call? I'm running 1.2.18rel with no problems.
>
> => >>>>
> => >>>> Bacula 2.2.8 on OpenBSD 4.4.
>
> Oh. Hmm... I haven't done anything with OpenBSD, so I'm not sure how much I 
> can
> help.
>
>
>        [SNIP!]
>
> =>
> =>
> => Okay, I think I understand how Bacula is handling these. I'm testing
> => some other modifications to the mtx-changer script, though. If anybody
> => has a working autochanger on Linux, could you send me the following
> => output for comparison's sake?
>
> I can send you some of that info.
>
> =>
> =>  - mtx -f <device> inventory
>
> sudo mtx -f /dev/changer inventory
>
> (no output, exit status = 0)
>
> =>  - mtx -f <device> status
> sudo mtx -f /dev/changer status
>  Storage Changer /dev/changer:2 Drives, 24 Slots ( 1 Import/Export )
> Data Transfer Element 0:Empty
> Data Transfer Element 1:Full (Storage Element 18 Loaded):VolumeTag = 000127
>      Storage Element 1:Full :VolumeTag=000314
>      Storage Element 2:Full :VolumeTag=000311
>      Storage Element 3:Full :VolumeTag=000094
>      Storage Element 4:Full :VolumeTag=000315
>      Storage Element 5:Full :VolumeTag=000317
>      Storage Element 6:Full :VolumeTag=000113
>      Storage Element 7:Full :VolumeTag=000095
>      Storage Element 8:Full :VolumeTag=000123
>      Storage Element 9:Full :VolumeTag=000014
>      Storage Element 10:Full :VolumeTag=000118
>      Storage Element 11:Full :VolumeTag=000050
>      Storage Element 12:Full :VolumeTag=000114
>      Storage Element 13:Full :VolumeTag=000051
>      Storage Element 14:Full :VolumeTag=000116
>      Storage Element 15:Full :VolumeTag=000159
>      Storage Element 16:Full :VolumeTag=000301
>      Storage Element 17:Full :VolumeTag=000146
>      Storage Element 18:Empty:VolumeTag=
>      Storage Element 19:Full :VolumeTag=000141
>      Storage Element 20:Full :VolumeTag=000142
>      Storage Element 21:Full :VolumeTag=000144
>      Storage Element 22:Full :VolumeTag=000046
>      Storage Element 23:Full :VolumeTag=000143
>      Storage Element 24 IMPORT/EXPORT:Empty:VolumeTag=
>
> =>  - mtx-changer <device> list
>
> sudo mtx -f /dev/changer list
> Usage:
>  mtx --version
>  mtx [ -f <loader-dev> ] noattach <more commands>
>  mtx [ -f <loader-dev> ] inquiry | inventory
>  mtx [ -f <loader-dev> ] [nobarcode] status
>  mtx [ -f <loader-dev> ] first [<drive#>]
>  mtx [ -f <loader-dev> ] last [<drive#>]
>  mtx [ -f <loader-dev> ] next [<drive#>]
>  mtx [ -f <loader-dev> ] previous [<drive#>]
>  mtx [ -f <loader-dev> ] [invert] load <storage-element-number> [<drive#>]
>  mtx [ -f <loader-dev> ] [invert] unload [<storage-element-number>][<drive#>]
>  mtx [ -f <loader-dev> ] [eepos eepos-number] transfer 
> <storage-element-number> <storage-element-number>
>  mtx [ -f <device> ] eject
>
> =>  - mtx-changer <device> loaded 0 <drive> <drive index>
>
> I've got backups running right now, so I'm not going to move tapes around.
>
> In addition, the version of mtx I'm running uses a different syntax (see 
> above).
>
> =>
> => This would be really, really helpful.
>
> I hope so...
>
> Mark
>


Thanks a ton to John and Mark for getting me that information so
quickly. That was a great help.

I rewrote much of mtx-changer to interact more happily with my
environment (OpenBSD 4.4 w/Dell Powervault 124T 16-tape changer, for
those just joining us). My goals were to make it more or less
slot-agnostic so I don't have to be careful about sticking the right
tapes into the right slots and all that nonsense. The trick was
treating "slots" from Bacula like volume tags for chio, and vice
versa.

I *think* this will work, but I haven't been able to test because
bacula-sd hangs if I start it up without a tape loaded. By hangs I
mean "status storage" never returns - it just sits on the "Connecting"
line. This happens with the default mtx-changer script as well, and I
haven't been able to track down any rhyme or reason here. When I push
all sd messages to a log file, it just shows this upon startup:
--
06-Mar 17:17 bacula-sd JobId 0: 3301 Issuing autochanger "loaded?
drive 0" command.
06-Mar 17:17 bacula-sd JobId 0: 3302 Autochanger "loaded? drive 0",
result: nothing loaded.
06-Mar 17:17 bacula-sd JobId 0: 3301 Issuing autochanger "loaded?
drive 0" command.
06-Mar 17:17 bacula-sd JobId 0: 3302 Autochanger "loaded? drive 0",
result: nothing loaded.
--

Logging all actions to mtx-changer reveals nothing either. Running
mtx-changer with sd's arguments, I just get back "0" if nothing is
loaded. Can anybody shed some light on this? If I start bacula-sd with
a tape loaded, "status storage" works just fine.

-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 AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>