Bacula-users

Re: [Bacula-users] mtx: Unknown Storage Element Loaded

2009-08-14 13:31:35
Subject: Re: [Bacula-users] mtx: Unknown Storage Element Loaded
From: "Dan Langille" <dan AT langille DOT org>
To: "John Drescher" <drescherjm AT gmail DOT com>
Date: Fri, 14 Aug 2009 13:26:34 -0400 (EDT)
On Fri, August 14, 2009 12:23 pm, John Drescher wrote:
> On Fri, Aug 14, 2009 at 12:01 PM, Dan Langille<dan AT langille DOT org> wrote:
>> On Fri, August 14, 2009 11:39 am, Dan Langille wrote:
>>>
>>> On Fri, August 14, 2009 11:13 am, Dan Langille wrote:
>>>> Changing the subject, given the change in subject.  :)
>>>>
>>>> On Thu, August 13, 2009 3:14 pm, John Drescher wrote:
>>>>> On Thu, Aug 13, 2009 at 3:09 PM, John Drescher<drescherjm AT gmail DOT 
>>>>> com>
>>>>> wrote:
>>>>>> On Thu, Aug 13, 2009 at 2:45 PM, Dan Langille<dan AT langille DOT org>
>>>>>> wrote:
>>>>>>> On Thu, August 13, 2009 2:27 pm, Dan Langille wrote:
>>>>>>>>
>>>>>>>> On Thu, August 13, 2009 1:19 pm, Dan Langille wrote:
>>>>>>>>> I am setting up a new autochanger / tape drive.  I'm trying to
>>>>>>>>> run
>>>>>>>>> btape.
>>>>>>>>> The basic test works, but I see this message when I start btape:
>>>>>>>>>
>>>>>>>>>  Autochanger "loaded? drive 0", result: nothing loaded.
>>>>>>>>>
>>>>>>>>> mtx-changer [and mtx] both disagree with this:
>>>>>>>>>
>>>>>>>>> $ sudo /etc/bacula/mtx-changer /dev/sg4 loaded 0 /dev/nst0 0
>>>>>>>>> AAM240L4
>>>>>>>>
>>>>>>>> That is a problem.  You don't want the label.  You want the slt it
>>>>>>>> came
>>>>>>>> from.  See
>>>>>>>> http://www.bacula.org/en/dev-manual/Autochanger_Resource.html#SECTION0017130000000000000000
>>>>>>>>
>>>>>>>>     loaded -- returns number of the slot that is loaded, base 1,
>>>>>>>>               in the drive or 0 if the drive is empty.
>>>>>>>>
>>>>>>>> Current problem: I can't see how to get this information from the
>>>>>>>> device.
>>>>>>>> I'll keep working on it:
>>>>>>>>
>>>>>>>> $ sudo /usr/sbin/mtx -f /dev/sg4 inquiry
>>>>>>>> Password:
>>>>>>>> Product Type: Medium Changer
>>>>>>>> Vendor ID: 'QUANTUM '
>>>>>>>> Product ID: 'PX500           '
>>>>>>>> Revision: '0033'
>>>>>>>> Attached Changer: No
>>>>>>>> [dlangille@backup01 bacula]$
>>>>>>>
>>>>>>> I think we have a problem:
>>>>>>>
>>>>>>> [dlangille@backup01 bacula]$ sudo /usr/sbin/mtx -f /dev/sg4 load 3
>>>>>>> [dlangille@backup01 bacula]$ sudo /usr/sbin/mtx -f /dev/sg4 status
>>>>>>>  Storage Changer /dev/sg4:1 Drives, 38 Slots ( 36 Import/Export )
>>>>>>> Data Transfer Element 0:Full (Unknown Storage Element
>>>>>>> Loaded):VolumeTag
>>>>>>> =
>>>>>>> AAM240L4
>>>>>>>      Storage Element 1:Empty
>>>>>>>      Storage Element 2:Empty
>>>>>>>      Storage Element 3 IMPORT/EXPORT:Empty
>>>>>>>      Storage Element 4 IMPORT/EXPORT:Full :VolumeTag=AAM241L4
>>>>>>>
>>>>>>> Should that 'Unknown Storage Element Loaded' be a 3 to indicate the
>>>>>>> slot
>>>>>>> it came from?
>>>>>>>
>>>>>>
>>>>>> Here is what my mtx output looks like
>>>>>>
>>>>>> dev6 ~ # mtx -f /dev/autochanger1 status
>>>>>>  Storage Changer /dev/autochanger1:2 Drives, 24 Slots ( 1
>>>>>> Import/Export
>>>>>> )
>>>>>> Data Transfer Element 0:Full (Storage Element 17 Loaded):VolumeTag =
>>>>>> A00036
>>>>>> Data Transfer Element 1:Empty
>>>>>>      Storage Element 1:Full :VolumeTag=A00030
>>>>>>      Storage Element 2:Empty:VolumeTag=
>>>>>>      Storage Element 3:Full :VolumeTag=A00058
>>>>>>      Storage Element 4:Full :VolumeTag=A00053
>>>>>>      Storage Element 5:Full :VolumeTag=A00023
>>>>>>      Storage Element 6:Full :VolumeTag=A00006
>>>>>>      Storage Element 7:Full :VolumeTag=A00007
>>>>>>      Storage Element 8:Full :VolumeTag=A00052
>>>>>>      Storage Element 9:Full :VolumeTag=A00028
>>>>>>      Storage Element 10:Full :VolumeTag=A00020
>>>>>>      Storage Element 11:Full :VolumeTag=A00054
>>>>>>      Storage Element 12:Full :VolumeTag=A00039
>>>>>>      Storage Element 13:Full :VolumeTag=A00048
>>>>>>      Storage Element 14:Full :VolumeTag=A00012
>>>>>>      Storage Element 15:Full :VolumeTag=A00068
>>>>>>      Storage Element 16:Full :VolumeTag=A00069
>>>>>>      Storage Element 17:Empty:VolumeTag=
>>>>>>      Storage Element 18:Full :VolumeTag=A00065
>>>>>>      Storage Element 19:Full :VolumeTag=A00066
>>>>>>      Storage Element 20:Full :VolumeTag=A00067
>>>>>>      Storage Element 21:Full :VolumeTag=A00062
>>>>>>      Storage Element 22:Full :VolumeTag=A00063
>>>>>>      Storage Element 23:Full :VolumeTag=A00064
>>>>>>      Storage Element 24 IMPORT/EXPORT:Full :VolumeTag=A00029
>>>>>>
>>>>>> What version of mtx are you using?
>>>>>>
>>>>>> dev6 ~ # equery l mtx
>>>>>> [ Searching for package 'mtx' in all categories among: ]
>>>>>>  * installed packages
>>>>>> [I--] [  ] sys-block/mtx-1.2.18 (0)
>>>>>>
>>>>>> It looks like I have 1.2.18
>>>>>>
>>>>>> John
>>>>>>
>>>>>
>>>>> Ahh. If I manually load a tape using controls on the archive I get
>>>>> the
>>>>> same. Bacula will pick this up correctly if I update slots in the
>>>>> console however.
>>>>>
>>>>> dev6 ~ # mtx -f /dev/autochanger1 status
>>>>>   Storage Changer /dev/autochanger1:2 Drives, 24 Slots ( 1
>>>>> Import/Export
>>>>> )
>>>>> Data Transfer Element 0:Full (Storage Element 17 Loaded):VolumeTag =
>>>>> A00036
>>>>> Data Transfer Element 1:Full (Unknown Storage Element
>>>>> Loaded):VolumeTag
>>>>> =
>>>>> A00029
>>>>>       Storage Element 1:Full :VolumeTag=A00030
>>>>>       Storage Element 2:Empty:VolumeTag=
>>>>>       Storage Element 3:Full :VolumeTag=A00058
>>>>>       Storage Element 4:Full :VolumeTag=A00053
>>>>>       Storage Element 5:Full :VolumeTag=A00023
>>>>>       Storage Element 6:Full :VolumeTag=A00006
>>>>>       Storage Element 7:Full :VolumeTag=A00007
>>>>>       Storage Element 8:Full :VolumeTag=A00052
>>>>>       Storage Element 9:Full :VolumeTag=A00028
>>>>>       Storage Element 10:Full :VolumeTag=A00020
>>>>>       Storage Element 11:Full :VolumeTag=A00054
>>>>>       Storage Element 12:Full :VolumeTag=A00039
>>>>>       Storage Element 13:Full :VolumeTag=A00048
>>>>>       Storage Element 14:Full :VolumeTag=A00012
>>>>>       Storage Element 15:Full :VolumeTag=A00068
>>>>>       Storage Element 16:Full :VolumeTag=A00069
>>>>>       Storage Element 17:Empty:VolumeTag=
>>>>>       Storage Element 18:Full :VolumeTag=A00065
>>>>>       Storage Element 19:Full :VolumeTag=A00066
>>>>>       Storage Element 20:Full :VolumeTag=A00067
>>>>>       Storage Element 21:Full :VolumeTag=A00062
>>>>>       Storage Element 22:Full :VolumeTag=A00063
>>>>>       Storage Element 23:Full :VolumeTag=A00064
>>>>>       Storage Element 24 IMPORT/EXPORT:Empty:VolumeTag=
>>>>
>>>> My status output has reverted to 'Unknown Storage Element Loaded'
>>>> today.
>>>> I don't know why.  'update slots' does not affect the situation.  This
>>>> means that 'loaded' does not return the correct value.  This renders
>>>> the
>>>> autochanger useless.  I'd like to know how to get this working.
>>>
>>> I had tried the 'update slots' approach.  That doesn't fix it.  What
>>> does
>>> fix it is getting Bacula to load a tape into the drive.  I achieved
>>> that
>>> by running a job.  I now see:
>>>
>>>    Data Transfer Element 0:Full (Storage Element 2 Loaded):VolumeTag =
>>> AAM241L4
>>
>> I dispute the above now.
>>
>> I go with what Alan Brown said:
>>
>>> This happens consistently with tapes loaded out of i/o slots and the
>>> only
>>> solution I've found is not to put tapes in them.
>>
>> We have 38 slots, 36 of which are labeled IMPORT/EXPORT.  Seems I should
>> change this.  I hope it is configurable.
>>
> I can tell you that my IMPORT/EXPORT slot does work correctly after a
> slight modification of the mtx-changer script. Although after I put a
> tape in it the first time I run update slots bacula says there are 23
> slots instead of 24 so it ignores slot 24. I run update slots a second
> time and all is well.

