Dear Kern,

in message <[EMAIL PROTECTED]> you wrote:
>
> All your reasoning is absolutely perfect up to this previous point.  In 
> looking at the Bacula error messages that you list above, it is always an I/O 
> error writing a Bacula block that produces the problem.  Once Bacula gets an 

Argh... Thanks for pointing this out. So I always misinterpreted  the
events.

> IMO, the source problem is coming when writing the buffers (a write() 
> request) 
> and not subsequent ioctl(WEOF).  Also, between the write() that fails and the 
> ioctl(WEOF), Bacula will issue some other ioctl(), which varies according to 
> the OS.  This ioctl() on a Linux machine, for example, is ioctl() MTIOCTOP 
> with mt_op=MTIOCLRERR.  In all cases, the purpose of this ioctl() between the 
> write() and the ioctl(WEOF) is to attempt to clear any error condition in the 
> SCSI driver to permit a valid EOF to terminate the Volume.  On Linux, this 
> may not be necessary, but on other OSes such as FreeBSD, the SCSI driver 
> locks out virtually all I/O operations after a serious error.

OK.

> My best guess is that the problem is some sort of kernel SCSI lock race 
> condition.  As a consequence, I would recommend that you concentrate on 
> writing lots of buffers as fast as you can, but from multiple processes, 
> possibly to the same or different drives.  In fact, you might try firing off 
> several hundred write processes, and possibly a few read processes to another 
> drive. 

I will try that, but you just blowed my theory  of  why  we  see  the
problem  only  with  bacula,  but  never (yet) with any other program
writing to tape.

> When the SCSI driver complains about an unexpected disconnect, it is very 
> likely because it either missed an interrupt or it issued a command at a bad 
> time (i.e. a missing lock), or it overran the SCSI command queue.

I will try to run some tests...

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
"...this does not mean that some of us should not want, in  a  rather
dispassionate sort of way, to put a bullet through csh's head."
                   - Larry Wall in <[EMAIL PROTECTED]>


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to