Bacula-users

Re: [Bacula-users] btape fails to see loaded tape

2009-08-13 15:22:21
Subject: Re: [Bacula-users] btape fails to see loaded tape
From: John Drescher <drescherjm AT gmail DOT com>
To: Dan Langille <dan AT langille DOT org>
Date: Thu, 13 Aug 2009 15:17:58 -0400
On Thu, Aug 13, 2009 at 3:14 PM, John Drescher<drescherjm AT gmail DOT com> 
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=
>
>

Well it does so after a mount.

dev6 ~ # bconsole
         Connecting to Director fileserver:9101
1000 OK: fileserver-dir Version: 2.4.4 (28 December 2008)
Enter a period to cancel a command.
*update slots
Automatically selected Catalog: HBCatalog
Using Catalog "HBCatalog"
The defined Storage resources are:
     1: File
     2: DLT-IV
     3: DVD-FILESERVER
     4: DEV6-DLT-IV-0
     5: DEV6-LTO-0
     6: DEV6-LTO2-1
     7: DEV6-Changer
Select Storage resource (1-7): 7
Connecting to Storage daemon DEV6-Changer at dev6.radimg.pitt.edu:9103 ...
3306 Issuing autochanger "slots" command.
Device "Magnum224-0" has 24 slots.
Connecting to Storage daemon DEV6-Changer at dev6.radimg.pitt.edu:9103 ...
3306 Issuing autochanger "list" command.
Catalog record for Volume "A00030" updated to reference slot 1.
Catalog record for Volume "A00058" updated to reference slot 3.
Catalog record for Volume "A00053" updated to reference slot 4.
Catalog record for Volume "A00023" updated to reference slot 5.
Catalog record for Volume "A00006" updated to reference slot 6.
Catalog record for Volume "A00007" updated to reference slot 7.
Catalog record for Volume "A00052" updated to reference slot 8.
Catalog record for Volume "A00028" updated to reference slot 9.
Catalog record for Volume "A00020" updated to reference slot 10.
Catalog record for Volume "A00054" updated to reference slot 11.
Catalog record for Volume "A00039" updated to reference slot 12.
Catalog record for Volume "A00048" updated to reference slot 13.
Catalog record for Volume "A00012" updated to reference slot 14.
Catalog record for Volume "A00068" updated to reference slot 15.
Catalog record for Volume "A00069" updated to reference slot 16.
Catalog record for Volume "A00065" updated to reference slot 18.
Catalog record for Volume "A00066" updated to reference slot 19.
Catalog record for Volume "A00067" updated to reference slot 20.
Catalog record for Volume "A00062" updated to reference slot 21.
Catalog record for Volume "A00063" updated to reference slot 22.
Catalog record for Volume "A00064" updated to reference slot 23.
Catalog record for Volume "A00036" updated to reference slot 17.
*st
Status available for:
     1: Director
     2: Storage
     3: Client
     4: All
Select daemon type for status (1-4): 2
The defined Storage resources are:
     1: File
     2: DLT-IV
     3: DVD-FILESERVER
     4: DEV6-DLT-IV-0
     5: DEV6-LTO-0
     6: DEV6-LTO2-1
     7: DEV6-Changer
Select Storage resource (1-7): 7
Connecting to Storage daemon DEV6-Changer at dev6.radimg.pitt.edu:9103

dev6-sd Version: 2.4.4 (28 December 2008) x86_64-pc-linux-gnu gentoo
Daemon started 11-Aug-09 10:57, 129 Jobs run since started.
 Heap: heap=1,212,416 smbytes=505,352 max_bytes=912,652 bufs=161 max_bufs=252
Sizes: boffset_t=8 size_t=8 int32_t=4 int64_t=8

Running Jobs:
No Jobs running.
====

Jobs waiting to reserve a drive:
====

Terminated Jobs:
 JobId  Level    Files      Bytes   Status   Finished        Name
===================================================================
 17361  Incr      1,773    1.910 G  OK       12-Aug-09 20:58
Publics.2009-08-12_20
 17356  Full          0         0   Other    12-Aug-09 21:06
radimgws3-full.2009-08-12_20
 17355  Incr          0         0   Other    12-Aug-09 21:06
radimgtm0-full.2009-08-12_20
 17363  Full          0         0   Cancel   12-Aug-09 21:06
radimgws52-full.2009-08-12_20
 17365  Incr          0         0   Cancel   12-Aug-09 21:06
radimgws55-full.2009-08-12_20
 17357  Incr          0         0   Cancel   12-Aug-09 21:06
radimgws49-full.2009-08-12_20
 17366  Full          0         0   Cancel   12-Aug-09 21:06
radimgws56-full.2009-08-12_20
 17367  Incr          0         0   Cancel   12-Aug-09 21:06
radimgws58-full.2009-08-12_20
 17362  Incr          0         0   Other    12-Aug-09 21:28
dev2-full.2009-08-12_20
 17364  Full          0         0   Other    12-Aug-09 21:36
radimgws53-full.2009-08-12_20
====

Device status:
Autochanger "Magnum224-0" with devices:
   "LTO2-0" (/dev/nst0)
   "LTO2-1" (/dev/nst1)
