Bug 167404

Summary: Travan tape Seagate STT3401A doesn't work with ide_scsi
Product: [Fedora] Fedora Reporter: Jiri Pavlovsky <jira>
Component: kernelAssignee: Dave Jones <davej>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: high Docs Contact:
Priority: medium    
Version: 4CC: mikee, pfrields, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-12-06 23:27:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jiri Pavlovsky 2005-09-02 12:36:12 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6

Description of problem:
I have Seagate STT3401A tape drive for backups. Using ide_scsi.
tar cf /dev/st0 some_files will run generating lots of errors (see below)
and end with an error unfinished.

log excerpt
---------------------------------------
kernel:     Additional sense: Invalid command operation code
kernel: st0: Error with sense data: <6>st0: Current: sense key: Illegal Request
kernel:     Additional sense: Invalid command operation code
kernel: st0: Error with sense data: <6>st0: Current: sense key: Illegal Request
kernel:     Additional sense: Invalid command operation code
kernel: st0: Error with sense data: <6>st0: Current: sense key: Illegal Request
kernel:     Additional sense: Invalid command operation code
kernel: ide-scsi: CoD != 0 in idescsi_pc_intr
duron kernel: hde: ATAPI reset complete
duron kernel: st0: Error with sense data: <6>st0: Current: sense key: Unit Attention
kernel:     Additional sense: Power on, reset, or bus device reset occurred
kernel: Info fld=0x14
kernel: st0: Error with sense data: <6>st0: Current: sense key: Not Ready
kernel:     Additional sense: Logical unit is in process of becoming ready
kernel: Info fld=0x1
kernel: st0: Error on write filemark.
kernel: st0: Error with sense data: <6>st0: Current: sense key: Not Ready
kernel:     Additional sense: Logical unit is in process of becoming ready
S

Version-Release number of selected component (if applicable):
kernel-2.6.12-1.1447_FC4

How reproducible:
Always

Steps to Reproduce:
1. modprobe ide_scsi
2. 
3.
  

Additional info:

Comment 1 Mike Evans 2005-09-04 14:32:06 UTC
I have a similar problem with a Seagate STT20000A
using ide_scsi and
kernel 2.6.12-1.1376_FC3

>mt status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 512 bytes. Density code 0x47 (TR-5).
Soft error count since last status=0
General status bits on (41010000):
 BOT ONLINE IM_REP_EN


From >tail /var/log/messages
st0: Error with sense data: <6>st0: Current: sense key: Illegal Request    
Additional sense: Invalid command operation code

> tar cvf /dev/st0 some_dir
appears to work but...
tar tvf /dev/st0
returns with no files listed

This used to work in earlier kernels

Comment 2 Dave Jones 2005-09-30 06:28:35 UTC
Mass update to all FC4 bugs:

An update has been released (2.6.13-1.1526_FC4) which rebases to a new upstream
kernel (2.6.13.2). As there were ~3500 changes upstream between this and the
previous kernel, it's possible your bug has been fixed already.

Please retest with this update, and update this bug if necessary.

Thanks.


Comment 3 Jiri Pavlovsky 2005-10-03 10:35:32 UTC
(In reply to comment #2)
> Mass update to all FC4 bugs:
> 
> An update has been released (2.6.13-1.1526_FC4) which rebases to a new upstream
> kernel (2.6.13.2). As there were ~3500 changes upstream between this and the
> previous kernel, it's possible your bug has been fixed already.

It's still broken. tar cfv /dev/st0 some_files finishes, but during the run
errors (see below) appear and aftr each of them the tape is rewinded so the
archive is incomplete and broken. For the same reason tar tvf /dev/st0 never
fineshed...
-------------

ide-scsi: CoD != 0 in idescsi_pc_intr
hde: ATAPI reset timed-out, status=0x80
de2: reset: success

Comment 4 Jiri Pavlovsky 2005-10-24 11:12:10 UTC
Still broken with 2.6.13-1.1532_FC4

Comment 5 Mike Evans 2005-10-24 11:51:45 UTC
I have a potential fix.  I compiled a kernel from the 2.6.13 sources, enabling
SCSI tape in device drivers as a module.  Add hdc=ide-tape in the grub config
file.  The tape drive is now at /dev/ht0.  Running FC3.  I havn't tried the
pre-compiled kernel as there isn't a FC3 build.

Comment 6 Jiri Pavlovsky 2005-10-24 14:36:39 UTC
I tried ide-tape with 2.6.12 with no luck. Will try again with 2.6.13 when time
permits.

Comment 7 Mike Evans 2005-10-30 16:38:03 UTC
Further to my last comment...
Trying again with the standard 2.6.12-1.1380_FC3 kernel.
and (re)adding hdc=ide-scsi
With a Seagate STT20000A

I found that tar cvf /dev/st0 -b 1 *
and 
tar xvf /dev/st0 -b 1
will archive and restore files.  Large files obviously make the process very
slow with lots of tape rewinding.

Doing
tar cvf /dev/st0  *
without the block size, and 
dd if=/dev/st0 of=test.tar
then looking at the restored archive with hexedit revealed no data, all zeros,
although of the correct number of zeros.

However
dd if=some_File.txt of=/dev/st0 bs=512
and 
dd if=/dev/st0 of=restored.txt  
also works fine.  

This also works
tar cv * | dd of=/dev/st0
dd if=/dev/st0 | tar tv
But again very slow with lots of tape rewinding

Seems to a block size issue.

Incidentally my last "solution" turned out to be a bit flakey.  Sorry.

Comment 8 Jiri Pavlovsky 2005-10-31 12:31:25 UTC
I can write smaller archives onto the tape this way. But doing my full (several
giga) backup failed even when using 512 blocks. 

Comment 9 Dave Jones 2005-11-10 19:27:53 UTC
2.6.14-1.1637_FC4 has been released as an update for FC4.
Please retest with this update, as a large amount of code has been changed in
this release, which may have fixed your problem.

Thank you.


Comment 10 Jiri Pavlovsky 2005-11-13 18:06:37 UTC
Well, 2.6.14-1.1637_FC4 breaks 8139too and I can't have that machine offline. 

Comment 11 Jiri Pavlovsky 2005-11-13 18:19:50 UTC
Please forget my last email. I got complaints about unknown symbol when loading
8139too. It was caused by unrecognized option irq in modprobe.conf. 

Comment 12 Jiri Pavlovsky 2005-11-13 21:36:05 UTC
Tried to write an archive of cca 8GB onto the tape. It was runnig for about an 2
hours and then failed with:

ide-scsi: CoD != 0 in idescsi_pc_intr
hde: ATAPI reset complete
st0: Error with sense data: <6>st0: Current: sense key: Unit Attention
    Additional sense: Power on, reset, or bus device reset occurred
Info fld=0x14
st0: Error with sense data: <6>st0: Current: sense key: Not Ready
    Additional sense: Medium not present
Info fld=0x1
st0: Error on write filemark.
st0: Error with sense data: <6>st0: Current: sense key: Not Ready
    Additional sense: Medium not present

Comment 13 Jiri Pavlovsky 2005-12-04 15:54:28 UTC
After an upgrade to 2.6.14-1.1644_FC4 it seems working