From owner-freebsd-scsi Fri Mar 12 2:58:17 1999 Delivered-To: freebsd-scsi@freebsd.org Received: from ren.detir.qld.gov.au (ns.detir.qld.gov.au [203.46.81.66]) by hub.freebsd.org (Postfix) with ESMTP id 1954914E98 for ; Fri, 12 Mar 1999 02:58:14 -0800 (PST) (envelope-from syssgm@detir.qld.gov.au) Received: by ren.detir.qld.gov.au; id UAA23696; Fri, 12 Mar 1999 20:57:54 +1000 (EST) Received: from ogre.detir.qld.gov.au(167.123.8.3) by ren.detir.qld.gov.au via smap (3.2) id xma023662; Fri, 12 Mar 99 20:57:33 +1000 Received: from atlas.detir.qld.gov.au (atlas.detir.qld.gov.au [167.123.8.9]) by ogre.detir.qld.gov.au (8.8.8/8.8.7) with ESMTP id UAA03782 for ; Fri, 12 Mar 1999 20:57:33 +1000 (EST) Received: from nymph.detir.qld.gov.au (nymph.detir.qld.gov.au [167.123.10.10]) by atlas.detir.qld.gov.au (8.8.5/8.8.5) with ESMTP id UAA24954 for ; Fri, 12 Mar 1999 20:57:32 +1000 (EST) Received: from nymph.detir.qld.gov.au (localhost.detir.qld.gov.au [127.0.0.1]) by nymph.detir.qld.gov.au (8.8.8/8.8.7) with ESMTP id UAA24445; Fri, 12 Mar 1999 20:57:30 +1000 (EST) (envelope-from syssgm@nymph.detir.qld.gov.au) Message-Id: <199903121057.UAA24445@nymph.detir.qld.gov.au> To: freebsd-scsi@freebsd.org Cc: syssgm@detir.qld.gov.au Subject: Strange SCSI QIC tape behaviour Date: Fri, 12 Mar 1999 20:57:30 +1000 From: Stephen McKay Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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