From owner-freebsd-fs@freebsd.org Tue May 21 22:17:20 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19AD715919EC for ; Tue, 21 May 2019 22:17:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 8DB7E8411B for ; Tue, 21 May 2019 22:17:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 47B5615919EB; Tue, 21 May 2019 22:17:19 +0000 (UTC) Delivered-To: fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 230F915919EA for ; Tue, 21 May 2019 22:17:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B114384110 for ; Tue, 21 May 2019 22:17:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id E449314CF8 for ; Tue, 21 May 2019 22:17:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x4LMHHR9031795 for ; Tue, 21 May 2019 22:17:17 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x4LMHHqO031794 for fs@FreeBSD.org; Tue, 21 May 2019 22:17:17 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 237517] ZFS parallel mounting sometimes misses mounting intermediate filesystems Date: Tue, 21 May 2019 22:17:17 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: pen@lysator.liu.se X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Tue, 21 May 2019 22:17:20 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D237517 Peter Eriksson changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pen@lysator.liu.se --- Comment #5 from Peter Eriksson --- We do something similar on our servers - however the main reason we do it i= s to speed things up. Normally a standard "zfs mount -a" would take slightly less than 1 hour to execute (a lot of ZFS filesystems) which was a bit of a pain when we needed to reboot the servers (or they crashed during office hours). So we've been investigating various ways of speeding things up. A hack was = to run a large number of individual "zfs mount $FS" commands in parallell, but then you need to sort the filesystems so they get mounted in the right orde= r... We also do the bulk of the filesystem mounting in the background so we atle= ast get a login prompt and can login to the machine and see what is happening... The hack was surprisingly effective - 5-10 minutes instead of 1 hour. :-) The scripts can very probably be improved a lot but they do the job for us. Would have been nice to have a "zfs mount --recursive POOL" command. Or a "= zfs mount --parallell=3D20 -a" command. :-) >From our /etc/rc.d/zfs: zfs_start_main() { /sbin/zfs-speedmount > /var/log/zfs/zfs-speedmount.log 2>&1 zfs share -a touch /etc/zfs/exports } ... zfs_start() { if [ `$SYSCTL_N security.jail.jailed` -eq 1 ]; then zfs_start_jail else # Empty exports-file, to prevent annoying error messages while mounting echo -n "" > /etc/zfs/exports # Mount all other root pool filesystems first /sbin/zfs-mountrpool -v # And then we do the rest in the background zfs_start_main & fi } (I'll add our scripts as attachments in case they might be useful to someon= e). --=20 You are receiving this mail because: You are the assignee for the bug.=