Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Feb 2021 22:32:37 +0100
From:      Michael Schuster <michaelsprivate@gmail.com>
To:        Mike Clarke <jmc-freebsd2@milibyte.co.uk>
Cc:        freeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: Bootenv containing several filesystems
Message-ID:  <CADqw_g%2BThFJd8c0s-0=mKL-4VAbE6t%2BenW31RpuWbLAk1_NrPg@mail.gmail.com>
In-Reply-To: <2068084.5gTYqTD1LS@curlew>
References:  <CADqw_gKG6ovTuN7bZvYy7PCydfCXH4M2fw68YLmLvZhxi-g2xw@mail.gmail.com> <2476830.FrFBg55ix7@curlew> <CADqw_gLg8uG8jXTTFe=ZODwyxDSov6os44_P7No%2BQOtuwbapQg@mail.gmail.com> <2068084.5gTYqTD1LS@curlew>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Feb 10, 2021 at 5:37 PM Mike Clarke <jmc-freebsd2@milibyte.co.uk>
wrote:

> On Tuesday, 9 February 2021 19:10:34 GMT Michael Schuster wrote:
> > On Tue, Feb 9, 2021 at 5:30 PM Mike Clarke <jmc-freebsd2@milibyte.co.uk>
>
> > wrote:
> > > On Tuesday, 9 February 2021 09:53:27 GMT Matthew Seaman wrote:
> > > > There's an important difference between beadm and bectl which seems
> > > > relevant here.  beadm defaults to accepting a tree of ZFSes as a boot
> > > > environment, whereas bectl only applies to the ZFS at the top level
> of
> > > > the boot environment unless you use the -r flag.
> > >
> > > That probably accounts for a discrepancy that I always see between
> beadm
> > > list
> > > and bectl list for my BE which has child datasets:
> > >
> > > curlew:/tmp% beadm list
> > > BE        Active Mountpoint  Space Created
> > > fbsd12.1y -      -            1.9G 2020-12-20 20:52
> > > fbsd12.2a -      -          133.0M 2020-12-24 11:20
> > > fbsd12.2b -      -           18.5M 2021-01-02 09:50
> > > fbsd12.2c -      -           11.7M 2021-01-12 09:55
> > > fbsd12.2d NR     /           39.4G 2021-02-05 10:46
> > > curlew:/tmp% bectl list
> > > BE        Active Mountpoint Space Created
> > > fbsd12.1y -      -          61.3M 2020-12-20 20:52
> > > fbsd12.2a -      -          6.97M 2020-12-24 11:20
> > > fbsd12.2b -      -          2.80M 2021-01-02 09:50
> > > fbsd12.2c -      -          5.91M 2021-01-12 09:55
> > > fbsd12.2d NR     /          39.5G 2021-02-05 10:46
> >
> > strangely, I don't see such a difference:
> >
> > bectl:
> > BE_20210205_121021_CURRENT14   -      -          81.6M 2021-02-05 12:10
> > BE_20210205_181224_CURRENT14   -      -          49.9M 2021-02-05 18:12
> > BE_20210206_102540_CURRENT14   -      -          153M  2021-02-06 10:25
> > BE_20210206_175312_CURRENT14   NR     /          30.9G 2021-02-06 17:53
> > BE_20210208_204901_CURRENT_14  -      -          31.9M 2021-02-08 20:49
> >
> > beadm:
> > BE_20210205_121021_CURRENT14   -      -           81.6M 2021-02-05 12:10
> > BE_20210205_181224_CURRENT14   -      -           49.9M 2021-02-05 18:12
> > BE_20210206_102540_CURRENT14   -      -          152.3M 2021-02-06 10:25
> > BE_20210206_175312_CURRENT14   NR     /           30.9G 2021-02-06 17:53
> > BE_20210208_204901_CURRENT_14  -      -           31.9M 2021-02-08 20:49
> >
> > as you can see, the difference is negligable ...
> >
> > is there some zpool or zfs property I need to set so that be(ctl|adm)
> (with
> > appropriate options if need be) will create a recursive boot environment?
>
> [...]
here may be a good explanation of some of what I'm seeing. Wheres you have:

Here's the filesystems for a typical BE:
>
> NAME                            USED  AVAIL  REFER  MOUNTPOINT
> ssd/ROOT/fbsd12.2d             39.5G  75.6G  1.54G  /
> ssd/ROOT/fbsd12.2d/usr         31.2G  75.6G  10.1G  /usr
> ssd/ROOT/fbsd12.2d/usr/ports   8.45G  75.6G  6.84G  /usr/ports
> ssd/ROOT/fbsd12.2d/usr/src     3.52G  75.6G  1.46G  /usr/src
> ssd/ROOT/fbsd12.2d/var         6.50G  75.6G  1.63G  /var
> ssd/ROOT/fbsd12.2d/var/db      3.13G  75.6G  1.93G  /var/db
> ssd/ROOT/fbsd12.2d/var/db/pkg   776M  75.6G  83.6M  /var/db/pkg
> ssd/ROOT/fbsd12.2d/var/empty    104K  75.6G    96K  /var/empty
> ssd/ROOT/fbsd12.2d/var/tmp     1.03G  75.6G   128K  /var/tmp
>

I have:

$ zfs list  | egrep 'BE_20210206_175312_CURRENT14|src'
tank/ROOT/BE_20210206_175312_CURRENT14    30.9G   340G     24.3G  /
tank/usr/src                              2.32G   340G     2.26G  /usr/src
$

... which I guess also explains why for me bectl list and beadm list
produce similar output.

my working zfs knowledge is a bit rusty; is there a trivial way of getting
my /usr/{src|ports} under the current BE?
thx
Michael
-- 
Michael Schuster
http://recursiveramblings.wordpress.com/
recursion, n: see 'recursion'



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADqw_g%2BThFJd8c0s-0=mKL-4VAbE6t%2BenW31RpuWbLAk1_NrPg>