From owner-freebsd-fs@FreeBSD.ORG Fri Mar 23 14:01:39 2012 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B3D3106566B; Fri, 23 Mar 2012 14:01:39 +0000 (UTC) (envelope-from florian@wagner-flo.net) Received: from umbracor.wagner-flo.net (umbracor.wagner-flo.net [213.165.81.202]) by mx1.freebsd.org (Postfix) with ESMTP id 4820C8FC08; Fri, 23 Mar 2012 14:01:39 +0000 (UTC) Received: from naclador.mos32.de (ppp-188-174-88-96.dynamic.mnet-online.de [188.174.88.96]) by umbracor.wagner-flo.net (Postfix) with ESMTPSA id 11AAD3C058F6; Fri, 23 Mar 2012 15:01:38 +0100 (CET) Date: Fri, 23 Mar 2012 15:01:36 +0100 From: Florian Wagner To: Matthew Seaman Message-ID: <20120323150136.470773a9@naclador.mos32.de> In-Reply-To: <4F6C76CD.7050006@FreeBSD.org> References: <4F6C6352.9090906@FreeBSD.org> <20120323131508.0272be25@auedv3.syscomp.de> <4F6C76CD.7050006@FreeBSD.org> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.8; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/DFJ7TaTNve7.3aGmmZY5WJU"; protocol="application/pgp-signature" Cc: freebsd-fs@FreeBSD.org Subject: Re: Overriding the zpool bootfs property from the loader? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Mar 2012 14:01:39 -0000 --Sig_/DFJ7TaTNve7.3aGmmZY5WJU Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 23 Mar 2012 13:12:45 +0000 Matthew Seaman wrote: > On 23/03/2012 12:15, Florian Wagner wrote: > > I've recently discussed more or less the same on this list. The > > thread is called "Extending zfsboot.c to allow selecting filesystem > > from boot.config" and available in the mailing list archives of > > October, November 2011 and Januar 2012. > >=20 > > Summary: Andriy Gapon has a bunch of changes against head in his > > avgbsd repository [1] which implement something like this. With his > > help I've backported these to stable 8. > >=20 > > I've just recently gone over the work and put together a culminating > > patch, which I've tested as extensively as possible in my at-home > > environment. This is available as a Mercurial patch queue at [2] or > > directly at [3]. >=20 > Yes, this looks like pretty much what I was asking for. So, if I > understand this correctly, given a root zpool named 'zroot' and a > number of ZFSes with different boot environments ( zroot/ROOT/FOO, > zroot/ROOT/BAR, etc.) I could interrupt the boot before the menu > screen and just type at the boot: prompt -- >=20 > zfs:zroot/ROOT/FOO:boot/zfsloader >=20 > or >=20 > zfs:zroot/ROOT/BAR:boot/zfsloader > > to select different environments. Is that right? I'll give your > patches a go over the weekend -- I'm on stable/9 though. Actually the format is :: and is optional and defaults to /boot/zfsloader. So examples would zroot:ROOT/FOO: or zroot:ROOT/BAR:/boot/zfsloader. I think this is documented incorrectly in one of the commits in the avgbsd repository. Obviously boot(8) should be updated correctly... For reference, setup on my fileserver looks link this: $ zpool get bootfs root NAME PROPERTY VALUE SOURCE root bootfs root/boot-config local $ mount | grep root/boot-config root/boot-config on /boot/config (zfs, local, nfsv4acls) $ cat /boot/config/boot.config=20 root:stable8-r232838: Regards Florian --Sig_/DFJ7TaTNve7.3aGmmZY5WJU Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iEYEARECAAYFAk9sgkAACgkQLvW/2gp2pPw9HQCfTwzbwOLm0xP8o2v1npLAgkRv HH4AoJ2TtsgQ9GQzVQfQOxiyWbVms1+a =DC8N -----END PGP SIGNATURE----- --Sig_/DFJ7TaTNve7.3aGmmZY5WJU--