Date: Thu, 5 Jul 2018 10:29:11 -0700 (PDT) From: "Rodney W. Grimes" <freebsd-rwg@pdx.rh.CN85.dnsmgr.net> To: Eugene Grosbein <eugen@grosbein.net> Cc: George Mitchell <george+freebsd@m5p.com>, FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: Confusing smartd messages Message-ID: <201807051729.w65HTBnn048705@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <5B3DD43B.5010208@grosbein.net>
next in thread | previous in thread | raw e-mail | index | archive | help
[ Charset windows-1252 unsupported, converting... ] > 05.07.2018 11:25, Rodney W. Grimes wrote: > > >>> 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. > >> > >> "smartctl -t long" reveals LBA of first pending sector. > > > > That is vendor dependent > > Have not seen any exceptions with modern (e.g. last 5 years) HDDs. > > > and well only return the pending sector > > if the pending sector fails for most vendors. It may fix the > > sector if it could read it. > > This is first time I hear about fixind sector problem by just reading it. > I believed that only a write can fix it. Most drive firmware if at any time a pending sector reads correctly the drive attempts to do a repair since it now has the data that belongs in that sector. It would be very bad firmware that did not attempt to repair a pending sector that it had just successfully read. There use to be (and probably still are) vendor specific commands to do things like head offset, head flight, etc so you could try to recover these sectors, this has all been shoved into the on HDA controller now that they have the CPU power to do all sorts of tricks in attempting to get that data back, BUT you have to tell the drive to read the sector or it makes no attempt to recover it. Some firmware if the number of raw bits in error was low enough simply remove the LBA from the pending list, as we can now read the sector. Some firmware well re-write the sector, read it back and see if it still reads good, and if so remove it from pending, if it fails the drive attempts a remap operation. A write operation with no regard to getting the data out of the LBA usually does "fix it" as the drive is smart enough to know that a write to a pending sector means one no longer cares about that data and the drive is free to do what ever it wants to repair the error. -- Rod Grimes rgrimes@freebsd.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807051729.w65HTBnn048705>