From owner-freebsd-hackers@freebsd.org Thu Jul 5 17:09:29 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03133103E75A for ; Thu, 5 Jul 2018 17:09:28 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53F3589D3D for ; Thu, 5 Jul 2018 17:09:28 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w65H9IAA048598; Thu, 5 Jul 2018 10:09:19 -0700 (PDT) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w65H9IfA048597; Thu, 5 Jul 2018 10:09:18 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201807051709.w65H9IfA048597@pdx.rh.CN85.dnsmgr.net> Subject: Re: Confusing smartd messages In-Reply-To: <20180705063352.GA76985@server.rulingia.com> To: Peter Jeremy Date: Thu, 5 Jul 2018 10:09:18 -0700 (PDT) CC: Eugene Grosbein , FreeBSD Hackers , George Mitchell X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2018 17:09:29 -0000 > On 2018-Jul-04 18:05:56 -0700, "Rodney W. Grimes" wrote: > >It would be really nice if we had a way to tell ZFS to > >do the equivelent of: > > dd if=/dev/ada1 of=/dev/ada1 bs=128k conv=noerror,sync > >in some type of lowlevel scrub operation, with proper locking > >which could easily repair most of these Pending Sector errors, > > Agreed. > > >It would of also been nice if the ata standard would of made a way > >to get the LBA of pending sectors so that a very quick rewrite attempt > >could be done to fix them. IIRC this info is avalible, but in a vendor > >specific way. > > As a workaround, > dd if=/dev/ada1 of=/dev/null bs=128k conv=noerro > will report any errors. You can then write zeroes or garbage to those > sectors (optionally followed by a scrub if you overwrote more than the > faulty sectors) Though this is a good test to run be-aware that this only report errors if infact the read fails, and often pending sectors do not fail as they are a transient error. This is also a very long and slow test, I can go to a PC3000 driver recovery based system and have the pending sector list in a mater of a single command and less than 1s of time. I can also some times obtain that info by hooking up a TTL serial cable to the jumpers on the drive and issuing commands to the controller chip. But again, this is a very vendor specific situation and rather intrusive to do. -- Rod Grimes rgrimes@freebsd.org