Subject: Re: Reassigning defective blocks on direct SCSI devices
To: Andreas Kotes <firstname.lastname@example.org>
From: Michael L. Hitch <email@example.com>
Date: 08/29/1999 14:01:50
On Sun, 29 Aug 1999, Andreas Kotes wrote:
> I wasn't able to reassign defective blocks via scsictl on NetBSD 1.4 ..
> it's either not acting like manpage says, or I'm using the wrong device
> (tried /dev/rz4 rz4c rrz4 rrz4c ..) ...
> ftp://ftp.netbsd.org/pub/NetBSD/misc/quick-hacks/sdremap doesn't compile
> due to missing include files or me being stupid (hm. REASSIGN_BLOCKS isn't
> defined anywhere, but quite vital) ..
Both scsictl and sdremap use the MI SCSI code, which the pmax does not
currently use. The pmax driver does have a similar capability though, and
I've done a few programs using the SDIOCSFORMAT/SDIOCSCSICOMMAND ioctl.
> So I end up with 4 questions:
> - is there a program that scans for bad blocks an remaps them?
> - how can I remap bad blocks if not by the methods I tried?
This can probably be done with a modified sdremap program which uses the
pmax SDIOCSFORMAT/SDIOCSCSICOMMAND ioctl calls.
> - can't this be done automagically? :)
I think some SCSI drives can be configured to automatically reassign bad
blocks. I can't remember if there's any provision in that configuration
to have the device notify the host that the reassignment was done, so
having it done automatically may mean you get bad blocks reassigned
silently and you don't know it was being done.
> - can I redirect the Media error message to anything else but
> the serial console? I'll loose console access to my system soon
Don't those messages also show up in /var/log/messages?
Michael L. Hitch firstname.lastname@example.org
Information Technology Center
Montana State University Bozeman, MT USA