Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jul 2017 10:11:35 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 221067] vfs.root.mountfrom.options="ro" did not take effect for a zfs root filesystem
Message-ID:  <bug-221067-8@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 221067
           Summary: vfs.root.mountfrom.options=3D"ro" did not take effect
                    for a zfs root filesystem
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: wheelcomplex@gmail.com

Created attachment 184793
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D184793&action=
=3Dedit
prototype fix for reference

when using a readonly filesystem as root filesystem,
vfs.root.mountfrom.options=3D"ro" should be the only way to tell kernel mou=
nt the
filesystem in readonly. This works for UFS but ZFS.=20

Currently, during kernel mountroot, zfs_domount always try to open underlay=
er
device for write when try to import the pool and failed.

When kernel try to import pool by calling spa_import_rootpool(pname) in
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c, there is not
parameter to tell spa_load to open underlayer device on readonly. This is t=
he
source of this issue.

The attachment is a prototype fix for reference. It query
vfs.root.mountfrom.options when open underlayer device to set readonly flag.

A new parameter for spa_import_rootpool meight be a better solution.

--=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-221067-8>