Date: Sun, 8 Mar 2020 12:37:56 -0600 From: Warner Losh <imp@bsdimp.com> To: Peter Eriksson <pen@lysator.liu.se> Cc: freebsd-fs <freebsd-fs@freebsd.org> Subject: Re: Ways to "pause" ZFS resilver? Message-ID: <CANCZdfo7BDLJYko1wW8L5%2BwxzMY6L-Rd0RbYK8XSL1b0DgQ6qw@mail.gmail.com> In-Reply-To: <BDFFC0E8-9D5A-4E45-835F-9D00CDAE8829@lysator.liu.se> References: <BDFFC0E8-9D5A-4E45-835F-9D00CDAE8829@lysator.liu.se>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Mar 8, 2020 at 12:35 PM Peter Eriksson <pen@lysator.liu.se> wrote: > 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 o= ften) and thus I=E2=80=99d > like to figure out some way to =E2=80=9Cpause=E2=80=9D it during office h= ours 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 ru= nning 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). > If you are dealing with SSDs, you might look to see if BIO_DELETE (trim) traffic is causing delays. If so, you can temporarily disable TRIM on the disk being resilvered. In the resilver case, trim doesn't help much anyway since you're rewriting the entire drive. If not, then I'm not sure what else to recommend... Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfo7BDLJYko1wW8L5%2BwxzMY6L-Rd0RbYK8XSL1b0DgQ6qw>