From owner-freebsd-hackers@freebsd.org Tue Jul 16 17:09:43 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 17871B53C3 for ; Tue, 16 Jul 2019 17:09:43 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id B3AB369E87 for ; Tue, 16 Jul 2019 17:09:42 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id B28EDB53C2; Tue, 16 Jul 2019 17:09:42 +0000 (UTC) Delivered-To: hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B2528B53C1 for ; Tue, 16 Jul 2019 17:09:42 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DB81669E86 for ; Tue, 16 Jul 2019 17:09:41 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: by mail-ed1-x52c.google.com with SMTP id k21so21106432edq.3 for ; Tue, 16 Jul 2019 10:09:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version :content-transfer-encoding; bh=nEAIr3r28XDLt8XMS/jO6dbz9kQHwTt17LSkZpY8owA=; b=WHJyKEdTurWaT3uyHyKMHyUML12cmEDS2/GmTvVGWCUQfiakx/kj4aH8gWRBkmLo7z Q7k9yDPIRB95R1EOGRQeL6SFMCLHrJWosIZ/DQtvN3HCMC7Gu659mMyZE4I8podhRre/ tZKF52vYgg1tkBlSIlD1dhwy7vRHJxlHxFZdlgpfQUO3EjK5bIre6eRyBzdBrS4i2RFF c3AXQyRSaa98E1nlzHeLiKWg0JHMH9QR20rb7CpBz+7NHH3oPmCyzswOsjqg+oE2bU/I rbXqJnp9pjxd0YK8rnK2CzNahjJeh8Go4tItgGUiejvEuTWjgOG6e70eihdewe8Qi3GG rJEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-transfer-encoding; bh=nEAIr3r28XDLt8XMS/jO6dbz9kQHwTt17LSkZpY8owA=; b=IAwWdoldemmbMhUrRqoxo6kpC+giyYOR/8bI0H6pWlTXo3amIEf8xMq12/VuDqz+f/ HbfKDuWnsV1PoO38wactQNHgtL9VwVECBmEGwVV2Glec6fUUz+4bCD7bMiFnE5MZhD65 yrBC5+pKm2cwrdU5gpJaaCj+ZGjWWI2R0nLCfUCWJexCd5iSeb2cAEkOXi4GWibBXMIi HKGem/x8mf7G70S37xY9kmig9cicYeNvFPuCut4PDgF+MAYzVYAIUWFuHb/yvSGUp1Eh vKWT3k7M3UGaF9hrslapRDvJpsMxlY5k2FE5YFEP79qiZ6KLo9ePNMr4xSTjK8znjKDZ M4Zg== X-Gm-Message-State: APjAAAXC2FxEvGXNe0iAuAh8HD84qZONKUu5IPF+ZoVzclU9Q0XKb3xj o/2g6u2UVfp+sxK2ld4SUR3d3yMN X-Google-Smtp-Source: APXvYqwE7/WLQtL/CBMiwQKjX3Ic2An6k+yUHb2/qs/f0ZiICo2gf9kjyUqn4//Ivjhe2s3CYuooGw== X-Received: by 2002:a17:906:b211:: with SMTP id p17mr26607603ejz.11.1563296980650; Tue, 16 Jul 2019 10:09:40 -0700 (PDT) Received: from localhost ([213.149.52.156]) by smtp.gmail.com with ESMTPSA id e29sm5708680eda.51.2019.07.16.10.09.40 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Jul 2019 10:09:40 -0700 (PDT) Date: Tue, 16 Jul 2019 19:08:54 +0200 From: Domagoj =?UTF-8?Q?Smol=C4=8Di=C4=87?= To: hackers@freebsd.org Subject: For a first time completed S.M.A.R.T captive test Message-ID: <20190716190854.000061b2@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: B3AB369E87 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=WHJyKEdT; dmarc=pass (policy=none) header.from=gmail.com; spf=softfail (mx1.freebsd.org: 2610:1c1:1:606c::50:13 is neither permitted nor denied by domain of rank1seeker@gmail.com) smtp.mailfrom=rank1seeker@gmail.com X-Spamd-Result: default: False [-4.78 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; FORGED_RECIPIENTS_FORWARDING(0.00)[]; FORWARDED(0.00)[hackers@mailman.nyi.freebsd.org]; FREEMAIL_FROM(0.00)[gmail.com]; SPF_FAIL_FORWARDING(0.00)[]; TO_DN_NONE(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(0.00)[gmail.com,none]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; DMARC_POLICY_ALLOW_WITH_FAILURES(-0.50)[]; NEURAL_HAM_SHORT(-0.65)[-0.652,0]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; FORGED_RECIPIENTS(0.00)[hackers@freebsd.org,freebsd-hackers@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RCVD_COUNT_FIVE(0.00)[6]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(-1.42)[ip: (-0.15), ipnet: 2610:1c1:1::/48(-3.90), asn: 11403(-2.99), country: US(-0.06)]; RCPT_COUNT_ONE(0.00)[1] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jul 2019 17:09:43 -0000 11.2-RELEASE-p9 =46rom the first time I started to use FreeBSD and upon to just recently, wit= h smartmontools, I have NEVER successfully completed captive test. No matter which HDD or smartmontools version I used, upon initiating 'Exten= ded captive' test, I would ALWAYS get error: 'Interrupted (host reset)' This implies nothing is being mounted from device, so only it's node exist = in /dev/ and nothing "chats" with it except kernel. Stopping smartd service also didn't help. Searching on the internet, I have never found anyone succeeding with it. Just a "solutions" that it should never be used?! So I started to think a little bit out of the box ... HDD has it's OWN board with it's OWN BIOS + firmware, which actually holds = S.M.A.R.T version/ability and IT executes issued test from OS, using it's o= wn firmware to actually run a test. Once HDD receives test request from OS, HDD doesn't need OS at all! So, in order to get rid of a results like: Num Test_Description Status Remaining LifeTime(ho= urs) LBA_of_first_error # 2 Extended captive Interrupted (host reset) 90% 40743 = - And suspecting OS (kernel?!) is pestering HDD during it's captive test, thu= s interrupting it, AS SOON as captive CMD is issued and hangs occurs (it is= too late when hang passes by itself!), I've pulled out SATA DATA cable and= left SATA POWER cable attached. Hang is stopped as soon as SATA DATA cable is unplugged and it's used only = to transfer test request anyway to HDD and all HDD needs from that point on= , is JUST a power and it's "piece of mind"! RESULT: -- SMART Self-test log structure revision number 1 Num Test_Description Status Remaining LifeTime(ho= urs) LBA_of_first_error # 1 Extended captive Completed without error 00% 40744 = - # 2 Extended captive Interrupted (host reset) 90% 40743 = - -- FINALLY! =3D=3D> '# 1 Extended captive Completed without error' So ..., what to conclude from this? Does kernel really must "chat" with HDD in order to keep alive it's device = node in /dev/ or is it something else? If HDD supports captive test and during it, why it simply doesn't ignore OS= /kernel (it is up to HDD's firmware code to make that decision). Is this, I'm not even sure how to name it ..., a borderline bug? Anyway, it is a little bit "impractical" to use terminal with one hand and = with other to pull out SATA data cable. Domagoj Smol=C4=8Di=C4=87