Bacula-users

[Bacula-users] Problem with Bacula and LTO-5 unit

2016-06-02 15:53:26
Subject: [Bacula-users] Problem with Bacula and LTO-5 unit
From: Marcelo H P C Chaves <mhpchaves AT gmail DOT com>
To: Bacula Users <bacula-users AT lists.sourceforge DOT net>
Date: Thu, 2 Jun 2016 16:51:55 -0300
Hi,

I've been using OpenBSD with Bacula (and LTO-4 tapes) with great
success for many years.

The bacula server was upgraded to a Dell PowerEdge R420 with one LTO-5
tape unit. And this server is running OpenBSD 5.9-stable.

The problem is that bacula's btape(8) keeps giving me a "Reposition
error" -- I've tried many different parameters, without success
(please see btape output in the end of this message).

Anyone using OpenBSD, Bacula and LTO-5 units?

Thanks!
--Marcelo Chaves

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

hw.vendor=Dell Inc.
hw.product=PowerEdge R420

# dmesg | grep st0
st0 at scsibus5 targ 9 lun 0: <IBM, ULTRIUM-HH5, D2A1> SCSI4
1/sequential removable naa.50050763120e22e0

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

* Bacula Version: 7.4.0 (16 January 2016)

/etc/bacula/bacula-sd.conf

<snip>
Device {
  Name = LTO-5
  Media Type = LTO-5
  Archive Device = /dev/nrst0
}
<snip>

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

# btape -c /etc/bacula/bacula-sd.conf /dev/nrst0
Tape block granularity is 1024 bytes.
btape: butil.c:291-0 Using device: "/dev/nrst0" for writing.
btape: btape.c:471-0 open device "LTO5" (/dev/nrst0): 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: btape.c:1154-0 Wrote 10000 blocks of 64412 bytes.
btape: btape.c:606-0 Wrote 1 EOF to "LTO5" (/dev/nrst0)
btape: btape.c:1170-0 Wrote 10000 blocks of 64412 bytes.
btape: btape.c:606-0 Wrote 1 EOF to "LTO5" (/dev/nrst0)
btape: btape.c:1212-0 Rewind OK.
10000 blocks re-read correctly.
10000 blocks re-read correctly.
=== Test Succeeded. End Write, rewind, and re-read test ===

btape: btape.c:1279-0 Block position test
btape: btape.c:1291-0 Rewind OK.
Reposition to file:block 0:4
Block 5 re-read correctly.
Reposition to file:block 0:200
Block 201 re-read correctly.
Reposition to file:block 0:9999
Block 10000 re-read correctly.
Reposition to file:block 1:0
Block 10001 re-read correctly.
Reposition to file:block 1:600
Block 10601 re-read correctly.
Reposition to file:block 1: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  in file 0,
                   two records in file 1,
             and three records in file 2

btape: btape.c:576-0 Rewound "LTO5" (/dev/nrst0)
btape: btape.c:1909-0 Wrote one record of 64412 bytes.
btape: btape.c:1911-0 Wrote block to device.
btape: btape.c:606-0 Wrote 1 EOF to "LTO5" (/dev/nrst0)
btape: btape.c:1909-0 Wrote one record of 64412 bytes.
btape: btape.c:1911-0 Wrote block to device.
btape: btape.c:1909-0 Wrote one record of 64412 bytes.
btape: btape.c:1911-0 Wrote block to device.
btape: btape.c:606-0 Wrote 1 EOF to "LTO5" (/dev/nrst0)
btape: btape.c:1909-0 Wrote one record of 64412 bytes.
btape: btape.c:1911-0 Wrote block to device.
btape: btape.c:1909-0 Wrote one record of 64412 bytes.
btape: btape.c:1911-0 Wrote block to device.
btape: btape.c:1909-0 Wrote one record of 64412 bytes.
btape: btape.c:1911-0 Wrote block to device.
btape: btape.c:606-0 Wrote 1 EOF to "LTO5" (/dev/nrst0)
btape: btape.c:471-0 open device "LTO5" (/dev/nrst0): OK
btape: btape.c:576-0 Rewound "LTO5" (/dev/nrst0)
btape: btape.c:1422-0 Now moving to end of medium.
btape: btape.c:627-0 Moved to end of medium.
We should be in file 3. I am at file 4. This is NOT correct!!!!

Append test failed. Attempting again.
Setting "Hardware End of Medium = no
    and "Fast Forward Space File = no
and retrying append test.



=== Append files test ===

This test is essential to Bacula.

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

