[net.unix-wizards] read after write disk under 4.2?

z@rocksvax.FUN (Jim Ziobro) (05/06/86)

Has anyone hacked the hp driver to do reads after writes on 4.2BSD?  I
have a disk drive which is going flakey (slowly) by writing bad data
then later failing on the reads.  Rewriting the sector fixes the
problem.  I would like to be able to turn on read after write for the
drive until the problem gets fixed.  The system is a VAX 11/780 with an
Emulex SC-780 and an ams-315 disk drive.  The error I get on the read
is a DTE (drive timing error).

//Z\\
James M. Ziobro
Ziobro.Henr@Xerox.COM
{rochester,amd,sunybcs,ihnp4}!rocksvax!z
Ziobro:henr801g:xerox

eric@chronon.UUCP (Eric Black) (05/07/86)

In article <230002@rocksvax.FUN> z@rocksvax.FUN (Jim Ziobro) writes:
>Has anyone hacked the hp driver to do reads after writes on 4.2BSD?  I
>have a disk drive which is going flakey (slowly) by writing bad data
>then later failing on the reads.  Rewriting the sector fixes the
>problem.

I haven't done this for BSD, but I intend to.  I have done this previously
on industrial control systems.  One of the nice things you can get for
the expense of another disk rotation for the readback & compare is
dynamic mapping out of blocks that go bad on the fly, something that UN*X
has never been very graceful about handling.

However, while the expense of that extra rotation might be reasonable
for the particular file systems you want to be sure of (this feature
should be selectable on a per-filesys basis!), having to do it by
reading the block back and having the CPU do a block compare is
nearly always unacceptable.  The systems I worked with before had
a compare mode on the DMA controller which read data from memory (like
a write), accepted data from the disk (like a read), and compared them,
generating an error if they didn't match.  This should be fairly easy
for current disk controllers to do, but it's something that the manufacturer
has to provide for us.  So far my requests for this from several mfrs
have been as a lone voice crying in the wilderness...

How 'bout it, folks?  Is there interest in a UN*X file system sufficiently
robust as to handle bad blocks which creep up AFTER formatting?  If
more people request this DMA compare feature in disk controllers we might
get it.  Note -- "smart" controllers which do their own buffering and
sector scheduling should be able to do this without even increasing
bus traffic, since they are comparing the disk data to the data which
they still hold in their internal buffer!  Just have a flag or mode which
tells the controller to do a readback verify on this write or not.

We shouldn't have to be a computer manufacturer building our own controllers
to get this capability!  Am I the only interested prospect?

-- 
Eric Black   "Garbage In, Gospel Out"
UUCP:        {sun,pyramid,hplabs,amdcad}!chronon!eric