What did your mtx-changer modification do?

FWIW, here is the status after running 'update slots' twice and then
running a job:

[dlangille@backup01 bacula]$ sudo /sbin/mtx -f /dev/sg4 status
  Storage Changer /dev/sg4:1 Drives, 38 Slots ( 36 Import/Export )
Data Transfer Element 0:Empty
      Storage Element 1:Full :VolumeTag=AAM274L4
      Storage Element 2:Full :VolumeTag=AAM275L4
      Storage Element 3 IMPORT/EXPORT:Full :VolumeTag=AAM242L4
      Storage Element 4 IMPORT/EXPORT:Full :VolumeTag=AAM265L4
      Storage Element 5 IMPORT/EXPORT:Full :VolumeTag=AAM241L4
      Storage Element 6 IMPORT/EXPORT:Full :VolumeTag=AAM243L4
      Storage Element 7 IMPORT/EXPORT:Full :VolumeTag=AAM244L4
      Storage Element 8 IMPORT/EXPORT:Full :VolumeTag=AAM245L4
      Storage Element 9 IMPORT/EXPORT:Full :VolumeTag=AAM246L4
      Storage Element 10 IMPORT/EXPORT:Full :VolumeTag=AAM247L4
      Storage Element 11 IMPORT/EXPORT:Full :VolumeTag=AAM248L4
      Storage Element 12 IMPORT/EXPORT:Full :VolumeTag=AAM249L4
      Storage Element 13 IMPORT/EXPORT:Full :VolumeTag=AAM250L4
      Storage Element 14 IMPORT/EXPORT:Full :VolumeTag=AAM251L4
      Storage Element 15 IMPORT/EXPORT:Full :VolumeTag=AAM252L4
      Storage Element 16 IMPORT/EXPORT:Full :VolumeTag=AAM253L4
      Storage Element 17 IMPORT/EXPORT:Full :VolumeTag=AAM254L4
      Storage Element 18 IMPORT/EXPORT:Full :VolumeTag=AAM255L4
      Storage Element 19 IMPORT/EXPORT:Full :VolumeTag=AAM256L4
      Storage Element 20 IMPORT/EXPORT:Full :VolumeTag=AAM257L4
      Storage Element 21 IMPORT/EXPORT:Full :VolumeTag=AAM258L4
      Storage Element 22 IMPORT/EXPORT:Full :VolumeTag=AAM259L4
      Storage Element 23 IMPORT/EXPORT:Full :VolumeTag=AAM260L4
      Storage Element 24 IMPORT/EXPORT:Full :VolumeTag=AAM261L4
      Storage Element 25 IMPORT/EXPORT:Full :VolumeTag=AAM262L4
      Storage Element 26 IMPORT/EXPORT:Full :VolumeTag=AAM263L4
      Storage Element 27 IMPORT/EXPORT:Full :VolumeTag=AAM264L4
      Storage Element 28 IMPORT/EXPORT:Full :VolumeTag=AAM240L4
      Storage Element 29 IMPORT/EXPORT:Full :VolumeTag=AAM266L4
      Storage Element 30 IMPORT/EXPORT:Full :VolumeTag=AAM267L4
      Storage Element 31 IMPORT/EXPORT:Full :VolumeTag=AAM268L4
      Storage Element 32 IMPORT/EXPORT:Full :VolumeTag=AAM269L4
      Storage Element 33 IMPORT/EXPORT:Full :VolumeTag=AAM270L4
      Storage Element 34 IMPORT/EXPORT:Full :VolumeTag=AAM271L4
      Storage Element 35 IMPORT/EXPORT:Full :VolumeTag=AAM272L4
      Storage Element 36 IMPORT/EXPORT:Full :VolumeTag=AAM273L4
      Storage Element 37 IMPORT/EXPORT:Empty
      Storage Element 38 IMPORT/EXPORT:Empty
