From owner-freebsd-questions Fri Jan 31 18:53:40 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E4FFA37B401 for ; Fri, 31 Jan 2003 18:53:38 -0800 (PST) Received: from mail.speakeasy.net (mail16.speakeasy.net [216.254.0.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id 591AA43E4A for ; Fri, 31 Jan 2003 18:53:38 -0800 (PST) (envelope-from jmills@speakeasy.net) Received: (qmail 31572 invoked from network); 1 Feb 2003 02:53:51 -0000 Received: from unknown (HELO localhost.localdomain) ([216.27.162.100]) (envelope-sender ) by mail16.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 1 Feb 2003 02:53:51 -0000 Received: from localhost (jmills@localhost) by localhost.localdomain (8.11.6/8.11.6) with ESMTP id h112ruM04357; Fri, 31 Jan 2003 21:53:56 -0500 X-Authentication-Warning: localhost.localdomain: jmills owned process doing -bs Date: Fri, 31 Jan 2003 21:53:55 -0500 (EST) From: John Mills X-X-Sender: jmills@localhost.localdomain To: Marc Schneiders Cc: Lowell Gilbert , Subject: Re: How to map bad sectors on IDE? In-Reply-To: <44lm10g7a8.fsf@be-well.ilk.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Marc - On 31 Jan 2003, Lowell Gilbert wrote: > Marc Schneiders writes: > > > I have searched Google to find a solution to mark off these two > > blocks/inodes (or however I should call them), so that they will not > > be used anymore. All I found is that this is not possible on > > IDE. It is possible with some types of Linux filesystems (ext2 for one), and 'e2fsck' can be told to run a block-by-block read-write test across the disk (optionally preserving original data where possible), then add any bad blocks to a suitably named file which exists just to keep bad blocks out of circulation. 'apropos badblocks' and 'man fsck' failed to suggest such a function in fBSD, but it might be worth more looking. Such an operation would cost you only those files which are now corrupted - when it happened to me I lost a block in a text file, 'fsck' moved the fragments to 'lost+found', and I was able to reconstruct the file. That was pure luck, naturally. > Why is it radical? After all, IDE disks already do bad-block > remapping internally, so you've built up a *lot* of bad sectors > already if they're starting to become visible to the operating > system... Does fBSD's file system creation make sure that all blocks of a newly created file system are in fact usable? I would be surprised if there were no cross checks in the formatting/partitioning/fs-creation path. If the bad blocks weren't linked in the new filesystem, they would have become invisible for practical purposes. Bad side: This approach wipes the rest of your disk's contents. Maybe there are some starting points in there. - John Mills To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message