Bacula-users

[Bacula-users] label barcodes on Quantum Scalar i500

2010-04-26 12:56:54
Subject: [Bacula-users] label barcodes on Quantum Scalar i500
From: ekke85 <bacula-forum AT backupcentral DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Mon, 26 Apr 2010 11:45:31 -0400
Hi

I hope someone can help me or point me in the right direction. I have a bran 
new Quantum Scalar i500 with 5 drives and 125 slots. When ever I try to do 
"label barcodes" it fails with timeout errors. Bacula is reading the barcodes 
from the tape drive but is not labeling it.

==============================================
This is my bacula-sd.conf:
==============================================

Autochanger &#123;
&nbsp; Name = Autochanger
&nbsp; Changer Device = /dev/sg3
&nbsp; Device = Ultrium-4-SCSI-1, Ultrium-4-SCSI-2, Ultrium-4-SCSI-3, 
Ultrium-4-SCSI-4, Ultrium-4-SCSI-5
&nbsp; Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d"
&#125;



Device &#123;
&nbsp; Name = Ultrium-4-SCSI-1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; #
&nbsp; Archive Device = /dev/nst0
&nbsp; Device Type = Tape
&nbsp; Media Type = ULTRIUM-LTO-4
&nbsp; Autochanger = Yes
&nbsp; Alert Command = "sh -c 'smartctl -H -l error %c'"
&nbsp; Drive Index = 0
&nbsp; RemovableMedia = yes
&nbsp; Random Access = no
&nbsp; Maximum Spool Size = 30gb
&nbsp; Maximum Job Spool Size = 10gb
&nbsp; Spool Directory = /var/spool/backup
&#125;

Device &#123;
&nbsp; Name = Ultrium-4-SCSI-2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; #
&nbsp; Archive Device = /dev/nst1
&nbsp; Device Type = Tape
&nbsp; Media Type = ULTRIUM-LTO-4
&nbsp; Autochanger = Yes
&nbsp; Alert Command = "sh -c 'smartctl -H -l error %c'"
&nbsp; Drive Index = 1
&nbsp; RemovableMedia = yes
&nbsp; Random Access = no
&nbsp; Maximum Spool Size = 30gb
&nbsp; Maximum Job Spool Size = 10gb
&nbsp; Spool Directory = /var/spool/backup
&#125;

Device &#123;
&nbsp; Name = Ultrium-4-SCSI-3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; #
&nbsp; Archive Device = /dev/nst2
&nbsp; Device Type = Tape
&nbsp; Media Type = ULTRIUM-LTO-4
&nbsp; Autochanger = Yes
&nbsp; Alert Command = "sh -c 'smartctl -H -l error %c'"
&nbsp; Drive Index = 2
&nbsp; RemovableMedia = yes
&nbsp; Random Access = no
&nbsp; Maximum Spool Size = 30gb
&nbsp; Maximum Job Spool Size = 10gb
&nbsp; Spool Directory = /var/spool/backup
&#125;

Device &#123;
&nbsp; Name = Ultrium-4-SCSI-4&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; #
&nbsp; Archive Device = /dev/nst3
&nbsp; Device Type = Tape
&nbsp; Media Type = ULTRIUM-LTO-4
&nbsp; Autochanger = Yes
&nbsp; Alert Command = "sh -c 'smartctl -H -l error %c'"
&nbsp; Drive Index = 3
&nbsp; RemovableMedia = yes
&nbsp; Random Access = no
&nbsp; Maximum Spool Size = 30gb
&nbsp; Maximum Job Spool Size = 10gb
&nbsp; Spool Directory = /var/spool/backup
&#125;

Device &#123;
&nbsp; Name = Ultrium-4-SCSI-5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; #
&nbsp; Archive Device = /dev/nst4
&nbsp; Device Type = Tape
&nbsp; Media Type = ULTRIUM-LTO-4
&nbsp; Autochanger = Yes
&nbsp; Alert Command = "sh -c 'smartctl -H -l error %c'"
&nbsp; Drive Index = 4
&nbsp; RemovableMedia = yes
&nbsp; Random Access = no
&nbsp; Maximum Spool Size = 30gb
&nbsp; Maximum Job Spool Size = 10gb
&nbsp; Spool Directory = /var/spool/backup
&#125;

==============================================
and this is my bacula-dir.conf
==============================================
Storage &#123;
&nbsp; Name = Autochanger
&nbsp; Address = rhbackup3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; 
&nbsp; SDPort = 9103
&nbsp; Password = "somepasswd" 
&nbsp; Device = Autochanger
&nbsp; Media Type = ULTRIUM-LTO-4&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp;
&nbsp; Autochanger = yes&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp;
&#125;

==============================================

When I run the btape test it works fine with no issues or errors.

