Bacula-users

[Bacula-users] Bacula MTX Tape Autochanger does not work

2012-07-02 16:48:57
Subject: [Bacula-users] Bacula MTX Tape Autochanger does not work
From: comport3 <bacula-forum AT backupcentral DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Sun, 01 Jul 2012 19:47:24 -0700
Hi All,

We have a Dell PowerEdge 2950 connected to a Dell TL4000 LTO4 tape library via 
dual port SAS (Dell PERC5/e card). This library is a "rebranded" IBM 3573-TL 
changer with 2 x ULT3580-TD4 drives.

I cannot get it to work consistently with either the base mtx commands, 
although it has been tested successfully with mtx/mt......or with the 
mtx-changer / btape commands. The library frequently requests cleaning tapes ??

Although the mtx command says it has 'failed', the tapes are actually loaded 
and unloaded successfully.


Does anyone have any ideas??  Your time and consideration would be much 
appreciated. I suspect it's the autochanger, not the tape drives, but have not 
a clue what to try next.



SAMPLE OUTPUT&#58;
root@NB-2950-NAS1&#58;/etc/bacula# mtx load 1 0
Loading media from Storage Element 1 into drive 0...mtx&#58; Request Sense&#58; 
Long Report=yes
mtx&#58; Request Sense&#58; Valid Residual=no
mtx&#58; Request Sense&#58; Error Code=70 &#40;Current&#41;
mtx&#58; Request Sense&#58; Sense Key=No Sense
mtx&#58; Request Sense&#58; FileMark=no
mtx&#58; Request Sense&#58; EOM=no
mtx&#58; Request Sense&#58; ILI=no
mtx&#58; Request Sense&#58; Additional Sense Code = 00
mtx&#58; Request Sense&#58; Additional Sense Qualifier = 00
mtx&#58; Request Sense&#58; BPV=no
mtx&#58; Request Sense&#58; Error in CDB=no
mtx&#58; Request Sense&#58; SKSV=no
MOVE MEDIUM from Element Address 4096 to 256 Failed
root@NB-2950-NAS1&#58;/etc/bacula# mtx unload 1 0
Unloading drive 0 into Storage Element 1...mtx&#58; Request Sense&#58; Long 
Report=yes
mtx&#58; Request Sense&#58; Valid Residual=no
mtx&#58; Request Sense&#58; Error Code=70 &#40;Current&#41;
mtx&#58; Request Sense&#58; Sense Key=No Sense
mtx&#58; Request Sense&#58; FileMark=no
mtx&#58; Request Sense&#58; EOM=no
mtx&#58; Request Sense&#58; ILI=no
mtx&#58; Request Sense&#58; Additional Sense Code = 00
mtx&#58; Request Sense&#58; Additional Sense Qualifier = 00
mtx&#58; Request Sense&#58; BPV=no
mtx&#58; Request Sense&#58; Error in CDB=no
mtx&#58; Request Sense&#58; SKSV=no
MOVE MEDIUM from Element Address 256 to 4096 Failed
root@NB-2950-NAS1&#58;/etc/bacula# mtx load 1 1
Loading media from Storage Element 1 into drive 1...mtx&#58; Request Sense&#58; 
Long Report=yes
mtx&#58; Request Sense&#58; Valid Residual=no
mtx&#58; Request Sense&#58; Error Code=70 &#40;Current&#41;
mtx&#58; Request Sense&#58; Sense Key=No Sense
mtx&#58; Request Sense&#58; FileMark=no
mtx&#58; Request Sense&#58; EOM=no
mtx&#58; Request Sense&#58; ILI=no
mtx&#58; Request Sense&#58; Additional Sense Code = 00
mtx&#58; Request Sense&#58; Additional Sense Qualifier = 00
mtx&#58; Request Sense&#58; BPV=no
mtx&#58; Request Sense&#58; Error in CDB=no
mtx&#58; Request Sense&#58; SKSV=no
MOVE MEDIUM from Element Address 4096 to 257 Failed
root@NB-2950-NAS1&#58;/etc/bacula# btape -c /etc/bacula/bacula-sd.conf /dev/nst0
Tape block granularity is 1024 bytes.
btape&#58; butil.c&#58;290 Using device&#58; "/dev/nst0" for writing.
02-Jul 12&#58;31 btape JobId 0&#58; 3301 Issuing autochanger "loaded? drive 0" 
command.
02-Jul 12&#58;31 btape JobId 0&#58; 3302 Autochanger "loaded? drive 0", 
result&#58; nothing loaded.
^C
root@NB-2950-NAS1&#58;/etc/bacula# btape -c /etc/bacula/bacula-sd.conf /dev/nst1
Tape block granularity is 1024 bytes.
btape&#58; butil.c&#58;290 Using device&#58; "/dev/nst1" for writing.
02-Jul 12&#58;31 btape JobId 0&#58; 3301 Issuing autochanger "loaded? drive 1" 
command.
02-Jul 12&#58;31 btape JobId 0&#58; 3302 Autochanger "loaded? drive 1", result 
is Slot 1.
btape&#58; btape.c&#58;477 open device "Drive-1" &#40;/dev/nst1&#41;&#58; OK
*test

