Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Mar 1999 20:57:30 +1000
From:      Stephen McKay <syssgm@detir.qld.gov.au>
To:        freebsd-scsi@freebsd.org
Cc:        syssgm@detir.qld.gov.au
Subject:   Strange SCSI QIC tape behaviour
Message-ID:  <199903121057.UAA24445@nymph.detir.qld.gov.au>

next in thread | raw e-mail | index | archive | help
I have a TANDBERG TDC 4200 attached to an aha1542CF in an old 486DX2/66.
I run 4.0-current on it (only a couple days old).  I'm using 2GB tapes
(marked QD9600) from an old backup set from this very machine (in another
life).  It acts rather strangely...

If I put in a tape, "mt status" claims that the density is 0x11:QIC-320 and
the blocksize is 512 bytes.  This in itself is a contradiction, since that
format uses 1024 byte fixed blocks.

If I try to read the old data (say, with restore), I get a failure:

	tape read error: Input/output error

There are no kernel error messages associated with this.

At this point, though, it has changed its mind about the density, claiming
it is 0x22:QIC-2GB(C), but still thinks the blocksize is 512 bytes.  The
new idea of the density is correct, but the blocksize is still silly.

If I set the blocksize to 0 (variable), then I can read the old dumps.  Yes,
the dumps were written with 32KB (variable) blocks.  You might cry "foul"
at this, but it is supported by the drive, and should, I think, be
automatically selected.

But, I don't want to just read old dumps.  When I try to write to the tape,
I set the blocksize to 1024 (which works as verified by mt), and try to write,
I get errors:

Mar 12 20:05:49 twoflower /kernel: (sa0:aha0:0:5:0): WRITE(06). CDB: a 1 0 0 20 0 
Mar 12 20:05:49 twoflower /kernel: (sa0:aha0:0:5:0): ILLEGAL REQUEST asc:30,0
Mar 12 20:05:49 twoflower /kernel: (sa0:aha0:0:5:0): Incompatible medium installed

Well, the medium looks pretty compatible to me, but I'm not a tape drive!

Undeterred, I tried 'mt erase'.  This appeared to succeed.  I tried to write.
Again, I got the "incompatible medium" error message.  Trying a different block
size in the write (64KB vs 32KB previously) changed the message slightly (the
20 changed to 40 in the WRITE error line).

So, I removed the tape, and inserted it again.  Same write failures.

Then I set the blocksize back to variable.  Wrote /kernel on to it with dd
and it succeeded, but wrote very slowly (38KB/s).  So, I rewound it, set it
back to 1024 byte block size, and it worked like there had never been any
problem at all!

So, is this the most bizarre drive on Earth, or perhaps are there bugs in
the SCSI tape driver that need addressing?  At the very least, the fixed
block size for QIC tapes should be 1024 not 512 for densities above QIC-320.

Tandberg has a nice SCSI manual for their drive (though it's hard to find
on their web site).  Thus, I am armed with raw data, but no understanding
of the current code.  

Stephen.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903121057.UAA24445>