Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Oct 2023 02:30:37 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 274421] bectl mount does not recognize intermediate canmount=off partitions for deep boot environments
Message-ID:  <bug-274421-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274421

            Bug ID: 274421
           Summary: bectl mount does not recognize intermediate
                    canmount=3Doff partitions for deep boot environments
           Product: Base System
           Version: 14.0-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: tamaru@psc.t.u-tokyo.ac.jp

I have tested this on FreeBSD 14.0-BETA5.

Following is a sample zfs layout to describe the issue.

NAME                      canmount mountpoint
root/ROOT/default         noauto   /
root/ROOT/default/usr     off      /usr
root/ROOT/default/usr/src noauto   /usr/src
root/ROOT/default/usr/obj noauto   /usr/obj
root/home                 on       /home
root/var                  off      /var
root/var/log              on       /var/log

It is close to the "deep boot environment" as described in btctl(8),
but differs in that canmount=3Doff for /root/ROOT/default/usr .

/etc/rc.d/zfsbe correctly mounts this BE as:

Filesystem                 Mounted on
root/ROOT/default          /
root/ROOT/default/usr/src  /usr/src
root/ROOT/default/usr/obj  /usr/obj
root/home                  /home
root/var/log               /var/log

and the contents of /usr such as /usr/bin is included in root/ROOT/default .

However, running
btctl -r root/ROOT mount default
when the system is booted from another BE or pool, it only mounts
as deep as just before the first non- canmount=3Doff partition,
in this case root/ROOT/default only:

Filesystem                Mounted on
root/ROOT/default         /tmp/be_mount.WsGI

and differs from the preferred behavior that zfsbe gives.


When we are at this, bectl create misbehaves in this regard as well. Running
bectl create -r backup
correctly replicates the whole hierarchy, but does not honor canmount
properties.

NAME                      canmount mountpoint
root/ROOT/default         noauto   /
root/ROOT/default/usr     off      /usr
root/ROOT/default/usr/src noauto   /usr/src
root/ROOT/default/usr/obj noauto   /usr/obj
root/ROOT/backup          noauto   /
root/ROOT/backup/usr      noauto   /usr     <=3D=3D=3D=3D
root/ROOT/backup/usr/src  noauto   /usr/src
root/ROOT/backup/usr/obj  noauto   /usr/obj
root/home                 on       /home
root/var                  off      /var
root/var/log              on       /var/log

and thus, by switching to this backup BE by
bectl activate backup
the next boot looses /usr/bin (and others) when zfsbe (correctly) mounts /u=
sr .

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-274421-227>