From owner-freebsd-hackers@freebsd.org Thu Jul 5 17:23:04 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 A2536103FBC1 for ; Thu, 5 Jul 2018 17:23:04 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) (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 F2B318AD73; Thu, 5 Jul 2018 17:23:03 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lj1-x22f.google.com with SMTP id 1-v6so7214186ljv.9; Thu, 05 Jul 2018 10:23:03 -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=MseNDIcBnGoqbNkTrH/Tdo5NYgyx6iKJ1xFzY5hoftU=; b=dUPQB35Jn811+FpqBem18KYqKnu1ShYfzELELM5KV6NQcDWizseu6M5gy26uffX41a NJYuaM+ymhinOB/XVc/c4/sRTkrYblh+UyKnvxswMxBLRQr5Rv+Yawuj1EAnhgs3Z4rY SdMwXqVETTmej71t7tiMg2WgDe0TWm5Ds/ohrwB6UdphJE2KaYojyYeG/s0yg+GBLEi8 BkHRoNGQwunJp/G4GpR5quxyUFlm3kirrpiohiThlfzG/vvpaqw6qW2MiFEDwJIMG4WS QTMhxx4DzHr2gMEdmh2bgH0Zztb/+NLUSNL4KAIyEHhicBhu8lFGG5xCiKVVRdhwslcC l9/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=MseNDIcBnGoqbNkTrH/Tdo5NYgyx6iKJ1xFzY5hoftU=; b=O2cxnKhKDA0AaP8y73vdT6DKf5W9JjdWPBVOd6F1hkAsMLUYDFeGLxBSDgpJOXJOD8 LAqNSyeB3QXjU9D0qy9Ti3aTZTsbZEehy2e8yMd468rQvi7uZTur711Se0wzfDK/3syY BFPUdMd21FNyM86xv9HW6p0N2ai1r0fKlWLxLr05XSk/g50A14lnM9iY8830yyfBWN64 PtxBy91b8bIdEdbcfCELJnqXtZPh+X2DYVfCyhWXwzERETq3JC261PCjn6mEa87v+x+Q SXXTGuSlfvbVkA6j9VgIqKFGFHMWbDRbmGaLKRRo9vrp8HYUk1g0uuuA98z5kwUB8vce olHA== X-Gm-Message-State: APt69E1Y8VmDjkz1zJQWAfV9AV8UvNRs8AHzJvijq0eEtP3JUAS0AOOG 8+rwDmt3TQHYcZx1/ymyR3pRJ+H4Vrbu3tyBqYU= X-Google-Smtp-Source: AAOMgpenpE1Q8lwm8arweE4ELlOK5ZT7YCgng58QL2lBPxAVY1EdN8B2XUxewm5mYbLRB1w4tRp6WgHBJZYCPJJ2ncE= X-Received: by 2002:a2e:534e:: with SMTP id t14-v6mr4476629ljd.73.1530811382353; Thu, 05 Jul 2018 10:23:02 -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 10:23:01 -0700 (PDT) In-Reply-To: References: <51eb8232-49a7-0b3a-2d0f-9882ebfbfa1d@FreeBSD.org> From: Alan Somers Date: Thu, 5 Jul 2018 11:23:01 -0600 X-Google-Sender-Auth: JY0WxT17E-6SkZOFrGKeQug1EiM Message-ID: Subject: Re: Confusing smartd messages To: Wojciech Puchar Cc: Stefan Blachmann , FreeBSD Hackers , George Mitchell , Lev Serebryakov 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 17:23:05 -0000 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. > > 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. > > 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. -Alan