From owner-freebsd-stable@freebsd.org Sun Apr 12 17:03:42 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 AD4E92C2F04 for ; Sun, 12 Apr 2020 17:03:42 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 490dPT74yhz4N4B for ; Sun, 12 Apr 2020 17:03:41 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1jNg1C-0009Zs-FH; Sun, 12 Apr 2020 20:03:38 +0300 Date: Sun, 12 Apr 2020 20:03:38 +0300 From: Slawa Olhovchenkov To: Stefan Bethke Cc: freebsd-stable Subject: Re: make kernel ignore broken SATA disk Message-ID: <20200412170338.GJ8012@zxy.spb.ru> References: <20200412154319.GO8028@zxy.spb.ru> <9D60946A-6D81-444B-B6D0-36202B3BE5C6@lassitu.de> <20200412163104.GI8012@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Rspamd-Queue-Id: 490dPT74yhz4N4B X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of slw@zxy.spb.ru has no SPF policy when checking 195.70.199.98) smtp.mailfrom=slw@zxy.spb.ru X-Spamd-Result: default: False [0.81 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.07)[-0.072,0]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.10)[-0.099,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[zxy.spb.ru]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:5495, ipnet:195.70.192.0/19, country:RU]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.08)[asn: 5495(0.37), country: RU(0.01)]; RCVD_COUNT_TWO(0.00)[2] 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 17:03:42 -0000 On Sun, Apr 12, 2020 at 06:38:10PM +0200, Stefan Bethke wrote: > > > > Am 12.04.2020 um 18:31 schrieb Slawa Olhovchenkov : > > > > On Sun, Apr 12, 2020 at 06:24:09PM +0200, Stefan Bethke wrote: > > > >> Am 12.04.2020 um 17:43 schrieb Slawa Olhovchenkov : > >>> > >>> On Sun, Apr 12, 2020 at 04:37:06PM +0200, Stefan Bethke wrote: > >>> > >>>> 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). > >>>> > >>>> 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. > >>>> > >>>> I already renamed the GPT partitions in the hope that ZFS would not find them anymore, but it does. > >>>> > >>>> I can't gpart destroy -f ada1 because "device busy". > >>>> > >>>> 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. > >>> > >>> `zpool offline pool device` if you have enoght redundancy? > >> > >> I do, but the command doesn't return. Instead, I'm getting loads of sata error message. > > > > What you zpool configuration? > > This is from the working system. The identifiers are slightly different, but the structure is identical. what about `zpool detach ` ? > # zpool status > pool: data > state: ONLINE > status: Some supported features are not enabled on the pool. The pool can > still be used, but some features are unavailable. > action: Enable all features using 'zpool upgrade'. Once this is done, > the pool may no longer be accessible by software that does not support > the features. See zpool-features(7) for details. > scan: resilvered 176K in 0 days 00:01:28 with 0 errors on Sun May 26 21:24:54 2019 > config: > > NAME STATE READ WRITE CKSUM > data ONLINE 0 0 0 > mirror-0 ONLINE 0 0 0 > gpt/ls0data ONLINE 0 0 0 > gpt/ls1data ONLINE 0 0 0 > logs > gpt/data0log ONLINE 0 0 0 > cache > gpt/data0cache ONLINE 0 0 0 > > errors: No known data errors > > pool: ls-host > state: ONLINE > status: Some supported features are not enabled on the pool. The pool can > still be used, but some features are unavailable. > action: Enable all features using 'zpool upgrade'. Once this is done, > the pool may no longer be accessible by software that does not support > the features. See zpool-features(7) for details. > scan: scrub repaired 0 in 0 days 00:06:33 with 0 errors on Sun Apr 12 11:46:25 2020 > config: > > NAME STATE READ WRITE CKSUM > ls-host ONLINE 0 0 0 > mirror-0 ONLINE 0 0 0 > gpt/ls0host ONLINE 0 0 0 > gpt/ls1host ONLINE 0 0 0 > logs > gpt/host0log ONLINE 0 0 0 > cache > gpt/host0cache ONLINE 0 0 0 > > errors: No known data errors > > > -- > Stefan Bethke Fon +49 151 14070811 >