btape: btape.c:576-0 Rewound "LTO5" (/dev/nrst0)
btape: btape.c:1909-0 Wrote one record of 64412 bytes.
btape: btape.c:1911-0 Wrote block to device.
btape: btape.c:606-0 Wrote 1 EOF to "LTO5" (/dev/nrst0)
btape: btape.c:1909-0 Wrote one record of 64412 bytes.
btape: btape.c:1911-0 Wrote block to device.
btape: btape.c:1909-0 Wrote one record of 64412 bytes.
btape: btape.c:1911-0 Wrote block to device.
btape: btape.c:606-0 Wrote 1 EOF to "LTO5" (/dev/nrst0)
btape: btape.c:1909-0 Wrote one record of 64412 bytes.
btape: btape.c:1911-0 Wrote block to device.
btape: btape.c:1909-0 Wrote one record of 64412 bytes.
btape: btape.c:1911-0 Wrote block to device.
btape: btape.c:1909-0 Wrote one record of 64412 bytes.
btape: btape.c:1911-0 Wrote block to device.
btape: btape.c:606-0 Wrote 1 EOF to "LTO5" (/dev/nrst0)
btape: btape.c:471-0 open device "LTO5" (/dev/nrst0): OK
btape: btape.c:576-0 Rewound "LTO5" (/dev/nrst0)
btape: btape.c:1422-0 Now moving to end of medium.
btape: btape.c:624-0 tape_dev.c:620 read error on "LTO5" (/dev/nrst0).
ERR=Input/output error.
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: btape.c:1909-0 Wrote one record of 64412 bytes.
btape: btape.c:1911-0 Wrote block to device.
btape: btape.c:606-0 Wrote 1 EOF to "LTO5" (/dev/nrst0)
btape: btape.c:576-0 Rewound "LTO5" (/dev/nrst0)
Done appending, there should be no I/O errors

Doing Bacula scan of blocks:
02-Jun 14:33 btape JobId 0: Error: block.c:469 Read error on fd=3 at
file:blk 0:7 on device "LTO5" (/dev/nrst0). ERR=Input/output error.
Error reading block. ERR=block.c:469 Read error on fd=3 at file:blk
0:7 on device "LTO5" (/dev/nrst0). ERR=Input/output error.

Total files=0, blocks=7, bytes = 451,136
End scanning the tape.
We should be in file 4. I am at file 0. This is NOT correct!!!!


It looks like the append failed. Attempting again.
Setting "BSF at EOM = yes" and retrying append test.


=== Append files test ===

This test is essential to Bacula.

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

btape: btape.c:576-0 Rewound "LTO5" (/dev/nrst0)
btape: btape.c:1909-0 Wrote one record of 64412 bytes.
btape: btape.c:1911-0 Wrote block to device.
btape: btape.c:606-0 Wrote 1 EOF to "LTO5" (/dev/nrst0)
btape: btape.c:1909-0 Wrote one record of 64412 bytes.
btape: btape.c:1911-0 Wrote block to device.
btape: btape.c:1909-0 Wrote one record of 64412 bytes.
btape: btape.c:1911-0 Wrote block to device.
btape: btape.c:606-0 Wrote 1 EOF to "LTO5" (/dev/nrst0)
btape: btape.c:1909-0 Wrote one record of 64412 bytes.
btape: btape.c:1911-0 Wrote block to device.
btape: btape.c:1909-0 Wrote one record of 64412 bytes.
btape: btape.c:1911-0 Wrote block to device.
btape: btape.c:1909-0 Wrote one record of 64412 bytes.
btape: btape.c:1911-0 Wrote block to device.
btape: btape.c:606-0 Wrote 1 EOF to "LTO5" (/dev/nrst0)
btape: btape.c:471-0 open device "LTO5" (/dev/nrst0): OK
btape: btape.c:576-0 Rewound "LTO5" (/dev/nrst0)
btape: btape.c:1422-0 Now moving to end of medium.
btape: btape.c:624-0 tape_dev.c:620 read error on "LTO5" (/dev/nrst0).
ERR=Input/output error.
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: btape.c:1909-0 Wrote one record of 64412 bytes.
btape: btape.c:1911-0 Wrote block to device.
btape: btape.c:606-0 Wrote 1 EOF to "LTO5" (/dev/nrst0)
btape: btape.c:576-0 Rewound "LTO5" (/dev/nrst0)
Done appending, there should be no I/O errors

Doing Bacula scan of blocks:
02-Jun 14:33 btape JobId 0: Error: block.c:469 Read error on fd=3 at
file:blk 0:7 on device "LTO5" (/dev/nrst0). ERR=Input/output error.
Error reading block. ERR=block.c:469 Read error on fd=3 at file:blk
0:7 on device "LTO5" (/dev/nrst0). ERR=Input/output error.

Total files=0, blocks=7, bytes = 451,136
End scanning the tape.
We should be in file 4. I am at file 0. This is NOT correct!!!!

Append test failed.


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Unable to correct the problem. You MUST fix this
problem before Bacula can use your tape drive correctly

Perhaps running Bacula in fixed block mode will work.
Do so by setting:

Minimum Block Size = nnn
Maximum Block Size = nnn

in your Storage daemon's Device definition.
nnn must match your tape driver's block size, which
can be determined by reading your tape manufacturers
information, and the information on your kernel dirver.
Fixed block sizes, however, are not normally an ideal solution.

Some systems, e.g. OpenBSD, require you to set
   Use MTIOCGET= no
in your device resource. Use with caution.
*
*q

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

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
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>
  • [Bacula-users] Problem with Bacula and LTO-5 unit, Marcelo H P C Chaves <=