From nobody Tue Aug 23 13:19:34 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 4MBqZk3VLRz4ZfRx for ; Tue, 23 Aug 2022 13:19:42 +0000 (UTC) (envelope-from SRS0=3JBn=Y3=klop.ws=ronald-lists@realworks.nl) Received: from smtp-relay-int.realworks.nl (smtp-relay-int.realworks.nl [194.109.157.24]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4MBqZj2gSnz46Hy; Tue, 23 Aug 2022 13:19:41 +0000 (UTC) (envelope-from SRS0=3JBn=Y3=klop.ws=ronald-lists@realworks.nl) Date: Tue, 23 Aug 2022 15:19:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=klop.ws; s=rw2; t=1661260774; 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=yoMFyMx26peBaYQDcyugeY2/Zpkqnqb/wac5gVoqnYA=; b=CRnE3MDwjOIW0DR3Vx8cKGnSbVEpLQlj+oihxiB1NdD7GBajkDniyCdJfXrfpQstaw/ctU qqQp1jMt3bWjQI92iawOQq1zj6qBXIYjWzCotYUgdsv0UbI2m4Ehpb1Qc9AOncQ2n6Tavd TEyAnKaL/16M6DMWzxcTt06ihGCCjPVu7F8i/eYlTAg20Habwnd8Qxfuo4EH62dOV+gAVr czvqJN+GrxXIfY/w7MIvzYN74Qz3L+ORnGnYxHgxBCGM9/CGDAjM1ZfRh8ysYpwiTjWB9w iSy+lYQP7kir3TQHWrKT3HeNq2wboXCiXteaaIJ1gOxG4KQ9gl4WM/XZDQUKKA== From: Ronald Klop To: Kyle Evans Cc: freebsd-current@freebsd.org, Ryan Moeller , "Patrick M. Hausen" , Peter Jeremy Message-ID: <2078216761.314.1661260774009@localhost> In-Reply-To: References: <01000182ac3b8593-fb381303-5719-4863-8fda-2530efcab31b-000000@email.amazonses.com> <2818f3da-3ae2-e6e3-9282-8b62263fb5f3@FreeBSD.org> <623263165.219.1661170200563@localhost> Subject: Re: Beadm can't create snapshot 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/alternative; boundary="----=_Part_313_1242291649.1661260773941" X-Mailer: Realworks (620.114) Importance: Normal X-Priority: 3 (Normal) X-Rspamd-Queue-Id: 4MBqZj2gSnz46Hy X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=klop.ws header.s=rw2 header.b=CRnE3MDw; dmarc=pass (policy=quarantine) header.from=klop.ws; spf=pass (mx1.freebsd.org: domain of "SRS0=3JBn=Y3=klop.ws=ronald-lists@realworks.nl" designates 194.109.157.24 as permitted sender) smtp.mailfrom="SRS0=3JBn=Y3=klop.ws=ronald-lists@realworks.nl" X-Spamd-Result: default: False [-3.19 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; NEURAL_HAM_LONG(-1.00)[-0.998]; NEURAL_HAM_SHORT(-0.99)[-0.994]; MID_RHS_NOT_FQDN(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[klop.ws,quarantine]; FORGED_SENDER(0.30)[ronald-lists@klop.ws,SRS0=3JBn=Y3=klop.ws=ronald-lists@realworks.nl]; R_SPF_ALLOW(-0.20)[+ip4:194.109.157.0/24]; R_DKIM_ALLOW(-0.20)[klop.ws:s=rw2]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_ZERO(0.00)[0]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[klop.ws:+]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL]; FROM_HAS_DN(0.00)[]; HAS_X_PRIO_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; FROM_NEQ_ENVFROM(0.00)[ronald-lists@klop.ws,SRS0=3JBn=Y3=klop.ws=ronald-lists@realworks.nl] X-ThisMailContainsUnwantedMimeParts: N ------=_Part_313_1242291649.1661260773941 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Van: Kyle Evans Datum: maandag, 22 augustus 2022 17:11 Aan: Ronald Klop CC: Peter Jeremy , freebsd-current@freebsd.org, Ryan Moeller , "Patrick M. Hausen" Onderwerp: Re: Beadm can't create snapshot > > On Mon, Aug 22, 2022 at 5:10 AM Ronald Klop wrote: > > > > > > > > Van: Peter Jeremy > > Datum: maandag, 22 augustus 2022 10:45 > > Aan: "Patrick M. Hausen" > > CC: Ryan Moeller , freebsd-current@freebsd.org > > Onderwerp: Re: Beadm can't create snapshot > > > > On 2022-Aug-17 18:07:20 +0200, "Patrick M. Hausen" wrote: > > >Isn't beadm retired in favour of bectl? > > > > bectl still has a number of bugs: > > 1) The output from "bectl list" is in filesystem/bename order rather > > than creation date order. This is an issue if you use (eg) git > > commit hashes as the name. > > 2) "bectl activate" doesn't update /boot/loader.conf so the wrong > > root filesystem is mounted. > > > > That said "bectl create" appears to be a workable replacement for > > "beadm create" and avoids the current "'snapshots_changed' is > > readonly" bugs. > > > > -- > > Peter Jeremy > > ________________________________ > > > > > > > > > > Hi, > > > > From man bectl: > > activate [-t | -T] beName > > Activate the given beName as the default boot filesystem. If > > the -t flag is given, this takes effect only for the next boot. > > Flag -T removes temporary boot once configuration. Without > > temporary configuration, the next boot will use zfs dataset > > specified in boot pool bootfs property. > > > > So it uses the bootfs property instead of loader.conf. If beadm used a different mechaniscm it would by nice to mention that in the HISTORY section of the bectl man page. > > > > 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... > > > Hi, Today I looked up something for boot environments myself and read this: https://wiki.freebsd.org/BootEnvironments#Setting_Boot_Dataset "In order for boot environments to be effective, you must let the bootfs zpool property control which dataset gets mounted as the root. Particularly, /etc/fstab must be purged of any / mount, and /boot/loader.conf must not be setting vfs.root.mountfrom directly. " So it is documented somewhere at least. Regards, Ronald. ------=_Part_313_1242291649.1661260773941 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit  

