On Friday 26 June 2009 15:19:03 James Harper wrote:
> I am getting the following error when backing up under Windows x64:
>
> 26-Jun 22:45 beast-sd JobId 112: Error:
> /home/kern/bacula/k/src/stored/block.c:568 Write error at 170:7845 on
> device "TapeStorage" (Tape0). ERR=Input/output error.
>
> The stored is running under Windows too, but is 32 bit. The problem
> occurs occasionally and randomly (eg one in every 4 backups or so).
> There are no scsi errors reported in the Windows event logs so I don't
> think it's an actual tape error. Purging the volume and restarting the
> backup works most of the time (small chance of it happening again)
>
> The backup device is a scsi attached LTO3 tape drive.
>
> My plan of attack will just be to add some more description about the
> error and go from there (eg is it really an error or some status that is
> being interpreted as an unrecoverable error?)... but any other
> suggestions would be greatly appreciated.
>

Look at <bacula>/src/win32/stored/mtops.cpp.  That is the tape operation 
Unix/Win32 compatibility layer, and almost certainly, there is a problem in 
that routine somewhere.

I see in looking at the code that the compatibility layer was not correctly 
written.  It tries itself to convert from Win32 errors to Unix errnos, and 
that is not the best tactic.  In fact, when there is an error in some Win32 
API, within Bacula code, you should return with errno = b_errno_win32; 
(where b_errno_win32 is set to 1<<29) then the main Bacula routines will know 
go and get the *real* Win32 error message (get_last_error) and display it 
rather than printing some Unixized conversion of the Win32 error code into a 
Unux approximation.

Just making that change should make the error messages many times better.
Take a look atou how errors are handled (for the most part) in 
<bacula>/sys/compat/compat.cpp and you will see what I mean.

Best regards,

Kern

PS: This is one of the reasons that we do not support the Win32 Dir and SD -- 
their compatibility code needs a lot of work to bring them up to Bacula 
standards.

------------------------------------------------------------------------------
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to