*BSD News Article 39869


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.uwa.edu.au!DIALix!not-for-mail
From: julian@perth.DIALix.oz.au (Julian Elischer)
Newsgroups: comp.os.386bsd.questions
Subject: Re: [Q] fsck and 'medium error' problems
Date: 23 Dec 1994 02:52:30 +0800
Organization: DIALix Services, Perth, Australia.
Lines: 31
Sender: julian@perth.DIALix.oz.au
Message-ID: <3dchte$n2f$1@perth.DIALix.oz.au>
References: <YOCUM.94Dec19155436@sparticus.gateway.cybernet.com> <3d5jbv$cun@agate.berkeley.edu> <3d68sn$dhv@linda.teleport.com> <3d76tm$20d@agate.berkeley.edu>
NNTP-Posting-Host: perth.dialix.oz.au
NNTP-Posting-User: julian
X-Newsreader: NN version 6.5.0 #59 (NOV)

jkh@violet.berkeley.edu (Jordan K. Hubbard) writes:

>In article <3d68sn$dhv@linda.teleport.com>, bmk <bmk@teleport.com> wrote:
>>I'm getting something similar on one of my scsi disks.  I'd rather not
>>swap out the disk if I can fix it.   Is there any sort of utility to
>>mark defective blocks without reformatting the disk?

>For SCSI drives?  I don't think so.  I would bag the drive.  You don't
>need the grief.

Ok, the original error message was for media errors
and it had the same block mentionned more than once.. this block is faulty on the drive and needs tobe spared out..

"How do I do that" I hear you ask...
well...
hmmm 
the routine is in the driver to do it, but there is no IOCTL that calls it....
maybe I should do that....
The other solution is to grab the routine from the driver and the source for 
/sbin/scsi  (scsi(1)) 
and do the scsi command for a sector remap from user mode.....
ok, I get the message.. I was lazy when I wrote the driver... i didn't
have any bad blocks so I couldn't test it so I didn't write it..

If anyone has bad blocks on their drives, mail me at julian@tfs.com
and I will impliment one of the  two solutions above and
post it.. but beware I'll need you to test it first on your bad blocks..
(I still don't have any)

julian
>					Jordan