Bug 193971 - /var lives outside the ZFS BE
Summary: /var lives outside the ZFS BE
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: Allan Jude
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-27 12:18 UTC by Shawn Webb
Modified: 2014-10-02 17:22 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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