From owner-freebsd-questions Sun Feb 2 16: 0: 6 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 CE40C37B401 for ; Sun, 2 Feb 2003 16:00:04 -0800 (PST) Received: from voo.doo.net (voo.doo.net [81.17.45.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4023143F3F for ; Sun, 2 Feb 2003 16:00:03 -0800 (PST) (envelope-from marc@schneiders.org) Received: from localhost (localhost [127.0.0.1]) by voo.doo.net (8.12.6/8.12.6) with ESMTP id h12Nxp6Z062709; Mon, 3 Feb 2003 00:59:52 +0100 (CET) (envelope-from marc@schneiders.org) Date: Mon, 3 Feb 2003 00:59:50 +0100 (CET) From: Marc Schneiders X-X-Sender: To: Lowell Gilbert Cc: Subject: Re: How to map bad sectors on IDE? In-Reply-To: <44k7gkq8h0.fsf@be-well.ilk.org> Message-ID: <20030203003720.Q62584-100000@voo.doo.net> X-Preferred-email-to: marc@schneiders.org X-Other-email-to: marc@venster.nl X-Organization: Venster (Zeist - NL) X-URL: http://www.bijt.net/ X-SOA: A.ROOT-SERVERS.ORSC. X-OS: FreeBSD: The Power to Serve 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 On 1 Feb 2003, at 11:19 [=GMT-0500], Lowell Gilbert wrote: > John Mills writes: > > > out of circulation. 'apropos badblocks' and 'man fsck' failed to suggest > > such a function in fBSD, but it might be worth more looking. > > badsect(8) I tried that with the bad sector numbers (with both ranges mentioned in the messages, since I wasn't sure which are the true ones): nud# badsect BAD 99107103 83247423 block 99107103 out of range of file system block 83247423 out of range of file system Don't forget to run ``fsck /dev/ad0h'' nud# badsect BAD 27000944 19071104 block 27000944 in non-data area: cannot attach block 19071104 in non-data area: cannot attach Don't forget to run ``fsck /dev/ad0h'' After I ran fsck it refused to mark the partition as clean. That was not nice, since /usr was on it. Since there was quite a bit of space on the /home partition, I decided to move the content of the affected partition to that. So /usr moved to /home/usr (minus 99% of src and obj and ports). So I thought a new fs ('reformat') and everything is OK. I could even move /usr back then. Alas, bad luck again, because: > > 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. > > newfs doesn't make any such attempts any more, *because* the hardware > has already done it for them. You are very right. I tried it. newfs didn't tell me anything about bad sectors, so I guess it either missed them on purpose or accidently. Also I noticed it did not take much time to do 17GB. So a media check sort of seemed unlikely. It did freeze my console for a few seconds, while the only serious other thing it was doing was make buildworld. -- [16] Do it today. http://logoff.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message