[Bug 233113] bectl activate fails to set canmount=noauto for old boot environment

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Nov 10 18:40:40 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233113

            Bug ID: 233113
           Summary: bectl activate fails to set canmount=noauto for old
                    boot environment
           Product: Base System
           Version: 12.0-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: bugs at FreeBSD.org
          Reporter: asomers at FreeBSD.org

"bectl activate" is supposed to set canmount=auto for the old boot environment
and set the pool's bootfs property to the new boot environment.  That's what
beadm does.  However, bectl fails to clear canmount for the old boot
environment.  Observed on 12.0-BETA3

Example:

somers at threonine /> bectl list
BE                              Active Mountpoint Space Created
12.0-BETA4                      NR     /          9.45G 2018-11-10 10:09
12.0-BETA3                      -      -          1.52M 2018-11-08 09:35
12.0-CURRENT-up-20180401_231457 -      -          38.0G 2018-04-01 23:13
12.0-CURRENT-up-20180327_233010 -      -          13.2G 2018-03-27 23:28
somers at threonine /> zfs list -o name,mountpoint,canmount -r tank/ROOT
NAME                                       MOUNTPOINT  CANMOUNT
tank/ROOT                                  none              on
tank/ROOT/12.0-BETA3                       /             noauto
tank/ROOT/12.0-BETA4                       /                 on
tank/ROOT/12.0-CURRENT-up-20180327_233010  /             noauto
tank/ROOT/12.0-CURRENT-up-20180401_231457  /             noauto
somers at threonine /> sudo bectl create test
somers at threonine /> sudo bectl activate test
successfully activated boot environment test
somers at threonine /> zpool get bootfs tank
NAME  PROPERTY  VALUE           SOURCE
tank  bootfs    tank/ROOT/test  local
somers at threonine /> zfs list -o name,mountpoint,canmount -r tank/ROOT
NAME                                       MOUNTPOINT  CANMOUNT
tank/ROOT                                  none              on
tank/ROOT/12.0-BETA3                       /             noauto
tank/ROOT/12.0-BETA4                       /                 on
tank/ROOT/12.0-CURRENT-up-20180327_233010  /             noauto
tank/ROOT/12.0-CURRENT-up-20180401_231457  /             noauto
tank/ROOT/test                             /             noauto

!!!! 12.0-BETA4 still has CANMOUNT set to on !!!!

But beadm has no problem here:

somers at threonine /> sudo beadm activate 12.0-BETA4
Activated successfully
somers at threonine /> sudo beadm destroy test
Are you sure you want to destroy 'test'?
This action cannot be undone (y/[n]): y
Destroyed successfully
somers at threonine /> zfs list -o name,mountpoint,canmount -r tank/ROOT
NAME                                       MOUNTPOINT  CANMOUNT
tank/ROOT                                  none              on
tank/ROOT/12.0-BETA3                       /             noauto
tank/ROOT/12.0-BETA4                       /                 on
tank/ROOT/12.0-CURRENT-up-20180327_233010  /             noauto
tank/ROOT/12.0-CURRENT-up-20180401_231457  /             noauto
somers at threonine /> sudo beadm create test
Created successfully
somers at threonine /> sudo beadm activate test
Activated successfully
somers at threonine /> zpool get bootfs tank
NAME  PROPERTY  VALUE           SOURCE
tank  bootfs    tank/ROOT/test  local
somers at threonine /> zfs list -o name,mountpoint,canmount -r tank/ROOT
NAME                                       MOUNTPOINT  CANMOUNT
tank/ROOT                                  none              on
tank/ROOT/12.0-BETA3                       /             noauto
tank/ROOT/12.0-BETA4                       /             noauto
tank/ROOT/12.0-CURRENT-up-20180327_233010  /             noauto
tank/ROOT/12.0-CURRENT-up-20180401_231457  /             noauto
tank/ROOT/test                             /             noauto


This bug renders the new boot environment unbootable, because two root
filesystems get mounted, making devfs invisible.  So it's a pretty critical
bug.

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


More information about the freebsd-bugs mailing list