Alan Brown wrote:
> On Wed, 26 Jul 2006, Birger Blixt wrote:
>
>>> Here are the tricky parts (Only 45 slots reported today - one
>>> magazine is out)
>>>
>>>    Storage Changer /dev/sg16:2 Drives, 45 Slots ( 2 Import/Export )
>>> Data Transfer Element 0:Full (Storage Element 1 Loaded):VolumeTag =
>>> ALOW0026
>>> Data Transfer Element 1:Full (Storage Element 9 Loaded):VolumeTag =
>>> ALOW0039
>>> ...
>>>        Storage Element 41:Full :VolumeTag=AMED0042
>>>        Storage Element 42:Full :VolumeTag=AMED0041
>>>        Storage Element 43:Empty
>>>        Storage Element 44 IMPORT/EXPORT:Empty
>>>        Storage Element 45 IMPORT/EXPORT:Empty
>>>
>>> The mailslots are designated IMPORT/EXPORT and it seems to be a simple
>>> parsing issue.
>>>
>>> I'm not sure if the report of which barcode is in which drive is being
>>> used. Kern?
>
>> I wrote a script that check for tapes in the IMPORT/EXPORT slot, and
>> take care
>> of that by just talking to mysql, and bacula will then know that the
>> tape is
>> InChanger and which slot.
>
> There is a problem:
>
> When a tape is loaded directly into a drive from a mailslot, some
> changers classify it as "unknown"
>
> EG:
>
>   Storage Changer /dev/sg16:2 Drives, 45 Slots ( 2 Import/Export )
> Data Transfer Element 0:Empty
> Data Transfer Element 1:Full (Storage Element 26 Loaded):VolumeTag =
> ALOW0056
>       Storage Element 1:Full :VolumeTag=ALOW0026
>       Storage Element 2:Full :VolumeTag=ALOW0027
> ...
>       Storage Element 43:Full :VolumeTag=ALOW0058
>       Storage Element 44 IMPORT/EXPORT:Full :VolumeTag=ALOW0040
>       Storage Element 45 IMPORT/EXPORT:Full :VolumeTag=ALOW0041
>
> $  mtx -f /dev/sg16 load 44 0
>
> $  mtx -f /dev/sg16 status
>
>   Storage Changer /dev/sg16:2 Drives, 45 Slots ( 2 Import/Export )
> Data Transfer Element 0:Full (Unknown Storage Element
> Loaded):VolumeTag = ALOW0041
>                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Data Transfer Element 1:Full (Storage Element 26 Loaded):VolumeTag =
> ALOW0056
>       Storage Element 1:Full :VolumeTag=ALOW0026
>       Storage Element 2:Full :VolumeTag=ALOW0027
> .
>       Storage Element 44 IMPORT/EXPORT:Full :VolumeTag=ALOW0040
>       Storage Element 45 IMPORT/EXPORT:Empty
>
> This completly breaks "update slots", because "mtx-changer loaded"
> will tell Bacula there is no tape at all in drive 0. Needless to say
> the cascade effects (subsequent MTX calls dying when bacula attempts
> to load tapes) and job failures are not nice.
>
I don't get that result in my adic scalar 480, but your problem is that
you load the tape from the mailslot, you
should use mtx transfer to move a tape from the mailslot to an empty
slot first, then you can see a slot for the tape
in the drive. (see my script) .

If you think about it, it's very logical to say Unknown storage element
for a tape that don't have a reserved slot, since
the mailslot may be busy when you unload 0.

>> On my changer, an incoming tape is marked IMPORT/EXPORT:Full , but an
>> outgoing
>> tape has also the volumetag.
>
> That is because you don't have a barcode reader.
>
> This is also why you need the inventory command instead of just using
> "status"
I have a barcode reader, but it don't scan the tape until the transfer
is done.
>
>> I make it simple and never remove any magazines, and have only one
>> mailslot, so
>> I can do:
>
> That is only an option for small backup sets - it doesn't scale up to
> multiple mailslots or magazine changes - which even small site admins
> tend to do as feeding 15 tapes into a library one at a time is
> extremely tedious.
>
Well, I just test in a small scale and have only 2 TB data to backup ,
so my 80 tapes in the changer is enough so far.

>> I have a pool for Offline tapes (PoolId=8), where the script check
>> for tapes in
>> that pool, and if InChanger=1 .
>
> Not really needed anymore, as the pool checks properly handle
> inchanger or not (for the most part)
>
This was a thing I did in version 8 of the database, to make it easy for
my script.
And I'm an old Legato admin where we had a location on all tapes.
>> What I need is some daemon that can catch a status from the changer
>> when the
>> mailslot is opened/closed, now I must run my script in a loop and
>> then go to the
>> changer and remove/insert tapes.
>
> Polling would do it.
>
> Be aware that MTX may be activated by 3rd party programs, so that
> needs to be taken into account too.
>
My $MTX is a wrapper that make sure that the real mtx don't be called
from 2 processes at the same time.
> Additionally, some changers require _2_ status calls to return the
> IMPORT/OUTPUT slots in normal operations after an open-door action -
> the first pass simply ends at the last slot line.
>
> I have seen simlar behaviour with 500 slot CD changers too - in that
> case MTX only returned the first 64 slots after the cabinet door was
> closed, requiring a second call to see the full 500.

My mtx wrapper do a wait until I see slot 82, which can take some time
after inventory.
This must be completely rewritten if  I start to remove magazines.
>
>> I still need to run mtx inventory to update the slots/volume list,
>> but I never
>> run any scan from bacula since the mysql-database knows whats in the
>> changer.
>
> Inventory is not needed if barcodes are used, so the scripts need to
> handle that.
>
> In all likelihood, a non-recognised tape in a barcode-using library
> has a bad label and should be isolated, instead of inventoried (odds
> are high that if not labelled, it's probably blank and the inventory
> action itself may well cause a running bacula job to abort if it pulls
> a tape out of a drive currentrly in use)
>
> AB
Yeah ,  I only import labeled tapes,  or  in rear cases when I label
tapes, I use label barcodes slot=xx-xx
(if I remember right)
In this case I fill a magazine with blank tapes.

/birre

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to