Skip to contentSkip to conversation

2.5.72: SCSI tape error handling

DISCUSSION Bob Tracy 3 participants 4 messages Jun 19, 2003 – Jun 20, 2003

Subsystems (2)
lore
Share & tools
lore

Bob Tracy

author
#0 lore raw

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).

Signature · 4 lines
-----------------------------------------------------------------------
Bob Tracy                   WTO + WIPO = DMCA? http://www.anti-dmca.org
[email protected]
-----------------------------------------------------------------------
#1 lore raw
Quoted 4 lines · Bob Tracy

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:

Quoted 9 lines
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):

drivers/scsi/st.c +1 -0
@@ -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.

Signature · 1 line
Kai
author
#2 lore raw
Quoted 7 lines · Kai Makisara

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 :-).

Signature · 4 lines
-----------------------------------------------------------------------
Bob Tracy                   WTO + WIPO = DMCA? http://www.anti-dmca.org
[email protected]
-----------------------------------------------------------------------
#3 lore raw
Quoted 5 lines · Bob Tracy
Quoted 4 lines · Kai Makisara

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):

Quoted 8 lines
Quoted 3 lines

(...)

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.

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