From owner-freebsd-hackers@freebsd.org Thu Jul 5 19:31:40 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 0CBEE1027B48 for ; Thu, 5 Jul 2018 19:31:40 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf0-x22b.google.com (mail-lf0-x22b.google.com [IPv6:2a00:1450:4010:c07::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 619EF7265B; Thu, 5 Jul 2018 19:31:39 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf0-x22b.google.com with SMTP id a134-v6so7880287lfe.6; Thu, 05 Jul 2018 12:31:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=ELAPNVOcf0uZC1b6ry24PUHj3eD1aQRjyY9oYDeEdu8=; b=pMXSujDJxGuOt9js5MKJASMusx5zt2ZAbhhHfMDwwTMytCnltCBKoGEUS1I3Ill8MY gttHFZZf/G6iw67G1QuezcJ9IXVZJzefCNiaYfe8VhOf51l2AXC+staQWqAncswjx/EV g7ZEESN2vAmyH3IOgNTFWOOEsqf81GP5L4WzrZ7S4/+Qrf0PfR1MiGtaOfSYwje4Ga8E J2Bug40zunlXEnE8wq8fgiAwvSqp7WEvs/LYsQbUXHzXRTYlsA8cOtWYq1YoAwSyESwq uiIj/AnuhEtJrBQuZef5POt3567NbwfL51AwrX6ZIZku9fuN6J0MuySsjSMkjuttefZB 2m/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=ELAPNVOcf0uZC1b6ry24PUHj3eD1aQRjyY9oYDeEdu8=; b=BON6dW0trcZFrqIFEyOnKCnlZr2FMjMaqGiqPDLS8mG8TZHziHJIkjQ6TqvGafVG1E D+2naQEH/1313U95EAjDXEZmMEn2P2kMJjt2xRa0NPtcht6/LtMne+0OdmBF3+a8InjQ qvccNFTmIgbFfQDqeUwLQ0NWKQZM1VakV85QbKJV60gkDM8Fi9oBp/iVCjGC1OOV7Ymt V0p2sNF/WXkGwmbCfxdlqXzNqQEWPVG6NDJYeEMT/lemLje/Nb0mbfeHUPvTBO3Cbd0H m196dfM9IoUGNyhq05gviqTFwRN6XX/yQmFVMKtDeD9FWuolIZAeLQVhdz3qZXxcGECh mFew== X-Gm-Message-State: APt69E0TZnI0m7iSVnTEc8Y+J4AxFcOC49OOp9Mt4DjG4iTpB8mb3/70 cEZVbTjf90FfRSpjyH2XQmhvTKEcG7DRlaWn6V0= X-Google-Smtp-Source: AAOMgpfF8LbO8IUngSGmC705ZP3yY4r6lKR+aXPqOwl6AcKKIbUozVxuErUmUeEC4BGCuq3HLusu2+dvYSvFEmg0qo8= X-Received: by 2002:a19:fc3:: with SMTP id 64-v6mr5503166lfp.46.1530819097781; Thu, 05 Jul 2018 12:31:37 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 2002:ab3:1b91:0:0:0:0:0 with HTTP; Thu, 5 Jul 2018 12:31:36 -0700 (PDT) In-Reply-To: <201807051815.w65IFqsB048887@pdx.rh.CN85.dnsmgr.net> References: <201807051815.w65IFqsB048887@pdx.rh.CN85.dnsmgr.net> From: Alan Somers Date: Thu, 5 Jul 2018 13:31:36 -0600 X-Google-Sender-Auth: VfkDKGzsiVvqs-GBKrd-Xga0Srw Message-ID: Subject: Re: Confusing smartd messages To: "Rodney W. Grimes" Cc: Wojciech Puchar , FreeBSD Hackers , Stefan Blachmann , Lev Serebryakov , George Mitchell Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 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 19:31:40 -0000 On Thu, Jul 5, 2018 at 12:15 PM, Rodney W. Grimes < freebsd-rwg@pdx.rh.cn85.dnsmgr.net> wrote: > > On Thu, Jul 5, 2018 at 11:03 AM, Wojciech Puchar > wrote: > > > > > > > >> Rewriting suspicious sectors is useless in this day and age. HDDs and > > >> SSDs > > >> already do it internally and have for years. Even healthy sectors get > > >> > > > > > > unreadable sectors cannot be rewritten by drive electronics as it > doesn't > > > know what to rewrite. it may possibly remap it but still report read > error > > > until some data will be written - unless giving no error and returning > > > meaningless data is an accepted behaviour. > > > > > > > But if that disk is already managed by ZFS, the pool is redundant, and > the > > bad sector is allocated by ZFS, then ZFS will immediately rewrite the > > unreadable sector. > > ZFS, if it gets a re error, will rewrite the unreadable sector > to a DIFFERENT block, not over the top of the bad spot. > Are you sure? For read errors, I think ZFS rewrites the data in-place, so it doesn't have to rewrite it on all other members of the same mirror/raid group. For persistent write errors of course, it would have to move it to a different LBA as you describe. > > > > only on write it can be done properly. > > > > > > that the HDD/SSD won't fix itself would be a checksum error. Those are > > >> > > > > > > yes and this will happen if you powerdown your disk on write. or get > some > > > power spike or other source of noise that would affect electronic > > > components. > > > > > > > It happens surprisingly rarely. Even on a sudden power loss, the drive > is > > usually able to finish its current write operation. When you run into > > problems would be if the power loss were coincident with a mechanical > shock > > that knocks the head off-track, or something like that. > > I agree that "power failure" are rare causes of write errors, and an > idea of how often this might of happened is look at the emergency > retract counter, if your gettng lots of those you should try to find > out why and stop that. Vibration has become a serious problem though, > at todays head flight hight drives are sensitive to this, you can > even cause a drive to do retires by yelling at it with a loud > voice :-) Look at the "high fly" counter to see if your getting > this issue. > > > > performing full disk rewrite (so not zfs rebuilds) and THEN looking at > > > smart stats and THEN performing regular smartctl -t long will tell the > > > truth. > > > > > > which usually is "drive is fine" in my practice. really faulty drive > will > > > QUICKLY develop new problems. > > > > > > > Yeah, that should make the error go away. It takes a long time, though. > > With a SCSI drive, you can get the exact LBAs affected with a "READ > > DEFECTS" command. But there isn't a vendor-independent equivalent for > > SATA, unfortunately. > > My bitch exactly about ATA missing this. Though there are vendor specific > commands to get it. > > -- > Rod Grimes > rgrimes@freebsd.org >