From owner-freebsd-questions@FreeBSD.ORG Tue Oct 27 14:05:11 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E767A1065692 for ; Tue, 27 Oct 2009 14:05:10 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (gizmo.acns.msu.edu [35.8.1.43]) by mx1.freebsd.org (Postfix) with ESMTP id 9C3B08FC12 for ; Tue, 27 Oct 2009 14:05:10 +0000 (UTC) Received: from gizmo.acns.msu.edu (localhost [127.0.0.1]) by gizmo.acns.msu.edu (8.13.6/8.13.6) with ESMTP id n9RE3j2r080944; Tue, 27 Oct 2009 10:03:45 -0400 (EDT) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: (from jerrymc@localhost) by gizmo.acns.msu.edu (8.13.6/8.13.6/Submit) id n9RE3jpJ080943; Tue, 27 Oct 2009 10:03:45 -0400 (EDT) (envelope-from jerrymc) Date: Tue, 27 Oct 2009 10:03:45 -0400 From: Jerry McAllister To: =?iso-8859-1?Q?Gr=FCnewald_Micha=EBl?= Message-ID: <20091027140345.GD80680@gizmo.acns.msu.edu> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.2i Cc: freebsd questions general Subject: Re: Bad sectors: how bad can it be X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2009 14:05:11 -0000 On Tue, Oct 27, 2009 at 08:31:18AM +0100, Grünewald Michaël wrote: > Dear list, > > after an incorrect power-off of my FreeBSD system, it does not boot > any more, BTX stops even before showing the cute beastie menu. > Starting the machine by other means, I found that the hard-drive is > installed on has bad sectors. I am looking for advices on how to > recover from this, if possible. > > Basically the question is: shall I discard my hard-drive with bad- > sectors, or can I continue using it? > > The Linux system I use to diagnose this says: > > hdb: media error (bad sector): status=0x51 { DriveReady > SeekComplete Error } > hdb: media error (bad sector): error=0x30 { LastFailedSense=0x03 } > ... > Buffer I/O error on device hdb, logical block 1663200 > > etc. > > Since I use computers (1992) these are my first bad sectors :) (on > hard drives, taking floppies into account is no fun!). I hence have > several questions: > -- is it possible to let these sectors? > -- to which extents a hard-drive with bad sectors is usable? > -- while the apparition of these bad sectors coincide with an > incorrect power-off, are the two events related? The machine suffered > plenty improper power-offs (or many), in the last years and did not > react so badly! If a disk begins to have actual bad sectors - ones that cannot be written and/or read then it is likely that the problem will progress and soon the disk will be unusable. All modern disk drives have built in remapping of bad sectors and you will normally not see any error messages until so many sectors go bad that it runs out of spare ones. So, it should replaced. But your situation makes it just a little more difficult to make this broad generalization. In this case, it might just be that the power outage came at a bad time and in a bad place so it caused a couple of essential sectors to be incorrectly written. If it was in an inode or a superblock it could make it unusuable, but possible to recover, at least everything but the bad ones. You can use an alternate superblock. This incorrect writing due to a power loss is actually not very likely, but could happen. Anyway, in that case, if you could get what you need off the disk, you could then just reformat/renewfs it, load stuff back up and go back to using it. So, study up on recovering data by using an alternate superblock and see what you can find out. If you rebuild it and it continues to put out bad sector messages, then discard it. Since disk is relatively cheap nowdays, it might be more worth your time to just get another one and start over anyway. Probably able to get a much larger capacity disk that way too. Good luck and have fun, ////jerry > -- > Thank you in advance for your advices, > Michaël_______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >