Bacula-users

Re: [Bacula-users] slot 0 = my third eye ?

2008-09-03 16:04:29
Subject: Re: [Bacula-users] slot 0 = my third eye ?
From: Arno Lehmann <al AT its-lehmann DOT de>
To: bacula-users AT lists.sourceforge DOT net
Date: Wed, 03 Sep 2008 22:04:16 +0200
Hi,

03.09.2008 17:58, Brian A. Seklecki wrote:
>> mtx for me counts from 1 for slots.
>>
>>  # mtx -f /dev/autochanger1 status
>>   Storage Changer /dev/autochanger1:2 Drives, 24 Slots ( 1 Import/Export )
>> Data Transfer Element 0:Empty
>> Data Transfer Element 1:Full (Storage Element 8 Loaded):VolumeTag = A00020
>>       Storage Element 1:Full :VolumeTag=A00030
>>       Storage Element 2:Full :VolumeTag=A00052
>>       Storage Element 3:Full :VolumeTag=A00058
>>       Storage Element 4:Full :VolumeTag=A00053
>>       Storage Element 5:Full :VolumeTag=A00023
> 
> 
> *sigh* Well that explains it then.  The Bacula Autochanger API therefore
> reflects the GNU/Linux mt(4) or st(4) driver numbering from 1.

Not necessarily... I haven't thought through that, but the solution 
might be already included in Bacula:

 From TFM:

"Changer Command = <command>
     This record is used to specify the external program to call and 
what arguments to pass to it. The command is assumed to be a standard 
program or shell script that can be executed by the operating system. 
This command is invoked each time that Bacula wishes to manipulate the 
autochanger. The following substitutions are made in the command 
before it is sent to the operating system for execution:

           %% = %
           %a = archive device name
           %c = changer device name
           %d = changer drive index base 0
           %f = Client's name
           %j = Job name
           %o = command  (loaded, load, or unload)
           %s = Slot base 0
           %S = Slot base 1
           %v = Volume name"

You notice the difference between %s and %S?

Might be worth a try...

> Psychology majors working on the GNU/Linux SCSI layer?
> 
> bsd$ sudo mtx -f /dev/pass0 status
>   Storage Changer /dev/pass0:1 Drives, 8 Slots ( 0 Import/Export )
> Data Transfer Element 0:Full (Storage Element 6 Loaded):VolumeTag =
> 000028
>       Storage Element 1:Full :VolumeTag=000027
>       Storage Element 2:Full :VolumeTag=000001
>       Storage Element 3:Full :VolumeTag=000026
>       Storage Element 4:Full :VolumeTag=000029
>       Storage Element 5:Full :VolumeTag=000024
>       Storage Element 6:Empty
>       Storage Element 7:Full :VolumeTag=000025
>       Storage Element 8:Full :VolumeTag=000022
> 
> bsd$ sudo chio stat -Vv
> picker 0:  voltag: <:0> avoltag: <:0>
> slot 0: <ACCESS,FULL> voltag: <000027:0> avoltag: <:0>
> slot 1: <ACCESS,FULL> voltag: <000001:0> avoltag: <:0>
> slot 2: <ACCESS,FULL> voltag: <000026:0> avoltag: <:0>
> slot 3: <ACCESS,FULL> voltag: <000029:0> avoltag: <:0>
> slot 4: <ACCESS,FULL> voltag: <000024:0> avoltag: <:0>
> slot 5: <ACCESS> voltag: <:0> avoltag: <:0>
> slot 6: <ACCESS,FULL> voltag: <000025:0> avoltag: <:0>
> slot 7: <ACCESS,FULL> voltag: <000022:0> avoltag: <:0>
> drive 0: <FULL> voltag: <000028:0> avoltag: <:0>
> 
> I'd be curious what the Sun/SCO/AIX/HFUX people see on their kernel.

Sun plus mtx sees slot numbers starting with 1. Actually, I believe 
that's mtx - as far as I recall from reading SCSI specs and library 
manuals, the actual numbers the devices use internally are a lot more 
"interesting" than what is reported by mtx or chio.

Arno

> ~BAS
> 
> 
> 
> 
> IMPORTANT: This message contains confidential information and is intended 
> only for the individual named. If the reader of this message is not an 
> intended recipient (or the individual responsible for the delivery of this 
> message to an intended recipient), please be advised that any re-use, 
> dissemination, distribution or copying of this message is prohibited. Please 
> notify the sender immediately by e-mail if you have received this e-mail by 
> mistake and delete this e-mail from your system.
> 
> 
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 

-- 
Arno Lehmann
IT-Service Lehmann
Sandstr. 6, 49080 Osnabrück
www.its-lehmann.de

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users