Bug 193971

Summary: /var lives outside the ZFS BE
Product: Base System Reporter: Shawn Webb <shawn.webb>
Component: binAssignee: Allan Jude <allanjude>
Status: Closed FIXED    
Severity: Affects Many People CC: allanjude
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

Description Shawn Webb 2014-09-27 12:18:33 UTC
The zroot/var dataset lives outside of the ZFS Boot Environment created by bsdinstall, making the package database shared across BEs that might have different packages installed. To fix, set the canmount ZFS property to no. Talked in person with Allan Jude regarding this bug.
Comment 1 commit-hook freebsd_committer freebsd_triage 2014-09-28 21:45:19 UTC
A commit references this bug:

Author: allanjude
Date: Sun Sep 28 21:44:24 UTC 2014
New revision: 272274
URL: https://svnweb.freebsd.org/changeset/base/272274

Log:
  Change the /var dataset in the default ZFS layout to have the
  ZFS property canmount=off so that /var/db/pkg and other such directories
  are part of the / dataset, and only /var/mail, /var/log, and /var/crash
  are excluded from the ZFS boot environment (beadm).

  PR:		193971
  Approved by:	jmg
  MFC after:	ASAP
  Relnotes:	yes
  Sponsored by:	ScaleEngine Inc.

Changes:
  head/usr.sbin/bsdinstall/scripts/zfsboot
Comment 2 Allan Jude freebsd_committer freebsd_triage 2014-09-28 21:47:40 UTC
Thanks for noticing this.

We'll try to get it into 10.1, it is rather late, but it is a tiny diff.
Comment 3 commit-hook freebsd_committer freebsd_triage 2014-10-02 17:20:15 UTC
A commit references this bug:

Author: allanjude
Date: Thu Oct  2 17:19:33 UTC 2014
New revision: 272424
URL: https://svnweb.freebsd.org/changeset/base/272424

Log:
  MFC r272274:
  Change the /var dataset in the default ZFS layout to have the
  ZFS property canmount=off, making /var/db/pkg part of the / dataset, so
  installed package files are consistent with the package database when
  using ZFS boot environments (beadm).

  PR:		193971
  Reviewed by:	Shawn Webb, bcr
  Approved by:	re (gjb), jmg
  Relnotes:	yes
  Sponsored by:	ScaleEngine Inc.

Changes:
_U  stable/10/
  stable/10/usr.sbin/bsdinstall/scripts/zfsboot
Comment 4 Allan Jude freebsd_committer freebsd_triage 2014-10-02 17:22:08 UTC
should be fixed in 10.1-RC1