Hello Dan,

From the output, it looks to me like:

- Either the tape driver is ignoring the Logical End of Tape mark

- or the tape driver is considering the Logical End of Tape mark as the last point it can write and blocking further writes

- or there is no Logical End of Tape marker on the tape (manufacturing defect or tape marker not functioning because of age possibly it pealed off).

If you have a new tape for which the test succeeds, I would like to see the output as it should indicate that my last point above is the problem.

The message
    Error 5, Retries exhausted

could mean that the tape driver tried 5 times and got the same error, which would point most strongly at my last point.

If you want to go further, there are 4 things possible to try:

1. Find out what changes were made in the last version of the kernel tape driver.

2. Try running the test on the same tape drive with the same tape, but with an older FreeBSD.  If it continues to fail, it is almost surely the tape.

3. Run the same test with a tape that works and send me the output.  If no tape works, then it is most likely a problem with the tape driver.

4. Ensure that you have the most recent tape drive firmware loaded.

===

What *should* happen is that Bacula receives a -1 status in writing (possibly fewer bytes are written than requested), then Bacula should write and EOF mark and it should succeed. After the first -1 status returned from a write, Bacula *should* be able to write a number of blocks without a failure (but it never does this).  Finally there will be a -1 status returned, that is definitive because all subsequent attempts to write will get a -1 status.

So the Logicial End of Tape marker should cause the driver to return a -1, which indicates to Bacula that the tape is almost at the end.  Normally, there should be at least a few megabytes of tape left where Bacula could write (but never does) until the physical end of the tape is reached.  Thus the Logical End of Tape marker permits a clean termination to writing a tape with no partial or extra blocks and still permits terminating with two EOF marks (End of Medium).

Best regards,
Kern

On 24.05.2015 20:19, Dan Langille wrote:

      
On May 20, 2015, at 3:37 AM, Kern Sibbald <k...@sibbald.com> wrote:

Hello Dan,

We recently discussed a problem with logical end of tape markers on the
newest FreeBSD system.  That reminded me of the previous time we had
problems, and it took us a very long time to find the problem 3-4 months
if I remember right.

Anyway, here is your email on the subject and the source of the file
that we used to diagnose the problem.  I would be a bit surprised if the
current problem is the same thing, but it is probably worth trying.  I
haven't tried compiling the program recently so let me know if you have
problems.

Best regards,
Kern

PS: It took me a long time to find these attachments because I thought
they were in the test environment, but it looks like I committed them to
the bacula/platforms/freebsd directory.
Compiling on FreeBSD 9.3:

$   c++ -g -O2 -Wall -c tapetest.c
tapetest.c: In function 'void rrcmd()':
tapetest.c:327: warning: deprecated conversion from string constant to 'char*'
tapetest.c: At global scope:
tapetest.c:526: warning: deprecated conversion from string constant to 'char*'
tapetest.c:526: warning: deprecated conversion from string constant to 'char*'
tapetest.c:526: warning: deprecated conversion from string constant to 'char*'
tapetest.c:526: warning: deprecated conversion from string constant to 'char*'
tapetest.c:526: warning: deprecated conversion from string constant to 'char*'
tapetest.c:526: warning: deprecated conversion from string constant to 'char*'
tapetest.c:526: warning: deprecated conversion from string constant to 'char*'
tapetest.c:526: warning: deprecated conversion from string constant to 'char*'
tapetest.c:526: warning: deprecated conversion from string constant to 'char*'
tapetest.c:526: warning: deprecated conversion from string constant to 'char*'
tapetest.c:526: warning: deprecated conversion from string constant to 'char*'
tapetest.c:526: warning: deprecated conversion from string constant to 'char*'
tapetest.c:526: warning: deprecated conversion from string constant to 'char*'
tapetest.c:526: warning: deprecated conversion from string constant to 'char*'
tapetest.c:526: warning: deprecated conversion from string constant to 'char*'
tapetest.c:526: warning: deprecated conversion from string constant to 'char*'
tapetest.c: In function 'void do_tape_cmds()':
tapetest.c:535: warning: deprecated conversion from string constant to 'char*'

$   c++ -g -O2 -Wall tapetest.o -o tapetest
$


 $ sudo ./tapetest /dev/sa0
*rewind
Rewound /dev/sa0
*rawfill
Begin writing blocks of 64512 bytes.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
weof_dev
ioctl MTWEOF error on /dev/sa0. ERR=Input/output error.
Bad status from weof -1. ERR=Input/output error
Write failed.  Last block written=52274. stat=24576 ERR=No such file or directory
*

>From /var/log/messages:

May 24 18:17:57 knew kernel: (sa0:sym0:0:1:0): WRITE FILEMARKS(6). CDB: 10 00 00 00 01 00 
May 24 18:17:57 knew kernel: (sa0:sym0:0:1:0): CAM status: SCSI Status Error
May 24 18:17:57 knew kernel: (sa0:sym0:0:1:0): SCSI status: Check Condition
May 24 18:17:57 knew kernel: (sa0:sym0:0:1:0): SCSI sense: MEDIUM ERROR asc:c,0 (Write error)
May 24 18:17:57 knew kernel: (sa0:sym0:0:1:0): Command Specific Info: 0xca7b
May 24 18:17:57 knew kernel: (sa0:sym0:0:1:0): Error 5, Retries exhausted

— 
Dan Langille
http://langille.org/






------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to