Device "LTO2-0" (/dev/nst0) is mounted with:
    Volume:      A00036
    Pool:        UserBackup-LTO2
    Media type:  LTO-2
    Slot 17 is loaded in drive 0.
    Total Bytes=338,522,139,648 Blocks=5,247,428 Bytes/block=64,512
    Positioned at File=367 Block=0
Device "LTO2-1" (/dev/nst1) is not open.
    Drive 1 is not loaded.
Device "DEV6-DLT-IV-0" is not open or does not exist.
Device "DEV6-DVD-WRITER" (/dev/dvd) is not open.
====

Used Volume status:
A00036 on device "LTO2-0" (/dev/nst0)
    Reader=0 writers=0 devres=0 volinuse=0
A00054 on device "LTO2-1" (/dev/nst1)
    Reader=0 writers=0 devres=0 volinuse=0
====

Data spooling: 0 active jobs, 0 bytes; 11 total jobs, 3,285,709,750
max bytes/job.
Attr spooling: 0 active jobs, 0 bytes; 11 total jobs, 732,712 max bytes.
====
*mount
The defined Storage resources are:
     1: File
     2: DLT-IV
     3: DVD-FILESERVER
     4: DEV6-DLT-IV-0
     5: DEV6-LTO-0
     6: DEV6-LTO2-1
     7: DEV6-Changer
Select Storage resource (1-7): 6
3301 Issuing autochanger "loaded? drive 1" command.
3302 Autochanger "loaded? drive 1", result: nothing loaded.
3001 Mounted Volume: A00029
3001 Device "LTO2-1" (/dev/nst1) is already mounted with Volume "A00029"
*st st
The defined Storage resources are:
     1: File
     2: DLT-IV
     3: DVD-FILESERVER
     4: DEV6-DLT-IV-0
     5: DEV6-LTO-0
     6: DEV6-LTO2-1
     7: DEV6-Changer
Select Storage resource (1-7): 6
Connecting to Storage daemon DEV6-LTO2-1 at dev6.radimg.pitt.edu:9103

dev6-sd Version: 2.4.4 (28 December 2008) x86_64-pc-linux-gnu gentoo
Daemon started 11-Aug-09 10:57, 129 Jobs run since started.
 Heap: heap=1,212,416 smbytes=505,352 max_bytes=912,652 bufs=161 max_bufs=252
Sizes: boffset_t=8 size_t=8 int32_t=4 int64_t=8

Running Jobs:
No Jobs running.
====

Jobs waiting to reserve a drive:
====

Terminated Jobs:
 JobId  Level    Files      Bytes   Status   Finished        Name
===================================================================
 17361  Incr      1,773    1.910 G  OK       12-Aug-09 20:58
Publics.2009-08-12_20
 17356  Full          0         0   Other    12-Aug-09 21:06
radimgws3-full.2009-08-12_20
 17355  Incr          0         0   Other    12-Aug-09 21:06
radimgtm0-full.2009-08-12_20
 17363  Full          0         0   Cancel   12-Aug-09 21:06
radimgws52-full.2009-08-12_20
 17365  Incr          0         0   Cancel   12-Aug-09 21:06
radimgws55-full.2009-08-12_20
 17357  Incr          0         0   Cancel   12-Aug-09 21:06
radimgws49-full.2009-08-12_20
 17366  Full          0         0   Cancel   12-Aug-09 21:06
radimgws56-full.2009-08-12_20
 17367  Incr          0         0   Cancel   12-Aug-09 21:06
radimgws58-full.2009-08-12_20
 17362  Incr          0         0   Other    12-Aug-09 21:28
dev2-full.2009-08-12_20
 17364  Full          0         0   Other    12-Aug-09 21:36
radimgws53-full.2009-08-12_20
====

Device status:
Autochanger "Magnum224-0" with devices:
   "LTO2-0" (/dev/nst0)
   "LTO2-1" (/dev/nst1)
Device "LTO2-0" (/dev/nst0) is mounted with:
    Volume:      A00036
    Pool:        UserBackup-LTO2
    Media type:  LTO-2
    Slot 17 is loaded in drive 0.
    Total Bytes=338,522,139,648 Blocks=5,247,428 Bytes/block=64,512
    Positioned at File=367 Block=0
Device "LTO2-1" (/dev/nst1) is mounted with:
    Volume:      A00029
    Pool:        LTO2-System-Backups
    Media type:  LTO-2
    Drive 1 status unknown.
    Total Bytes Read=64,512 Blocks Read=1 Bytes/block=64,512
    Positioned at File=0 Block=0
Device "DEV6-DLT-IV-0" is not open or does not exist.
Device "DEV6-DVD-WRITER" (/dev/dvd) is not open.
====

Used Volume status:
A00029 on device "LTO2-1" (/dev/nst1)
    Reader=0 writers=0 devres=0 volinuse=0
A00036 on device "LTO2-0" (/dev/nst0)
    Reader=0 writers=0 devres=0 volinuse=0
====

Data spooling: 0 active jobs, 0 bytes; 11 total jobs, 3,285,709,750
max bytes/job.
Attr spooling: 0 active jobs, 0 bytes; 11 total jobs, 732,712 max bytes.
====
*


-- 
John M. Drescher

------------------------------------------------------------------------------
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