Van: Kyle Evans <kevans@freebsd.org>
Datum: maandag, 22 augustus 2022 17:11
Aan: Ronald Klop <ronald-lists@klop.ws>
CC: Peter Jeremy <peterj@freebsd.org>, freebsd-current@freebsd.org, Ryan Moeller <freqlabs@freebsd.org>, "Patrick M. Hausen" <pmh@hausen.com>
Onderwerp: Re: Beadm can't create snapshot

On Mon, Aug 22, 2022 at 5:10 AM Ronald Klop <ronald-lists@klop.ws> wrote:
>
>
>
> Van: Peter Jeremy <peterj@freebsd.org>
> Datum: maandag, 22 augustus 2022 10:45
> Aan: "Patrick M. Hausen" <pmh@hausen.com>
> CC: Ryan Moeller <freqlabs@freebsd.org>, freebsd-current@freebsd.org
> Onderwerp: Re: Beadm can't create snapshot
>
> On 2022-Aug-17 18:07:20 +0200, "Patrick M. Hausen" <pmh@hausen.com> wrote:
> >Isn't beadm retired in favour of bectl?
>
> bectl still has a number of bugs:
> 1) The output from "bectl list" is in filesystem/bename order rather
>    than creation date order.  This is an issue if you use (eg) git
>    commit hashes as the name.
> 2) "bectl activate" doesn't update /boot/loader.conf so the wrong
>    root filesystem is mounted.
>
> That said "bectl create" appears to be a workable replacement for
> "beadm create" and avoids the current "'snapshots_changed' is
> readonly" bugs.
>
> --
> Peter Jeremy
> ________________________________
>
>
>
>
> Hi,
>
> From man bectl:
>      activate [-t | -T] beName
>                Activate the given beName as the default boot filesystem.  If
>                the -t flag is given, this takes effect only for the next boot.
>                Flag -T removes temporary boot once configuration.  Without
>                temporary configuration, the next boot will use zfs dataset
>                specified in boot pool bootfs property.
>
> So it uses the bootfs property instead of loader.conf. If beadm used a different mechaniscm it would by nice to mention that in the HISTORY section of the bectl man page.
>

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...



Hi,

Today I looked up something for boot environments myself and read this: https://wiki.freebsd.org/BootEnvironments#Setting_Boot_Dataset

"In order for boot environments to be effective, you must let the bootfs zpool property control which dataset gets mounted as the root. Particularly, /etc/fstab must be purged of any / mount, and /boot/loader.conf must not be setting vfs.root.mountfrom directly. "

So it is documented somewhere at least.

Regards,

Ronald.

  ------=_Part_313_1242291649.1661260773941--