# SCSI Tape Errors, Need a SCSI Guru to Decode

## hurgh

Hi All,

A quick bit of background:

I have a DDS4 tape drive, which I had in a server attached to a Adaptec SCSI Card. I built a new server, and put an Adaptec SCSI Card in that server, it is nearly the same card, but no exact. I then moved the tape drive from the old server (where it was working fine), to the new server. I also moved the SCSI Cable too. 

I am now getting strange happenings with the tape drive in the new server.

If i do:

```
mt -f /dev/st0 stat
```

I get:

```
SCSI 2 tape drive:

File number=0, block number=0, partition=0.

Tape block size 1024 bytes. Density code 0x26 (DDS-4 or QIC-4GB).

Soft error count since last status=0

General status bits on (41010000):

 BOT ONLINE IM_REP_EN
```

But when I try to write something to the tape using tar, I get:

```
tar: /dev/nst0: Cannot write: Input/output error

tar: Error is not recoverable: exiting now
```

Here is the relevant part of my dmesg after boot:

```
scsi3 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 7.0

        <Adaptec 2940 Ultra2 SCSI adapter>

        aic7890/91: Ultra2 Wide Channel A, SCSI Id=7, 32/253 SCBs

scsi 3:0:6:0: Sequential-Access SEAGATE  DAT    9SP40-000 9030 PQ: 0 ANSI: 3

 target3:0:6: Beginning Domain Validation

 target3:0:6: wide asynchronous

 target3:0:6: FAST-40 WIDE SCSI 80.0 MB/s ST (25 ns, offset 32)

 target3:0:6: Domain Validation skipping write tests

 target3:0:6: Ending Domain Validation

st 3:0:6:0: Attached scsi tape st0

st 3:0:6:0: st0: try direct i/o: yes (alignment 512 B)

st 3:0:6:0: Attached scsi generic sg4 type 1
```

And then after I try to write to the tape, I get this in dmesg:

```
(scsi3:A:6:0): Unexpected busfree in Data-out phase

SEQADDR == 0x84

st0: Error 70000 (sugg. bt 0x0, driver bt 0x0, host bt 0x7).

st0: Current: sense key=0x6

    ASC=0x29 ASCQ=0x0

st0: Error on write filemark.

(scsi3:A:6:0): Unexpected busfree in Data-out phase

SEQADDR == 0x86

st0: Error 70000 (sugg. bt 0x0, driver bt 0x0, host bt 0x7).

st0: Current: sense key=0x6

    ASC=0x29 ASCQ=0x0

st0: Error on write filemark.
```

(That is after 2 write attempts).

I have tried a new tape, I have cleaned the tape drive, I have tried using /dev/nst0 as the device but I get the same errors.

The mt eject command works fine, as does the mt stat command, but it seems that it fails on any command that tries to read the tape (mt fsf 1 etc).

Does any one have any idea what the scsi error messages could be, and what I could do to fix it? Could it be a termination issue or something? The setup is exactly the same as in my previous server, except for the SCSI Card.

Any help would be appreciated.

Regards

-Hurgh-

----------

## rsa4046

Try unsetting the block size:

```
mt -f /dev/nst0 setblk 0
```

followed by a simple tar test,

```
touch /tmp/testfile

tar --create --blocking-factor 20  --verbose --file /dev/nst0 /tmp/testfile
```

Does that work?

----------

## bombcar

What are the exact cards in both machines? It could be a SCSI cable issue - are your terminators installed and correct?

----------

## echto

Try a different kernel?

----------

## hurgh

Hi All,

I have tried all the suggestions so far. I have the latest kernel now, and nothing.

The card that I did have in the server was:

Adaptec AHA-2940U2W 

and this was the one that was giving me errors when writing.

I tried setting the block size, still same error.

I then put in the old card that I used in the other server  (Adaptec AHA-2940U) and that card does not like my motherboard or something, cause it didnt boot.

So I am going to look at getting a new card (Off ebay), does anyone have any suggestions for one that works well with linux, and has the 68 pin connector (the connector with the really small pins and fine cable, not the old IDE looking ones).

Any help would be much appreciated.

Thanks

-Hurgh-

----------

