Bacula-users

Re: [Bacula-users] Bacula recognizes only 7 slots in an 8-slot-changer

2012-06-25 15:53:31
Subject: Re: [Bacula-users] Bacula recognizes only 7 slots in an 8-slot-changer
From: Dan Langille <dan AT langille DOT org>
To: Jens Grüntjes <jens.gruentjes AT ebira DOT de>
Date: Mon, 25 Jun 2012 15:51:02 -0400
On 2012-06-25 10:30, Jens Grüntjes wrote:
> Hello list,
>
> I have a strange problem with a Tandberg Storage Loader (some kind of
> autochanger) and bacula. I run Debian squeeze (Kernel 2.6.32-5-686)
> and bacula 5.0.2 (shipped with Debian). The changer has 8 slots and 
> is
> attached to the computer via SCSI. Her is the output of lsscsi -g:
>
> boromir /etc/bacula/scripts # lsscsi -g
> [0:0:0:0]    disk    AMCC     9500S-8    DISK  2.06  /dev/sda  
> /dev/sg0
> [0:0:1:0]    disk    AMCC     9500S-8    DISK  2.06  /dev/sdb  
> /dev/sg1
> [1:0:0:0]    cd/dvd  TOSHIBA  ODD-DVD SD-C2732 1051  /dev/sr0  
> /dev/sg2
> [3:0:0:0]    tape    HP       Ultrium 4-SCSI   W51U  /dev/st0  
> /dev/sg3
> [3:0:0:1]    mediumx TANDBERG StorageLoader    0347  /dev/sch0  
> /dev/sg4
>
> Until last week I defined a slot in the autochanger as a "Cleaning
> Slot" so that I had 7 slots that could be used for backup-tapes. Then
> I decided to clean the drive manually because I read that cleaning 
> the
> drive is actually not necessary. I could better use the slot for
> another backup tape.
>
> So I redefined the former cleaning-slot to an ordinary slot in the
> Tandberg autochanger. That was successfull because the front panel
> indicated the cleaning-slot with a "C" which was gone and replaced by
> an "8" (I defined the tape in slot 8 to be the cleaning tape).
>
> After that I started bconsole and issued an "update slots" command.
> The output looks like this:
>
> boromir /etc/bacula/scripts # bconsole
> Connecting to Director boromir.dmz:9101
> 1000 OK: boromir-dir Version: 5.0.2 (28 April 2010)
> Enter a period to cancel a command.
> *update slots
> Automatically selected Catalog: MyCatalog
> Using Catalog "MyCatalog"
> The defined Storage resources are:
>       1: boromir-sd-100
>       2: boromir-sd-1000
> Select Storage resource (1-2): 2
> Connecting to Storage daemon boromir-sd-1000 at 10.0.0.1:9103 ...
> 3306 Issuing autochanger "slots" command.
> Device "Tandberg" has 7 slots.
> Connecting to Storage daemon boromir-sd-1000 at 10.0.0.1:9103 ...
> 3306 Issuing autochanger "list" command.
> Catalog record for Volume "WOC4-01L4" updated to reference slot 1.
> Catalog record for Volume "WOC4-02L4" updated to reference slot 2.
> Catalog record for Volume "WOC4-03L4" updated to reference slot 3.
> Catalog record for Volume "WOC5-01L4" updated to reference slot 4.
> Catalog record for Volume "WOC5-02L4" updated to reference slot 5.
> Catalog record for Volume "WOC5-03L4" updated to reference slot 6.
> Catalog record for Volume "WOC1-01L4" updated to reference slot 7.
> *
>
> The strange line is the one that reads "Device "Tandberg" has 7
> slots." because there are actually 8 slots.
>
> I reset the Tandberg autochanger to the default settings and rebooted
> both the changer and the computer that it is attached to. There was 
> no
> change regarding the "update slots" command.
>
> The I tried to get the number of slots via:
>
> boromir /etc/bacula/scripts # ./mtx-changer /dev/sg4 slots
> 7
>
> So, there are the 7 slots again.
>
> After some investigation I think it is not necessarily a problem with
> bacula but could be a problem with the OS itself. But nevertheless I
> hope you can help me on the issue. I can post config files as you
> need, please tell me what you need.
>
> Does anyone of you know where I can set the number of slots or where
> the number of slots is set by the OS?

You don't set them.  The library tells you.  Or rather, mtx let's you 
know that the hardware thinks it had.

Keep in mind that mtx-changer is a shell script provided as a 
convenient interface to mtx.

Background: http://www.freebsddiary.org/tape-library.php documents my 
customization of mtx-changer.

Make sure you have the latest and greatest mtx.

I would start by debugging the output of this script.  Look for these 
lines:

    list)
       debug "Doing mtx -f $ctl -- to list volumes"

You'll see it's doing this command:

NOTE: /dev/pass11 is my tape changer (i.e. the library).

I'm using FreeBSD 8.2 here...

$ mtx -f /dev/pass11 status
   Storage Changer /dev/pass11:1 Drives, 10 Slots ( 0 Import/Export )
Data Transfer Element 0:Full (Storage Element 2 Loaded):VolumeTag = 
ETU067
       Storage Element 1:Full :VolumeTag=ETU066
       Storage Element 2:Empty
       Storage Element 3:Full :VolumeTag=ETU068
       Storage Element 4:Full :VolumeTag=ETU069
       Storage Element 5:Full :VolumeTag=ETU064
       Storage Element 6:Full :VolumeTag=ETU070
       Storage Element 7:Full :VolumeTag=ETU078
       Storage Element 8:Full :VolumeTag=ETU044
       Storage Element 9:Full :VolumeTag=ETU045
       Storage Element 10:Full :VolumeTag=ETU075

Element 0 is the tape drive.

Start with that... show us your output.

-- 
Dan Langille - http://langille.org/

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users