From owner-freebsd-stable@freebsd.org Sun Apr 12 14:57:10 2020 Return-Path: Delivered-To: freebsd-stable@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 0D1DB2BFC01 for ; Sun, 12 Apr 2020 14:57:10 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2a00:14b0:4200:32e0::1ea]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits)) (Client CN "gilb.zs64.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 490ZbS6Vv8z4CxC for ; Sun, 12 Apr 2020 14:57:08 +0000 (UTC) (envelope-from stb@lassitu.de) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 713A02083F0; Sun, 12 Apr 2020 14:57:07 +0000 (UTC) From: Stefan Bethke Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_49CA8FB0-6B6F-4047-879C-86F9F6A65A05"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: make kernel ignore broken SATA disk Date: Sun, 12 Apr 2020 16:57:06 +0200 In-Reply-To: <14aeff4a-9241-20ef-2827-5a5282d08a94@grosbein.net> Cc: freebsd-stable To: Eugene Grosbein References: <14aeff4a-9241-20ef-2827-5a5282d08a94@grosbein.net> X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 490ZbS6Vv8z4CxC X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of stb@lassitu.de designates 2a00:14b0:4200:32e0::1ea as permitted sender) smtp.mailfrom=stb@lassitu.de X-Spamd-Result: default: False [-5.23 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MV_CASE(0.50)[]; HAS_ATTACHMENT(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,multipart/alternative,text/plain]; DMARC_NA(0.00)[lassitu.de]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; SIGNED_PGP(-2.00)[]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:~,4:~]; ASN(0.00)[asn:13135, ipnet:2a00:14b0::/32, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-1.33)[ip: (-3.70), ipnet: 2a00:14b0::/32(-1.81), asn: 13135(-1.14), country: DE(-0.02)] X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Apr 2020 14:57:10 -0000 --Apple-Mail=_49CA8FB0-6B6F-4047-879C-86F9F6A65A05 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > Am 12.04.2020 um 16:45 schrieb Eugene Grosbein : >=20 > 12.04.2020 21:37, Stefan Bethke wrote: >=20 >> I have a server I don't have physical access to right now, which has = a broken SATA disk that produces mostly errors (but not entirely). >>=20 >> The disk has two partitions that are part of a zpool each. I can't = bring the system up with this disk being online, because ZFS is trying = its darndest to use it. >>=20 >> I already renamed the GPT partitions in the hope that ZFS would not = find them anymore, but it does. >>=20 >> I can't gpart destroy -f ada1 because "device busy". >>=20 >> Is there a way, ideally in the loader, to tell the kernel to ignore = ada1 and/or ahcich5? Or can I force ZFS some other way to ignore the = disk? I do have a spare disk I can use to replace the failed one, but I = can't get the machine into a state where I could even issue the zpool = replace command. >=20 > It depends on the HDD controller the disk is attached to. What = controller and driver does it have? This is from an identlical machine without disk issues: # camcontrol devlist at scbus4 target 0 lun 0 (ada0,pass0) at scbus5 target 0 lun 0 (ada1,pass1) at scbus6 target 0 lun 0 (ada2,pass2) at scbus8 target 0 lun 0 (pass3) # pciconf -lv ... ahci0@pci0:0:23:0: class=3D0x010601 card=3D0x088415d9 = chip=3D0xa1028086 rev=3D0x31 hdr=3D0x00 vendor =3D 'Intel Corporation' device =3D 'Q170/Q150/B150/H170/H110/Z170/CM236 Chipset SATA = Controller [AHCI Mode]' class =3D mass storage subclass =3D SATA ... dmesg: ahci0: port = 0xf050-0xf057,0xf040-0xf043,0xf020-0xf03f mem = 0xdf410000-0xdf411fff,0xdf41e000-0xdf4 1e0ff,0xdf41d000-0xdf41d7ff irq 16 at device 23.0 on pci0 ahci0: AHCI v1.31 with 8 6Gbps ports, Port Multiplier not supported ahcich0: at channel 0 on ahci0 ahcich1: at channel 1 on ahci0 ahcich2: at channel 2 on ahci0 ahcich3: at channel 3 on ahci0 ahcich4: at channel 4 on ahci0 ahcich5: at channel 5 on ahci0 ahcich6: at channel 6 on ahci0 ahcich7: at channel 7 on ahci0 ahciem0: on ahci0 ada0 at ahcich4 bus 0 scbus4 target 0 lun 0 ada0: ACS-2 ATA SATA 3.x device ada0: Serial Number Z1F4GVC3 ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes) ada0: Command Queueing enabled ada0: 2861588MB (5860533168 512 byte sectors) ada0: quirks=3D0x1<4K> ada1 at ahcich5 bus 0 scbus5 target 0 lun 0 ada1: ACS-2 ATA SATA 3.x device ada1: Serial Number W1F5180B ada1: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes) ada1: Command Queueing enabled ada1: 2861588MB (5860533168 512 byte sectors) ada1: quirks=3D0x1<4K> ada2 at ahcich6 bus 0 scbus6 target 0 lun 0 ada2: ACS-2 ATA SATA 3.x device ada2: Serial Number Z1F4EJEQ ada2: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes) ada2: Command Queueing enabled ada2: 2861588MB (5860533168 512 byte sectors) ada2: quirks=3D0x1<4K> Stefan -- Stefan Bethke Fon +49 151 14070811 --Apple-Mail=_49CA8FB0-6B6F-4047-879C-86F9F6A65A05 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEzBAEBCgAdFiEEJ+hF98o4r3eU/HiPD885WK4W4sEFAl6TLEIACgkQD885WK4W 4sHgZAgApzX77Z16dPiGMEDU6B0CYDYFRIVgzgzFYv8he9bkj2hPN0loRBdxh4Fw xwGOAIaCGmw4Md79j7839WNpU+o5VnKWKIbltW1FWSD04JOSfXn9hIPI8NVMJW+h PajLtmQw70V18zbgN1/yBhvT6taaDuB15arF3NapAOnqEryDRJvukyCbj/RU/BKZ VEW9potzxK1XLWH8m2CxDXYZ+3NOXOhnIPihnwZ/Xg4CLOxiPnYlYPrCb1qwiKqt 1OODHjwtJSP9OgU6cW8cmnzHF96riXn1TCiRc8LVhZbQNXmvZPYkMZM/jn6Tj0xf xdwHLEp1mHb8nHvDAdQkxDAek2kMWQ== =UCIi -----END PGP SIGNATURE----- --Apple-Mail=_49CA8FB0-6B6F-4047-879C-86F9F6A65A05--