=== Write, rewind, and re-read test ===

I'm going to write 10000 records and an EOF
then write 10000 records and an EOF, then rewind,
and re-read the data to verify that it is correct.

This is an *essential* feature ...

btape&#58; btape.c&#58;1157 Wrote 10000 blocks of 64412 bytes.
btape&#58; btape.c&#58;609 Wrote 1 EOF to "Drive-1" &#40;/dev/nst1&#41;
btape&#58; btape.c&#58;1173 Wrote 10000 blocks of 64412 bytes.
btape&#58; btape.c&#58;609 Wrote 1 EOF to "Drive-1" &#40;/dev/nst1&#41;
btape&#58; btape.c&#58;1215 Rewind OK.
10000 blocks re-read correctly.
Got EOF on tape.
10000 blocks re-read correctly.
=== Test Succeeded. End Write, rewind, and re-read test ===

btape&#58; btape.c&#58;1283 Block position test
btape&#58; btape.c&#58;1295 Rewind OK.
Reposition to file&#58;block 0&#58;4
Block 5 re-read correctly.
Reposition to file&#58;block 0&#58;200
Block 201 re-read correctly.
Reposition to file&#58;block 0&#58;9999
Block 10000 re-read correctly.
Reposition to file&#58;block 1&#58;0
Block 10001 re-read correctly.
Reposition to file&#58;block 1&#58;600
Block 10601 re-read correctly.
Reposition to file&#58;block 1&#58;9999
Block 20000 re-read correctly.
=== Test Succeeded. End Write, rewind, and re-read test ===



=== Append files test ===

This test is essential to Bacula.

I'm going to write one record&nbsp; in file 0,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;two 
records in file 1,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;and three records in file 2

btape&#58; btape.c&#58;579 Rewound "Drive-1" &#40;/dev/nst1&#41;
btape&#58; btape.c&#58;1914 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1916 Wrote block to device.
btape&#58; btape.c&#58;609 Wrote 1 EOF to "Drive-1" &#40;/dev/nst1&#41;
btape&#58; btape.c&#58;1914 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1916 Wrote block to device.
btape&#58; btape.c&#58;1914 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1916 Wrote block to device.
btape&#58; btape.c&#58;609 Wrote 1 EOF to "Drive-1" &#40;/dev/nst1&#41;
btape&#58; btape.c&#58;1914 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1916 Wrote block to device.
btape&#58; btape.c&#58;1914 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1916 Wrote block to device.
btape&#58; btape.c&#58;1914 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1916 Wrote block to device.
btape&#58; btape.c&#58;609 Wrote 1 EOF to "Drive-1" &#40;/dev/nst1&#41;
btape&#58; btape.c&#58;477 open device "Drive-1" &#40;/dev/nst1&#41;&#58; OK
btape&#58; btape.c&#58;579 Rewound "Drive-1" &#40;/dev/nst1&#41;
btape&#58; btape.c&#58;1427 Now moving to end of medium.
btape&#58; btape.c&#58;630 Moved to end of medium.
We should be in file 3. I am at file 3. This is correct!

Now the important part, I am going to attempt to append to the tape.

btape&#58; btape.c&#58;1914 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1916 Wrote block to device.
btape&#58; btape.c&#58;609 Wrote 1 EOF to "Drive-1" &#40;/dev/nst1&#41;
btape&#58; btape.c&#58;579 Rewound "Drive-1" &#40;/dev/nst1&#41;
Done appending, there should be no I/O errors

Doing Bacula scan of blocks&#58;
1 block of 64448 bytes in file 1
End of File mark.
2 blocks of 64448 bytes in file 2
End of File mark.
3 blocks of 64448 bytes in file 3
End of File mark.
1 block of 64448 bytes in file 4
End of File mark.
Total files=4, blocks=7, bytes = 451,136
End scanning the tape.
We should be in file 4. I am at file 4. This is correct!

