*BSD News Article 80364


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!spool.mu.edu!newspump.sol.net!www.nntp.primenet.com!nntp.primenet.com!howland.erols.net!newsfeed.internetmci.com!in1.uu.net!news1.iamerica.net!news
From: matt@skyblue.com (Matt Barron)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: File corruption by OS problem
Date: Thu, 10 Oct 1996 14:57:53 GMT
Organization: LDS I-America
Lines: 40
Message-ID: <53j3dd$prh@news1.iamerica.net>
NNTP-Posting-Host: 207.101.60.21
X-Newsreader: Forte Free Agent 1.0.82

I'm running FreeBSD 2.1.0 on a P90, 32mb RAM, with an Adaptec 2940
running the following SCSI peripherials:
ID 0 - Seagate ST32550N
ID 1 - Conner CFP2105S
ID 2 - Seagate ST15230N
ID 4 - 9-track SCSI tape drive

The ID 1 and ID 2 hard drives are new. The system has been up for
about a year with only the first (ID 0) hard drive and the SCSI tape
drive.

I disklabelled/fdisked/newfs'ed  the new hard drives by hand. I
created a single partition/slice on each drive (/dev/sd[12]a). The
whole installation procedure went fine (once I figured out how to do
it).

After I came back up, I move some of my database onto the new drives.
The system ran for a while, then I started getting complaints from my
database software. It turned out the database files were corrupt.

I then wrote a simple program to test the drives. The program just
opened a file and wrote sequential bytes (0x00, 0x01, 0x02, and so on)
until the disk was full. It then closed the file, reopened it, and
started reading and verifying the data. This program reported that the
data was corrupt - what it wrote was not always what it read. The
corruption started about 16mb into the file and was widespread after
that. My program reported that the corrupt bytes usually (but not
always) contained 0xff instead of what it expected. The corruption was
usually in a pair of (e.g. two consecutive) bytes.

Either I have a weird hardware problem, or I configured the disks
improperly when I fdisk/disklabel/newfs'ed them, or FreeBSD has a bug.
The first may be true - does anyone else have as many SCSI peripherals
as I do on a single bus? The second may be true, but I can't figure
out anything I did wrong. I hope the third is not true, but am
beginning to wonder.

Anyone have any thoughts?