Subject: Re: SLC woes (and tape woes)
To: None <mouse@Collatz.McRCIM.McGill.EDU>
From: Greg Earle <earle@isolar.tujunga.ca.us>
List: port-i386
Date: 03/28/1996 21:35:43
>>> 3)	dd if=/dev/nrst0 bs=20b fails with a complaint about the
>>> 	block size being too big for the tape drive(r).
>> 
>> On my freshly-built-yesterday P120, I get
>> 
>> scipio# dd if=/dev/nrst0 bs=20b of=/tmp/tapefile
>> dd: /dev/nrst0: Input/output error
>> scipio# dd if=/dev/nrst0 bs=20b of=/tmp/tapefile
>> dd: /dev/nrst0: Input/output error
>> 0+0 records in
>> 0+0 records out
>> 0 bytes transferred in 12 secs (0 bytes/sec)
>> scipio# Mar 28 01:16:30 scipio /netbsd: st0: 32768-byte record too big
>> Mar 28 01:16:30 scipio /netbsd: st0: 32768-byte record too big
> 
> This message _sounds_ as though the tape contains 32K records, which
> are too big for the 10K records you're trying to read.
> 
>> I made the tape (level 0 dumps) with a 63k blocksize ... what is the
>> "right" size to use?
> 
> Um, 63K, because that's what's on the tape?  Except in that case I have
> no idea what the messages about 32768-byte records are doing there.

I asked this because on Suns, the minphys limit is 63 K ... so that's the
optimal blocksize to use for tape I/O, since 64 K causes 2 read()'s or
write()'s split into 63K/1K chunks.  (To see this, try using the stock
"tcopy" on SunOS 4.1.x to examine a tape sometime.  Doesn't work right.
Works perfectly with a version compiled using 63K instead of 64K.)

I was hoping to find out if NetBSD has a similar minphys limit, thus
implying an optimal blocksize to use for NetBSD.

> Try dd bs=63k maybe?  Perhaps dd bs=63k count=1 of=/dev/null to find
> out how big the records are - or at least how big the first record is?

scipio# dd bs=63k count=1 of=/dev/null if=/dev/rst0
0+0 records in
0+0 records out
0 bytes transferred in 16 secs (0 bytes/sec)
Mar 28 21:03:21 scipio /netbsd: st0(ahc0:5:0): Target Busy
Mar 28 21:03:21 scipio /netbsd: st0(ahc0:5:0): Target Busy

I can *write* the tape (with "dump") just fine, but I can't *read* it at all.
No matter what blocksize I use.  Weird.  Not to mention frustrating ...

	- Greg