The above Bacula scan should have output identical to what follows.
Please double check it ...
=== Sample correct output ===
1 block of 64448 bytes in file 1
End of File mark.
2 blocks of 64448 bytes in file 2
End of File mark.
3 blocks of 64448 bytes in file 3
End of File mark.
1 block of 64448 bytes in file 4
End of File mark.
Total files=4, blocks=7, bytes = 451,136
=== End sample correct output ===

If the above scan output is not identical to the
sample output, you MUST correct the problem
or Bacula will not be able to write multiple Jobs to 
the tape.


=== Write, backup, and re-read test ===

I'm going to write three records and an EOF
then backup over the EOF and re-read the last record.
Bacula does this after writing the last block on the
tape to verify that the block was written correctly.

This is not an *essential* feature ...

btape&#58; btape.c&#58;579 Rewound "Drive-1" &#40;/dev/nst1&#41;
btape&#58; btape.c&#58;816 Wrote first record of 64412 bytes.
btape&#58; btape.c&#58;827 Wrote second record of 64412 bytes.
btape&#58; btape.c&#58;838 Wrote third record of 64412 bytes.
btape&#58; btape.c&#58;609 Wrote 1 EOF to "Drive-1" &#40;/dev/nst1&#41;
btape&#58; btape.c&#58;854 Backspaced over EOF OK.
btape&#58; btape.c&#58;859 Backspace record OK.
btape&#58; btape.c&#58;877 
Block re-read correct. Test succeeded!
=== End Write, backup, and re-read test ===



=== Forward space files test ===

This test is essential to Bacula.

I'm going to write five files then test forward spacing

btape&#58; btape.c&#58;579 Rewound "Drive-1" &#40;/dev/nst1&#41;
btape&#58; btape.c&#58;1914 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1916 Wrote block to device.
btape&#58; btape.c&#58;609 Wrote 1 EOF to "Drive-1" &#40;/dev/nst1&#41;
btape&#58; btape.c&#58;1914 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1916 Wrote block to device.
btape&#58; btape.c&#58;1914 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1916 Wrote block to device.
btape&#58; btape.c&#58;609 Wrote 1 EOF to "Drive-1" &#40;/dev/nst1&#41;
btape&#58; btape.c&#58;1914 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1916 Wrote block to device.
btape&#58; btape.c&#58;1914 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1916 Wrote block to device.
btape&#58; btape.c&#58;1914 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1916 Wrote block to device.
btape&#58; btape.c&#58;609 Wrote 1 EOF to "Drive-1" &#40;/dev/nst1&#41;
btape&#58; btape.c&#58;1914 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1916 Wrote block to device.
btape&#58; btape.c&#58;1914 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1916 Wrote block to device.
btape&#58; btape.c&#58;609 Wrote 1 EOF to "Drive-1" &#40;/dev/nst1&#41;
btape&#58; btape.c&#58;1914 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1916 Wrote block to device.
btape&#58; btape.c&#58;609 Wrote 1 EOF to "Drive-1" &#40;/dev/nst1&#41;
btape&#58; btape.c&#58;579 Rewound "Drive-1" &#40;/dev/nst1&#41;
btape&#58; btape.c&#58;1641 Now forward spacing 1 file.
We should be in file 1. I am at file 1. This is correct!
btape&#58; btape.c&#58;1653 Now forward spacing 2 files.
We should be in file 3. I am at file 3. This is correct!
btape&#58; btape.c&#58;579 Rewound "Drive-1" &#40;/dev/nst1&#41;
btape&#58; btape.c&#58;1666 Now forward spacing 4 files.
We should be in file 4. I am at file 4. This is correct!

btape&#58; btape.c&#58;1684 Now forward spacing 1 more file.
We should be in file 5. I am at file 5. This is correct!

=== End Forward space files test ===


Ah, I see you have an autochanger configured.
To test the autochanger you must have a blank tape
&nbsp;that I can write on in Slot 1.

Do you wish to continue with the Autochanger test? &#40;y/n&#41;&#58; y


=== Autochanger test ===

3301 Issuing autochanger "loaded" command.
Slot 1 loaded. I am going to unload it.
3302 Issuing autochanger "unload 1 1" command.
unload status=Bad 268435457
3992 Bad autochanger command&#58; /etc/bacula/mtx-changer /dev/sg3 unload 1 
/dev/nst1 1
3992 result="/dev/nst1&#58; Input/output error
"&#58; ERR=Child exited with code 1
3303 Issuing autochanger "load 1 1" command.
^C


+----------------------------------------------------------------------
|This was sent by comport3 AT gmail DOT com via Backup Central.
|Forward SPAM to abuse AT backupcentral DOT com.
+----------------------------------------------------------------------



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