Return to BSD News archive
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!yarrina.connect.com.au!classic.iinet.com.au!news.uoknor.edu!news.ecn.uoknor.edu!paladin.american.edu!gatech!news.sprintlink.net!newsie.dmc.com!news.iii.net!iii1.iii.net!not-for-mail From: hdslip@iii1.iii.net (HD Associates) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: /sbin/badsect Date: 19 May 1995 08:40:21 -0400 Organization: HD Associates, Inc. Lines: 39 Message-ID: <3pi3k8$d2r@iii1.iii.net> References: <3pggv4$1ir@case.cyberspace.com> <3pgl5j$lri@park.uvsc.edu> <3ph7fr$9u7@case.cyberspace.com> NNTP-Posting-Host: iii1.iii.net In article <3ph7fr$9u7@case.cyberspace.com>, Jack Valko <valko@cyberspace.com> wrote: >Terry Lambert (terry@cs.weber.edu) wrote: > >: SCSI does this for you automatically. > >: If you have a SCSI device (the sd0a you refer to is a SCSI drive >: name) that has a bad sector, then it is already fixed. > >: If it isn't, you're drive is on the verge of going to hell in a >: handbasket, since you must be out of replacements. > >I do have a SCSI drive. Bummer. Will a low-level reformat fix the problem? There are two problems here: 1. SCSI drives are frequently shipped with read and write reallocation disabled. That was the case for all three SCSI drives I have. To enable them, use the new mode editing feature in freebsd-current (AKA 2.05) to edit mode page 1 and be sure that the A[WR]RE fields are set to 1. (command is scsi -f /dev/rsd?c -m 1 -e -P 3) > AWRE (Auto Write Reallocation Enbld): 1 > ARRE (Auto Read Reallocation Enbld): 1 After the feature freeze lifts I'll put a sanity check in sd.c that will complain about misconfigured drives during boot. 2. A drive will only reallocate a read error if it can successfully recover the data. This means that if you can't read the data you will have to read/ignore error/write the block, or tell the drive to forceably reallocate the block. I may write a disk scrub utility that can run against an unmounted drive. -- Peter Dufault Real Time Machine Control and Simulation HD Associates, Inc. Voice: 508 433 6936 dufault@hda.com Fax: 508 433 5267