From owner-freebsd-fs@freebsd.org Sun Mar 8 18:34:54 2020 Return-Path: Delivered-To: freebsd-fs@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 ACDE7271BAD for ; Sun, 8 Mar 2020 18:34:54 +0000 (UTC) (envelope-from pen@lysator.liu.se) Received: from mail.lysator.liu.se (mail.lysator.liu.se [IPv6:2001:6b0:17:f0a0::3]) (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 48b94q5NK5z4CRJ for ; Sun, 8 Mar 2020 18:34:51 +0000 (UTC) (envelope-from pen@lysator.liu.se) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 0508640002 for ; Sun, 8 Mar 2020 19:34:46 +0100 (CET) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id E6F4540008; Sun, 8 Mar 2020 19:34:45 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on bernadotte.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,AWL autolearn=disabled version=3.4.2 X-Spam-Score: -1.0 Received: from [192.168.1.132] (h-201-140.A785.priv.bahnhof.se [98.128.201.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 5731C40002 for ; Sun, 8 Mar 2020 19:34:45 +0100 (CET) From: Peter Eriksson Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Ways to "pause" ZFS resilver? Message-Id: Date: Sun, 8 Mar 2020 19:34:44 +0100 To: freebsd-fs X-Mailer: Apple Mail (2.3608.60.0.2.5) X-Virus-Scanned: ClamAV using ClamSMTP X-Rspamd-Queue-Id: 48b94q5NK5z4CRJ X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=liu.se; spf=pass (mx1.freebsd.org: domain of pen@lysator.liu.se designates 2001:6b0:17:f0a0::3 as permitted sender) smtp.mailfrom=pen@lysator.liu.se X-Spamd-Result: default: False [-2.97 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-0.95)[-0.949,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.lysator.liu.se]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; PREVIOUSLY_DELIVERED(0.00)[freebsd-fs@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[4]; RCVD_TLS_LAST(0.00)[]; TO_DN_ALL(0.00)[]; DMARC_POLICY_ALLOW(-0.50)[liu.se,none]; RCVD_IN_DNSWL_NONE(0.00)[3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.a.0.f.7.1.0.0.0.b.6.0.1.0.0.2.list.dnswl.org : 127.0.11.0]; MV_CASE(0.50)[]; IP_SCORE(-1.72)[ip: (-6.72), ipnet: 2001:6b0::/32(-1.04), asn: 1653(-0.83), country: EU(-0.01)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:1653, ipnet:2001:6b0::/32, country:EU]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Mar 2020 18:34:54 -0000 I=E2=80=99m looking for ideas on how to pause a running ZFS resilver on = a FreeBSD 11.3-RELEASE-p6 system. The reason is we have a system where a running such causes severe NFS = =E2=80=9Chiccups=E2=80=9D for our users (like 5-20s delays more or less = often) and thus I=E2=80=99d like to figure out some way to =E2=80=9Cpause=E2= =80=9D it during office hours until either we=E2=80=99ve found and fixed = the problem or the resilver is done (1D15H to go)... Since there isn=E2=80=99t any =E2=80=9Czfs=E2=80=9D command to pause a = running resilver I=E2=80=99m pondering alternative more =E2=80=9Ccreative=E2= =80=9D ways. /usr/src/cddl/contrib/opensolaris/uts/common/fs/zfs: > if (zio_flags & ZIO_FLAG_RESILVER) > scan_delay =3D zfs_resilver_delay; > else { > ASSERT(zio_flags & ZIO_FLAG_SCRUB); > scan_delay =3D zfs_scrub_delay; > } > > if (scan_delay && (ddi_get_lbolt64() - spa->spa_last_io <=3D = zfs_scan_idle)) > delay(MAX((int)scan_delay, 0)); Settings vfs.zfs.scan_idle to something high and then = vfs.zfs.resilver_delay to 10*60*60*kern.hz (10 hours) and hoping the = =E2=80=9Cif" statement will trigger? But that assumes nothing can/will = interrupt delay(). Hmmm... Any other suggestions? (I don=E2=80=99t want to abort the resilver). - Peter