Incorrect Number of Blocks or Positioning Errors

Bacula’s preferred method of working with tape drives (sequential devices) is to run in variable block mode, and this is what is set by default. You should first ensure that your tape drive is set for variable block mode (see below).

If your tape drive is in fixed block mode and you have told Bacula to use different fixed block sizes or variable block sizes (default), you will get errors when Bacula attempts to forward space to the correct block (the kernel driver’s idea of tape blocks will not correspond to Bacula’s).

Even in variable block mode, with the exception of the first record on the second or subsequent volume of a multi-volume backup, Bacula will write blocks of a fixed size. However, in reading a tape, Bacula will assume that for each read request, exactly one block from the tape will be transferred. This the most common way that tape drives work and is well supported by Bacula.

Drives that run in fixed block mode can cause serious problems for Bacula if the drive’s block size does not correspond exactly to Bacula’s block size. In fixed block size mode, drivers may transmit a partial block or multiple blocks for a single read request. From Bacula’s point of view, this destroys the concept of tape blocks. It is much better to run in variable block mode, and almost all modern drives run in variable block mode. In order for Bacula to run in fixed block mode, you must include the following records in the Storage daemon’s Device resource definition:

Minimum Block Size = nnn
Maximum Block Size = nnn

where nnn must be the same for both records and must be identical to the driver’s fixed block size.

We recommend that you avoid this configuration if at all possible by using variable block sizes.

If you must run with fixed size blocks, make sure they are not 512 bytes. This is too small and the overhead that Bacula has with each record will become excessive.

To recover files from tapes written in fixed block mode, see below.

Go back to the Troubleshooting chapter.

Go back to the Tape Autochanger Setup chapter.

Go back to the main Advanced Features Usage page.