btape -c /etc/bacula/bacula-sd.conf /dev/nst3
Tape block granularity is 1024 bytes.
btape&#58; butil.c&#58;284 Using device&#58; "/dev/nst3" for writing.
26-Apr 11&#58;14 btape JobId 0&#58; 3301 Issuing autochanger "loaded? drive 3" 
command.
26-Apr 11&#58;14 btape JobId 0&#58; 3302 Autochanger "loaded? drive 3", 
result&#58; nothing loaded.
26-Apr 11&#58;14 btape JobId 0&#58; 3301 Issuing autochanger "loaded? drive 3" 
command.
26-Apr 11&#58;14 btape JobId 0&#58; 3302 Autochanger "loaded? drive 3", 
result&#58; nothing loaded.
btape&#58; btape.c&#58;476 open device "Ultrium-4-SCSI-4" 
&#40;/dev/nst3&#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;1148 Wrote 10000 blocks of 64412 bytes.
btape&#58; btape.c&#58;608 Wrote 1 EOF to "Ultrium-4-SCSI-4" &#40;/dev/nst3&#41;
btape&#58; btape.c&#58;1164 Wrote 10000 blocks of 64412 bytes.
btape&#58; btape.c&#58;608 Wrote 1 EOF to "Ultrium-4-SCSI-4" &#40;/dev/nst3&#41;
btape&#58; btape.c&#58;1206 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;1274 Block position test
btape&#58; btape.c&#58;1286 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;578 Rewound "Ultrium-4-SCSI-4" &#40;/dev/nst3&#41;
btape&#58; btape.c&#58;1905 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1907 Wrote block to device.
btape&#58; btape.c&#58;608 Wrote 1 EOF to "Ultrium-4-SCSI-4" &#40;/dev/nst3&#41;
btape&#58; btape.c&#58;1905 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1907 Wrote block to device.
btape&#58; btape.c&#58;1905 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1907 Wrote block to device.
btape&#58; btape.c&#58;608 Wrote 1 EOF to "Ultrium-4-SCSI-4" &#40;/dev/nst3&#41;
btape&#58; btape.c&#58;1905 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1907 Wrote block to device.
btape&#58; btape.c&#58;1905 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1907 Wrote block to device.
btape&#58; btape.c&#58;1905 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1907 Wrote block to device.
btape&#58; btape.c&#58;608 Wrote 1 EOF to "Ultrium-4-SCSI-4" &#40;/dev/nst3&#41;
26-Apr 11&#58;15 btape JobId 0&#58; 3301 Issuing autochanger "loaded? drive 3" 
command.
26-Apr 11&#58;15 btape JobId 0&#58; 3302 Autochanger "loaded? drive 3", 
result&#58; nothing loaded.
btape&#58; btape.c&#58;476 open device "Ultrium-4-SCSI-4" 
&#40;/dev/nst3&#41;&#58; OK
btape&#58; btape.c&#58;578 Rewound "Ultrium-4-SCSI-4" &#40;/dev/nst3&#41;
btape&#58; btape.c&#58;1418 Now moving to end of medium.
btape&#58; btape.c&#58;629 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;1905 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1907 Wrote block to device.
btape&#58; btape.c&#58;608 Wrote 1 EOF to "Ultrium-4-SCSI-4" &#40;/dev/nst3&#41;
btape&#58; btape.c&#58;578 Rewound "Ultrium-4-SCSI-4" &#40;/dev/nst3&#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;578 Rewound "Ultrium-4-SCSI-4" &#40;/dev/nst3&#41;
btape&#58; btape.c&#58;813 Wrote first record of 64412 bytes.
btape&#58; btape.c&#58;824 Wrote second record of 64412 bytes.
btape&#58; btape.c&#58;835 Wrote third record of 64412 bytes.
btape&#58; btape.c&#58;608 Wrote 1 EOF to "Ultrium-4-SCSI-4" &#40;/dev/nst3&#41;
btape&#58; btape.c&#58;851 Backspaced over EOF OK.
btape&#58; btape.c&#58;856 Backspace record OK.
btape&#58; btape.c&#58;874 
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;578 Rewound "Ultrium-4-SCSI-4" &#40;/dev/nst3&#41;
btape&#58; btape.c&#58;1905 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1907 Wrote block to device.
btape&#58; btape.c&#58;608 Wrote 1 EOF to "Ultrium-4-SCSI-4" &#40;/dev/nst3&#41;
btape&#58; btape.c&#58;1905 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1907 Wrote block to device.
btape&#58; btape.c&#58;1905 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1907 Wrote block to device.
btape&#58; btape.c&#58;608 Wrote 1 EOF to "Ultrium-4-SCSI-4" &#40;/dev/nst3&#41;
btape&#58; btape.c&#58;1905 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1907 Wrote block to device.
btape&#58; btape.c&#58;1905 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1907 Wrote block to device.
btape&#58; btape.c&#58;1905 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1907 Wrote block to device.
btape&#58; btape.c&#58;608 Wrote 1 EOF to "Ultrium-4-SCSI-4" &#40;/dev/nst3&#41;
btape&#58; btape.c&#58;1905 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1907 Wrote block to device.
btape&#58; btape.c&#58;1905 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1907 Wrote block to device.
btape&#58; btape.c&#58;608 Wrote 1 EOF to "Ultrium-4-SCSI-4" &#40;/dev/nst3&#41;
btape&#58; btape.c&#58;1905 Wrote one record of 64412 bytes.
btape&#58; btape.c&#58;1907 Wrote block to device.
btape&#58; btape.c&#58;608 Wrote 1 EOF to "Ultrium-4-SCSI-4" &#40;/dev/nst3&#41;
btape&#58; btape.c&#58;578 Rewound "Ultrium-4-SCSI-4" &#40;/dev/nst3&#41;
btape&#58; btape.c&#58;1632 Now forward spacing 1 file.
We should be in file 1. I am at file 1. This is correct!
btape&#58; btape.c&#58;1644 Now forward spacing 2 files.
We should be in file 3. I am at file 3. This is correct!
btape&#58; btape.c&#58;578 Rewound "Ultrium-4-SCSI-4" &#40;/dev/nst3&#41;
btape&#58; btape.c&#58;1657 Now forward spacing 4 files.
We should be in file 4. I am at file 4. This is correct!

