From owner-freebsd-fs@FreeBSD.ORG Thu Mar 19 11:15:18 2015 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1F0FC33 for ; Thu, 19 Mar 2015 11:15:18 +0000 (UTC) Received: from smtprelay04.ispgateway.de (smtprelay04.ispgateway.de [80.67.18.16]) (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 B1AFAF85 for ; Thu, 19 Mar 2015 11:15:18 +0000 (UTC) Received: from [78.35.163.37] (helo=fabiankeil.de) by smtprelay04.ispgateway.de with esmtpsa (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.84) (envelope-from ) id 1YYYPt-0000jY-H5 for freebsd-fs@freebsd.org; Thu, 19 Mar 2015 12:15:09 +0100 Date: Thu, 19 Mar 2015 12:15:10 +0100 From: Fabian Keil To: FreeBSD FS Subject: Using vfs.mountroot.timeout for ZFS root pools as well Message-ID: <6f5aa0bc.26ef1167@fabiankeil.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/LHRR9aimlCuGCJSSjw0JNR5"; protocol="application/pgp-signature" X-Df-Sender: Nzc1MDY3 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Mar 2015 11:15:19 -0000 --Sig_/LHRR9aimlCuGCJSSjw0JNR5 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On some of my systems booting FreeBSD (and thus ElectroBSD) from a (geli-encrypted) ZFS rootpool on an USB device does not work without user interaction because kernel_mount() is called before the USB device is detected. The vfs.mountroot.timeout doesn't help because it is ignored for ZFS. This can be changed without having to figure out the pool layout by just calling kernel_mount() repeatedly: https://www.fabiankeil.de/sourcecode/electrobsd/parse_mount-Use-vfs.mountro= ot.timeout-for-ZFS.diff As an alternative the retrying could be delegated to kernel_mount(). Any comments on this? Note that for the boot process on the affected system to work (with user interaction or with the patch), spa_import_rootpool() has to properly unlock spa_namespace_lock when failing: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D198563 Fabian --Sig_/LHRR9aimlCuGCJSSjw0JNR5 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlUKr74ACgkQBYqIVf93VJ1pfQCfflAgApZc8FLXYThly5cp5dA9 gFMAn0WC4ssdGKqFJmNY3GShGjnmKWTf =6PJh -----END PGP SIGNATURE----- --Sig_/LHRR9aimlCuGCJSSjw0JNR5--