From nobody Wed Aug 24 08:46:10 2022 X-Original-To: freebsd-stable@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 4MCKSm26vGz4ZfNl for ; Wed, 24 Aug 2022 08:46:16 +0000 (UTC) (envelope-from peterj@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 4MCKSm1cFcz3XNb; Wed, 24 Aug 2022 08:46:16 +0000 (UTC) (envelope-from peterj@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661330776; 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=HbAkmJXUBW2KzhmwhybkcjSYAP8gfvLCFe+RLvXTMuM=; b=vP8uz1/4i0qgb82eJz/HFeXi3lLtnOnMZHG3n5R1ukTCxIsi3muLhDIE5yrgH6nS+Ey2jG lhumFQNWDxZmVHpENJPWCT/zu491Fr3LMJEhfB0Gf+s5ItbxSq6x8nQ8ZQLxRhVHF/hVqa xNBEfUxfRLbSF3L1fc7aFPy4gvPQW3Y56XlUmOY4klH+P61J2C2SYlbTz0zUNpuUvXFyKD B38/nixz/532MVx7YhS9LeGLayMK7s6Gg9IoIayQInSYRFkHu9eqi2tadvZoKy6xNdr8hZ ll1jKb6Yfh7a7mc51Gml2zcDg5YAEJb+o8quF//8D60xeFeHkVaSxlZGebiPQg== 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 4MCKSk6PFlz1Bp9; Wed, 24 Aug 2022 08:46:14 +0000 (UTC) (envelope-from peterj@freebsd.org) Date: Wed, 24 Aug 2022 18:46:10 +1000 From: Peter Jeremy To: John Kennedy Cc: Ronald Klop , FreeBSD-STABLE Mailing List Subject: Re: boot environment and /var/db/etcupdate ? Message-ID: References: <389080342.286.1661263368708@localhost> List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="KsyFOwaaLw8dycDE" Content-Disposition: inline In-Reply-To: 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=1661330776; 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=HbAkmJXUBW2KzhmwhybkcjSYAP8gfvLCFe+RLvXTMuM=; b=NWh8u+uc1Pn054LkqGj92cmEGfgamgoAocgk4N8YzZWYmTHn8w0ZWX9nb2rcT9E9saGxUs Uo6a9JovInd6xr1tC7bt7m4+gtPlgRP//4esljxhQUC6qNOlo073gpuzEedxMyGIERJimj SvwZ6avIvFEj0zlNNOcX7PUb3Bwfg8r1Jc80chJKmRW3686F/hJbSe3NHDGD5Kfi/1LoG6 u6IeMiHUBMTbPRGC2WXWXlGqtnJC/hxR7WaeFVaEgHP8Hw/NXnjRHOFpAI1a6u+oNZ8dXC EhRy/wGcfCLumDkQaNP2VOgSAK/5rrkf2w/E92TAAJk7yAprxx25N4oOjZvk8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661330776; a=rsa-sha256; cv=none; b=dMhkWTUo51JYLMMsthu/wR38TFWFIo0YnIBVcs97aV8bTNeveqvaY6farAadvk7vE8tSU1 2LBp6rHhyJKpbqAPVhlILwd1CoGKsajVGk6F/Cy74zBt+yeUHGy49FPOTfmXOL7MzZ52Ai GziCJYX4kYJ+UN2TA5BTAQjKUZctkRZmhGN/qIKzXw44K0ua7tdgH2WFLjy6XcfX863e+Z Pfpt58W8WaoCsODbsm/XaHxwoW/Mi3XXvUdVyced+POp91dk4zqg3qn5bAzP3h60yfrNq6 8Q1OccFdSvxzMoGAKPMx9Z4G/v7fekAKuDriF7o8mJqEwW/ZEv1Mhq+x39m/PA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --KsyFOwaaLw8dycDE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2022-Aug-23 15:52:53 -0700, John Kennedy wrote: >On Tue, Aug 23, 2022 at 04:02:48PM +0200, Ronald Klop wrote: >> Hi, >>=20 >> I'm running the super duper boot environment using ZFS. [1] >>=20 >> I have /var and /usr/local as separate datasets. These do not change whe= n I upgrade the OS and that keeps the backups a lot smaller as the backup s= ees a new BE as a new dataset and fully zfs sends all the data again. >>=20 >> But when I rollback /var/db/etcupdate is not in sync with / anymore. >> And /var/db/ports and /var/db/pkg should be kept in sync with /usr/local= =2E But I do not need to rollback these if I need to go back to the previou= s BE. Looking in /var, the only thing I can see that needs to track the BE is /var/db/etcupdate - everything else should preferentially be outside the BE (and having things like e.g. /var/mail in the BE will cause problems if you rollback the BE). /usr/local and /var/db/pkg need to track to prevent package installation metadata getting out of step with the actual installed packages. > For my part, /var/db/pkg is mostly just a reference to my local >poudriere package stash and is relevant to the BE (but pretty stagnant >unless I'm changing major versions between 12/13/14). On my system, >/var/db is part of /. Several database ports default to putting their data under /var/db so having that in a BE is likely to cause problems if you rollback. > I'd be a little leery of having /usr/local decoupled from the BE, >but that's mostly worried about things like kernel drivers that would >get out of sync with the kernel in the BE. Kernel driver ports should all be in /boot/modules, not /usr/local (this does mean that rolling back a BE will cause problems with the metadata associated with those ports, but typically there are relatively few such ports). I don't believe there are any other ports that are tightly bound to the actual running kernel (though sysutils/lsof comes close). A downside of putting /usr/local in the BE is that another large collection of ports default to storing their data under /usr/local and that should be decoupled from BEs. Overall, I don't believe there's a one-size-fits-all solution to identifying what should be part of the BE. If you are using BEs to switch between major versions, it probably does make sense to include /usr/local in the BE - but then you need to extricate all the application data that needs to not be rolled back. --=20 Peter Jeremy --KsyFOwaaLw8dycDE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAmMF5UxfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzSfYw//Yh9qiqij+e7k6c6gdhSi0+0EbmrwxMs4e8HLZQN0b+lNx5O95XG8QZ/3 Fx+/d1CUAe7wm9qXR6WcTKEndMp8igf3hkJlfnfS6l/cAsCZqn3ZQ5yTKhtUG7z3 6AxYb1ndGKZBzdcdBLoi2YHDkZ/eU58NMc1tjz9RwmhsxkXiC3LhLnHaf3T2ghFs I0USEGgKDItNph9sfk7k0IR/JF42whQfTDqEe2ixQ0RF8K5sSoyVsEl2RbVWRWu5 4P9rHVAPVIiRp6oYtq9z/LDzHjbyN7q0DyYTDlTY7hnU+a/YQK5wWWO2BygTaSkR v/hCnBWf5TDkS//mb7s99b5n4Y1/GPLKQPmd5UIXrCYUv6Wk4zJpWJ2xWOz0SP6o L7U8jBlG+Gy+FALvHwiK1gzHMudHRxJwPPIuBIWchYpXkZIO77G7bDc9k8hMxiWd RXXnY3RaSvBEqvTnSVJY3OFrbPFGjHAKB3OebH0/odUuLUHd3JUXjFSHJUqQVaY9 in1vqhMrL0H82L3Gxisf8GlkflLyhnYF1ZCLnKgDhvY151uyBMNXfX4yjrx6PWqm Rg3zhaL8iYkqD/6aFzDYe+vWIXYOob/doOOTH86ujc5JtCBMWKuruL/I4+rsMjBT c2us/4+bWghkhAoq2wrN1pr0GgX5rYBwWJUj2AnjIEPGHyY3Qzo= =fMbS -----END PGP SIGNATURE----- --KsyFOwaaLw8dycDE--