btape&#58; btape.c&#58;1675 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; yes


=== Autochanger test ===

3301 Issuing autochanger "loaded" command.
Nothing loaded in the drive. OK.
3303 Issuing autochanger "load 1 3" command.
3303 Autochanger "load 1 3" status is OK.
26-Apr 11&#58;17 btape JobId 0&#58; 3301 Issuing autochanger "loaded? drive 3" 
command.
26-Apr 11&#58;18 btape JobId 0&#58; 3302 Autochanger "loaded? drive 3", result 
is Slot 1.
btape&#58; btape.c&#58;476 open device "Ultrium-4-SCSI-4" 
&#40;/dev/nst3&#41;&#58; OK
btape&#58; btape.c&#58;1562 Rewound "Ultrium-4-SCSI-4" &#40;/dev/nst3&#41;
btape&#58; btape.c&#58;1569 Wrote EOF to "Ultrium-4-SCSI-4" &#40;/dev/nst3&#41;

The test autochanger worked!!

=============================================
But then when I am in bconsole and try to do label barcodes I get:

rhbackup3 bacula&#93;# bconsole 
Connecting to Director uk5-rhbackup3&#58;9101
1000 OK&#58; rhbackup3.mblox.com-dir Version&#58; 5.0.1 &#40;24 February 
2010&#41;
Enter a period to cancel a command.
*label barcodes slots=1
Automatically selected Catalog&#58; MyCatalog
Using Catalog "MyCatalog"
The defined Storage resources are&#58;
&nbsp; &nbsp; &nbsp;1&#58; File
&nbsp; &nbsp; &nbsp;2&#58; Autochanger
Select Storage resource &#40;1-2&#41;&#58; 2
Connecting to Storage daemon Autochanger at rhbackup3&#58;9103 ...
Enter autochanger drive&#91;0&#93;&#58; 
Connecting to Storage daemon Autochanger at rhbackup3&#58;9103 ...
3306 Issuing autochanger "slots" command.
Device "Autochanger" has 131 slots.
Connecting to Storage daemon Autochanger at rhbackup3&#58;9103 ...
3306 Issuing autochanger "list" command.
The following Volumes will be labeled&#58;
Slot&nbsp; Volume
==============
&nbsp; &nbsp;1&nbsp; MBX181
Do you want to label these Volumes? &#40;yes|no&#41;&#58; yes
Defined Pools&#58;
&nbsp; &nbsp; &nbsp;1&#58; Default
&nbsp; &nbsp; &nbsp;2&#58; File
&nbsp; &nbsp; &nbsp;3&#58; Scratch
Select the Pool &#40;1-3&#41;&#58; 1
Connecting to Storage daemon Autochanger at rhbackup3&#58;9103 ...
Sending label command for Volume "MBX181" Slot 1 ...
3301 Issuing autochanger "loaded? drive 0" command.
3302 Autochanger "loaded? drive 0", result&#58; nothing loaded.
3304 Issuing autochanger "load slot 1, drive 0" command.
3992 Bad autochanger "load slot 1, drive 0"&#58; ERR=Child died from signal 
15&#58; Termination.
Results=Program killed by Bacula &#40;timeout&#41;
Label command failed for Volume MBX181.

I also have 20100426-15&#58;37&#58;17 Device /dev/nst0 - not ready, retrying... 
in the log. I am not sure what I am doing wrong here, if anyone has had this 
before...please help. Also let me know if there is any other information that 
you might need.

ekke85

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



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