2003-06-19 21:22:38

by Bob Tracy

[permalink] [raw]
Subject: 2.5.72: SCSI tape error handling

I was trying to do the responsible thing and back up my system today
(for the first time in too many weeks :-)), and got the following
errors in syslog about 15 minutes into the process:

Jun 19 09:55:04 gherkin kernel: st0: Error with sense data: Info fld=0x3ba, Deferred stst0: sense key Medium Error
Jun 19 09:55:04 gherkin kernel: Additional sense: Write append position error
Jun 19 09:55:04 gherkin kernel: st0: Error with sense data: Current stst0: sense key Medium Error
Jun 19 09:55:04 gherkin kernel: Additional sense: Write append position error
Jun 19 09:55:04 gherkin kernel: st0: Error with sense data: Current stst0: sense key Medium Error
Jun 19 09:55:04 gherkin kernel: Additional sense: Write append position error
(... ad infinitum for the next three hours -- backup was unattended.
There were no error messages of any kind on the console.)

I'm going to ASSume that cpio would have done something appropriate if
the underlying write() call had returned some kind of error. The fact
that write() is evidently NOT returning an error is a problem. For me,
it's a show-stopper. I can handle bad tapes if the userland side of
things will report there's a problem.

st0 is an Exabyte 8mm tape drive. SCSI adapter is an Adaptec 2930U2
using the new aic7xxx driver (as included with the 2.5.72 kernel).

--
-----------------------------------------------------------------------
Bob Tracy WTO + WIPO = DMCA? http://www.anti-dmca.org
[email protected]
-----------------------------------------------------------------------


2003-06-20 11:57:32

by Kai Mäkisara (Kolumbus)

[permalink] [raw]
Subject: Re: 2.5.72: SCSI tape error handling

On Thu, 19 Jun 2003, Bob Tracy wrote:

> I was trying to do the responsible thing and back up my system today
> (for the first time in too many weeks :-)), and got the following
> errors in syslog about 15 minutes into the process:
>
> Jun 19 09:55:04 gherkin kernel: st0: Error with sense data: Info fld=0x3ba, Deferred stst0: sense key Medium Error
> Jun 19 09:55:04 gherkin kernel: Additional sense: Write append position error
> Jun 19 09:55:04 gherkin kernel: st0: Error with sense data: Current stst0: sense key Medium Error
> Jun 19 09:55:04 gherkin kernel: Additional sense: Write append position error
> Jun 19 09:55:04 gherkin kernel: st0: Error with sense data: Current stst0: sense key Medium Error
> Jun 19 09:55:04 gherkin kernel: Additional sense: Write append position error
> (... ad infinitum for the next three hours -- backup was unattended.
> There were no error messages of any kind on the console.)
>
st does not currently return error for any write problems except when at
EOT. The following one-liner fixes the bug (probably mangled by my mail
client):

--- linux-2.5.72-bk2/drivers/scsi/st.c 2003-06-19 20:43:38.000000000 +0300
+++ linux-2.5.72-bk2-km/drivers/scsi/st.c 2003-06-20 14:56:44.000000000 +0300
@@ -1555,6 +1555,7 @@
}
} else {
filp->f_pos -= do_count;
+ count += do_count;
STps->drv_block = (-1); /* Too cautious? */
retval = (-EIO);
}

Thanks for the report.

--
Kai

2003-06-20 12:54:35

by Bob Tracy

[permalink] [raw]
Subject: Re: 2.5.72: SCSI tape error handling

Kai Makisara wrote:
> st does not currently return error for any write problems except when at
> EOT. The following one-liner fixes the bug (probably mangled by my mail
> client):
>
> (...)
>
> Thanks for the report.

Thank *you* for the fix! With disk drive capacities greatly
outstripping my budgetary ability to buy tape drives that are up to the
task, I don't know how much longer I'll consider tape to be a viable
backup option, but I can now hang in there a bit longer :-).

--
-----------------------------------------------------------------------
Bob Tracy WTO + WIPO = DMCA? http://www.anti-dmca.org
[email protected]
-----------------------------------------------------------------------

2003-06-20 17:41:57

by Bill Davidsen

[permalink] [raw]
Subject: Re: 2.5.72: SCSI tape error handling

On Fri, 20 Jun 2003, Bob Tracy wrote:

> Kai Makisara wrote:
> > st does not currently return error for any write problems except when at
> > EOT. The following one-liner fixes the bug (probably mangled by my mail
> > client):
> >
> > (...)
> >
> > Thanks for the report.
>
> Thank *you* for the fix! With disk drive capacities greatly
> outstripping my budgetary ability to buy tape drives that are up to the
> task, I don't know how much longer I'll consider tape to be a viable
> backup option, but I can now hang in there a bit longer :-).

I bought a DVD burner, that seems reasonably cost effective today, and I'm
hoping that hot swap IDE drives will be mature in a year or so. I've
swapped them by turning the whole cable off with hdparm, but it is *not* a
supported operation.

Maybe firewire/USB2.0 drives, the actual drives are reasonably cheap now.

Glad to see the fix, I have 4mm and 8mm tape.

--
bill davidsen <[email protected]>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.