Subject: scsi errors writing an ffs filesystem on a ZIP disk
To: None <current-users@NetBSD.ORG, port-i386@NetBSD.ORG>
From: Roland McGrath <roland@frob.com>
List: current-users
Date: 12/08/1995 15:29:23
I am crossposting because I don't know whether this problem is
specific to the i386 or not.

I am trying to write an ffs filesystem onto an Iomega ZIP removable disk.
I have a 486 with an ultrastor 34f VESA scsi controller.

I can write, but when I write sizable amounts, I get lots of message like this:

sd1(uha0:5:0): non-media hardware failure, data = 00 00 00 00 47 00 00 00 00 00 0b 02 01 0a 30 00 00

and some of the data written is corrupted.  I can provide the full
variety of hex digits that appear in these messages if anyone cares.

What is really odd is that no matter how much I write, I cannot get
this problem to happen with the MSDOS filesystem.

For writing ffs, my test case is the 1.1 distribution:

# disklabel -R -B sd1 zipbsd.label
# newfs /dev/rsd1a
# mount /dev/sd1a /mnt
# tar -f base11.tar.gz -C /mnt -xv

And here is the disklabel I have been using:

# /dev/rsd1d:
type: SCSI
disk: zip100
label: zip100
flags:
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 96
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0		# milliseconds
track-to-track seek: 0	# milliseconds
drivedata: 0 

4 partitions:
#        size   offset    fstype   [fsize bsize   cpg]
  a:   196608        0    4.2BSD     512  4096    0 	# (Cyl.    0 - 95)
  c:   196608        0    unused        0     0       	# (Cyl.    0 - 95)
  d:   196608        0    unused        0     0       	# (Cyl.    0 - 95)


Can anyone perform that test case successfully on their ZIP drive?

As I said, I can write files in an MSDOS filesystem on a ZIP disk with
no trouble.  Here is the disklabel I am using for that:

# /dev/rsd1d:
type: SCSI
disk: zip100
label: zip100
flags:
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 96
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0 

4 partitions:
#        size   offset    fstype   [fsize bsize   cpg]
  a:   196576       32     MSDOS                        # (Cyl.    0*- 95*)
  c:   196608        0    unused        0     0         # (Cyl.    0 - 95)
  d:   196608        0    unused        0     0         # (Cyl.    0 - 95)