From owner-freebsd-scsi Sat Oct 27 15: 1:12 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id 33CB037B405 for ; Sat, 27 Oct 2001 15:01:06 -0700 (PDT) Received: (from ken@localhost) by panzer.kdm.org (8.11.6/8.9.1) id f9RM0qB66402; Sat, 27 Oct 2001 16:00:52 -0600 (MDT) (envelope-from ken) Date: Sat, 27 Oct 2001 16:00:51 -0600 From: "Kenneth D. Merry" To: Alexander Leidinger Cc: scsi@FreeBSD.ORG Subject: Re: repeating medium errors and error from "camcontrol defects" Message-ID: <20011027160051.A66375@panzer.kdm.org> References: <20011026111106.A52864@panzer.kdm.org> <200110271659.f9RGxFr03949@Magelan.Leidinger.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <200110271659.f9RGxFr03949@Magelan.Leidinger.net>; from Alexander@leidinger.net on Sat, Oct 27, 2001 at 06:59:14PM +0200 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Sat, Oct 27, 2001 at 18:59:14 +0200, Alexander Leidinger wrote: > On 26 Okt, Kenneth D. Merry wrote: > > (Please keep me in the CC.) > > [...] > >> What did I wrong with camcontrol and what can I do to get rid of those > >> errors? Do I have to replace the disk or the cable? > > > > As someone else already suggested, you should try using the 'phys' defect > > format, as many drives don't support the block format. > > Yes, this works. > > > As for the errors, they mean you have a bad block. Replacing the cable > > won't really affect the problem. You may want to look into getting a new > > drive, though, since medium errors typically indicate the drive is on its > > way out. > > It shows 285 defects with -P and 0 with -G. I thougth I have to replace > it, when the -G list grows too fast, and not already if it just shows > one error. True enough. What probably happened in this case is that it wasn't able to recover the error on read, and you haven't tried to write the file, so it can't really do anything but report an error. > > To fix this particular bad block, what you should do is make sure read > > and write reallocation are turned on in mode page 1: > > > > camcontrol modepage da0 -m 1 -e -P 3 > > > > will allow you to edit the saved parameters and enable read and write > > reallocation. > > Already turned on. Cool. > > Then, write zeroes to the bad block to force the drive to remap it. > > Is there a way to determine the file which is affected? I didn't want > just wrote zeros to it if I didn't know which file this affects. Maybe > I'm able to replace the file from a backup after or before overwritting > the block . I don't know how you'd do that. It's probably possible to dissect the filesystem information to figure it out, but I don't know how to do that. Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message