From owner-freebsd-stable@FreeBSD.ORG Sat Aug 20 01:39:22 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06479106566B for ; Sat, 20 Aug 2011 01:39:22 +0000 (UTC) (envelope-from dan@langille.org) Received: from nyi.unixathome.org (nyi.unixathome.org [64.147.113.42]) by mx1.freebsd.org (Postfix) with ESMTP id CD7218FC0A for ; Sat, 20 Aug 2011 01:39:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by nyi.unixathome.org (Postfix) with ESMTP id 17AB250A09; Sat, 20 Aug 2011 01:39:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at unixathome.org Received: from nyi.unixathome.org ([127.0.0.1]) by localhost (nyi.unixathome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dptRzAcxz9Zj; Sat, 20 Aug 2011 02:39:20 +0100 (BST) Received: from smtp-auth.unixathome.org (smtp-auth.unixathome.org [10.4.7.7]) (Authenticated sender: hidden) by nyi.unixathome.org (Postfix) with ESMTPSA id 9E15A50A06 ; Sat, 20 Aug 2011 01:39:20 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Dan Langille In-Reply-To: <20110819232125.GA4965@icarus.home.lan> Date: Fri, 19 Aug 2011 21:39:17 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1B4FC0D8-60E6-49DA-BC52-688052C4DA51@langille.org> <20110819232125.GA4965@icarus.home.lan> To: Jeremy Chadwick X-Mailer: Apple Mail (2.1084) Cc: freebsd-stable@freebsd.org Subject: Re: bad sector in gmirror HDD X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2011 01:39:22 -0000 On Aug 19, 2011, at 7:21 PM, Jeremy Chadwick wrote: > On Fri, Aug 19, 2011 at 04:50:01PM -0400, Dan Langille wrote: >> System in question: FreeBSD 8.2-STABLE #3: Thu Mar 3 04:52:04 GMT = 2011 >>=20 >> After a recent power failure, I'm seeing this in my logs: >>=20 >> Aug 19 20:36:34 bast smartd[1575]: Device: /dev/ad2, 2 Currently = unreadable (pending) sectors >=20 > I doubt this is related to a power failure. >=20 >> Searching on that error message, I was led to believe that = identifying the bad sector and >> running dd to read it would cause the HDD to reallocate that bad = block. >>=20 >> http://smartmontools.sourceforge.net/badblockhowto.html >=20 > This is incorrect (meaning you've misunderstood what's written there). >=20 > Unreadable LBAs can be a result of the LBA being actually bad (as in > uncorrectable), or the LBA being marked "suspect". In either case the > LBA will return an I/O error when read. >=20 > If the LBAs are marked "suspect", the drive will perform re-analysis = of > the LBA (to determine if the LBA can be read and the data re-mapped, = or > if it cannot then the LBA is marked uncorrectable) when you **write** = to > the LBA. >=20 > The above smartd output doesn't tell me much. Providing actual SMART > attribute data (smartctl -a) for the drive would help. The brand of = the > drive, the firmware version, and the model all matter -- every drive > behaves a little differently. Information such as this? = http://beta.freebsddiary.org/smart-fixing-bad-sector.php --=20 Dan Langille - http://langille.org