Incorrect File Number

When Bacula moves to the end of the medium, it normally uses the ioctl(MTEOM) function. Then Bacula uses the ioctl(MTIOCGET) function to retrieve the current file position from the mt_fileno field. Some SCSI tape drivers will use a fast means of seeking to the end of the medium and in doing so, they will not know the current file position and hence return a -1. As a consequence, if you get “This is NOT correct!” in the positioning tests, this may be the cause. You must correct this condition in order for Bacula to work.

There are two possible solutions to the above problem of incorrect file number:

  • Figure out how to configure your SCSI driver to keep track of the file position during the MTEOM request. This is the preferred solution.

  • Modify the Device resource of your bacula-sd.conf file to include:

    Hardware End of File = no
    

This will cause Bacula to use the MTFSF request to seek to the end of the medium, and Bacula will keep track of the file number itself.

Go back to the Troubleshooting chapter.

Go back to the Tape Autochanger Setup chapter.

Go back to the main Advanced Features Usage page.