From nobody Tue Aug 23 21:43:51 2022 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MC2mc1YSvz4ZMgY for ; Tue, 23 Aug 2022 21:44:00 +0000 (UTC) (envelope-from peterj@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MC2mc166Fz3h05; Tue, 23 Aug 2022 21:44:00 +0000 (UTC) (envelope-from peterj@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661291040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6lgeqQQRfU61u87vVcDD6TSjEtHYULp6Gwf4BXagkF4=; b=AH3CZloPCDv83zE+Miw0xGtk4Aoj/yAESQ2i27nmT6pfmPRuRCMs5HTv3IueVA9tSt6k0y R6E5l2jocB7sKbVQyN313jc4sSBaZL1Hht5yJlGHI5vDgxLm83+ATHwkKsDAAmqpGhBKl7 09GEgAYrG3IRoyrF4KV4oeENDonCn/QrDpscpq5eANp3M8lOCXvdohMF3hwnvFGymHTeTd v3Jut+57I7a/uYdvj4p4ctxTOnghAc/4AWWVJCSM2wzM2kG+KL9s32HbwHFRwTQJH5Mcgk 4cqM7KLRjORoIKjDCmb1PN5HFfxLsT90CGkRlxoVQ7AwPoxb5BVbEIt3SIxcEw== Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) (Authenticated sender: peterj) by smtp.freebsd.org (Postfix) with ESMTPSA id 4MC2mZ1hwsz124F; Tue, 23 Aug 2022 21:43:57 +0000 (UTC) (envelope-from peterj@freebsd.org) Date: Wed, 24 Aug 2022 07:43:51 +1000 From: Peter Jeremy To: Ronald Klop Cc: Kyle Evans , freebsd-current@freebsd.org, Ryan Moeller , "Patrick M. Hausen" Subject: Re: Beadm can't create snapshot Message-ID: References: <01000182ac3b8593-fb381303-5719-4863-8fda-2530efcab31b-000000@email.amazonses.com> <2818f3da-3ae2-e6e3-9282-8b62263fb5f3@FreeBSD.org> <623263165.219.1661170200563@localhost> <2078216761.314.1661260774009@localhost> List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2pfGHGZUe9Hv8Yqe" Content-Disposition: inline In-Reply-To: <2078216761.314.1661260774009@localhost> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661291040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6lgeqQQRfU61u87vVcDD6TSjEtHYULp6Gwf4BXagkF4=; b=IsjF8DGZB9dCMOk5Qy6m66VcIcD63sK+6msJKt6sAFqnR2OzQRK8JNi1a/smD7FUMuYvpp S8+oM2fHYkPmEO3bEORH/OZIIb4Wto9KDNZPtv3JQlQAvAAM/rrL85K4Wb/aKNNsJyxtHi CXFrGOFgymJPkkbs3Ceu0WhzX+HNXcaHenCf9JXaR1YJ3b0kQ39TO/sg4+Q/2hbltw1vLZ NLL6h4MZXWcugUV6vAh0Awv+UEo3UamTM0ZQa7jRYk9H7PFZSA4A4sspn4Ey3viMOdVL1R vvSETCO8ki+UntL8tb0aHsgn2nYsaDKyG8WyDf+4tXe4bxYt5e8M1Gdp8YZ4qQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661291040; a=rsa-sha256; cv=none; b=aEAlPIarKN0T8bFsVwc6j1oVR1zoqQUjxV0aCD5syw+g5yJU8+My/iYZhL0TbWaLyGau+Y wQMEViMe7V57eO/jwZXHlMAM1OzYnB8sQKGFxDZqYvOkNagvlAG1fZed1fJlYlialbsuns +/uXoiBdKHGX6/hYQO5gF+anmybFYxLYGL5mMUlXMSiicGeSQMPelVQJMRB1VnhyhfhBva aVMP7xWVRuwQTSz+jORGmmyV47WuPeTsgWOlLHwzysvdfwyUQwUYxjxDfi2QP45QlCFJ+J zk7+w7TGaNeh0G0ADDW47rQFCWkPURjdPoN8g/j0pt6mJfhjbzmtbkgoXBUDsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --2pfGHGZUe9Hv8Yqe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2022-Aug-23 15:19:34 +0200, Ronald Klop wrote: >Van: Kyle Evans >> I was not aware that beadm touches loader.conf, but I find that >> slightly horrifying. I won't personally make bectl do that, but I >> guess I could at least document that it doesn't... > >Today I looked up something for boot environments myself and read this: ht= tps://wiki.freebsd.org/BootEnvironments#Setting_Boot_Dataset > >"In order for boot environments to be effective, you must let the bootfs z= pool property control which dataset gets mounted as the root. Particularly,= /etc/fstab must be purged of any / mount, and /boot/loader.conf must not b= e setting vfs.root.mountfrom directly. " > >So it is documented somewhere at least. Looking at the wiki history, Kyle wrote that in January 2020. I wonder if he recalls where that requirement came from. I've gone rummaging through the mailing list history and other wiki pages. It seems that vfs.root.mountfrom used to be required - e.g. https://lists.freebsd.org/pipermail/freebsd-fs/2011-September/012482.html https://lists.freebsd.org/pipermail/svn-src-head/2011-October/030641.html and people wanted to change that - e.g. https://lists.freebsd.org/pipermail/freebsd-current/2009-October/012933.ht= ml https://lists.freebsd.org/pipermail/freebsd-fs/2010-March/008010.html resulting in it becoming optional in May 2012: https://lists.freebsd.org/pipermail/svn-src-head/2012-May/036902.html Based on the quoted wiki entry, it seems that sometime between May 2012 and January 2020, vfs.root.mountfrom went from "must be set" to "must not be set" and I can't find anywhere where that is publicised. This is a serious problem because we now have the situation where some documentation still says to set vfs.root.mountfrom - e.g. https://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/Mirror step 2.6 and people are still using it without being warned that it shouldn't be used - e.g. the thread starting https://lists.freebsd.org/pipermail/freebsd-fs/2020-July/028351.html I've had a look at the beadm source and it preserves/updates vfs.root.mountfrom if it's present in loader.conf but doesn't add it if it's not present. IMO, if bectl isn't going to update loader.conf, it needs to warn and fail if loader.conf contains a vfs.root.mountfrom that points to a BE that's different to bootfs. (And ideally, a similar check of /etc/fstab, though beadm doesn't touch that). --=20 Peter Jeremy --2pfGHGZUe9Hv8Yqe Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAmMFShJfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzTSTQ//RmmVRpfUgm5oPvt21GLAACEXwdNcH/c2iL0RPJxPRaAl2PMghd06wT6t xk3G2b2hHguPWfAsNGnUkF7/zaQrqpTJMUEIAu/gvGtgNpwwNRyzBV2mM3Cy+IF7 VNmo6mpUqk5HfU70ne3wcmbU0KIuBjrghN7yQjVdie5pCeAanp8mDW66auMPgyyE 0Yc59P4S/Xts65+ywKOmt5UUi9Q4XJtBGU9sCG5var+pvRjrup1xweKP9Qb9SsC5 aBNsreV0or3/xZSQc7oijckmu5STWju+w8sbuceRRXRSeNsWGPyA1nF14yCtmiLs qYOTnlN4wPvYQ1BVCty0Bpxxbw3hX5VihWVowT2ilCyOOqaqTjXBw2V1v3N3ncin aM4HE8Y5EF6zxHz7XBD51x/GTDppk0yXNrsdzq+rUZrSEiGFjaSw42ka/gz9bJC1 sE5Aubcb/IAkXc4KUaaVJD7vcAR4SZGsykImW5Voj3uvGWs7hQOJgJEyzri6daSP iPHSMHk0+loeoOzxG146jh8DMosmcHB9koLvmSmCXlBDQWixQSvdh+NtMgF3kDkY dfdpL8v2QUNmN5yfK24VVbv0pf9eZWk+7WbFxNoBPKpq0TBXMPy9JN0uD4P/6InT Yue4RXB4P1vGFXzp3zzEupj9Hmx7ZvjRv3kKMcscxTqThdKuNKA= =6lli -----END PGP SIGNATURE----- --2pfGHGZUe9Hv8Yqe--