[dlangille@backup01 bacula]$


Then I issue a 'mount storage=LTO-4':
*mount storage=LTO-4
3301 Issuing autochanger "loaded? drive 0" command.
3302 Autochanger "loaded? drive 0", result: nothing loaded.
3901 Unable to open device "LTO-4" (/dev/nst0): ERR=dev.c:474 Unable to
open device "LTO-4" (/dev/nst0): ERR=No medium found

*m
14-Aug 13:24 backup01.scs.myyearbook.com-d JobId 16: Using Device "LTO-4"
14-Aug 13:24 backup01.scs.myyearbook.com-s JobId 16: 3301 Issuing
autochanger "loaded? drive 0" command.
14-Aug 13:24 backup01.scs.myyearbook.com-s JobId 16: 3302 Autochanger
"loaded? drive 0", result: nothing loaded.
14-Aug 13:24 backup01.scs.myyearbook.com-s JobId 16: 3304 Issuing
autochanger "load slot 5, drive 0" command.
*


Status now shows:

[dlangille@backup01 bacula]$ sudo /sbin/mtx -f /dev/sg4 status
  Storage Changer /dev/sg4:1 Drives, 38 Slots ( 36 Import/Export )
Data Transfer Element 0:Full (Unknown Storage Element Loaded):VolumeTag =
AAM241L4
      Storage Element 1:Full :VolumeTag=AAM274L4
      Storage Element 2:Full :VolumeTag=AAM275L4
      Storage Element 3 IMPORT/EXPORT:Full :VolumeTag=AAM242L4
      Storage Element 4 IMPORT/EXPORT:Full :VolumeTag=AAM265L4
      Storage Element 5 IMPORT/EXPORT:Empty


With the dreaded Unknown.



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


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
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>