Bug 279945 - zfs set sharenfs fails to produce valid nfsv4 entries in /etc/zfs/exports
Summary: zfs set sharenfs fails to produce valid nfsv4 entries in /etc/zfs/exports
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-fs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-24 09:41 UTC by p5B2EA84B3
Modified: 2024-07-26 16:00 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 p5B2EA84B3 2024-06-24 09:41:17 UTC
zfs set sharenfs='V4: /   -sec=sys grumpy.cis.uoguelph.ca' zpool/export_this

# cat zfs/exports
# !!! DO NOT EDIT THIS FILE MANUALLY !!!

/export_this       V4: / -sec=sys grumpy.cis.uoguelph.ca

Where the line must start with V4: to be a valid line.
Comment 1 Rick Macklem freebsd_committer freebsd_triage 2024-06-24 14:28:53 UTC
Yes, the "V4:" exports line needs to be
manually put in /etc/exports.

Note that it does not export any file system,
so you also need a line like:
/export_this      -sec=sys grumpy.cis.uoguelph.ca

either in /etc/exports or generated from the sharenfs
property by setting it without the "V4: /" component
in it.

Call it a bug or a feature, but since the "V4:..." line
does not refer to any file system, it does not work for
sharenfs. I doubt this will ever change.
(Also note that both /etc/exports and /etc/zfs/exports
are used by mountd when started via the rc.d scripts.
See /etc/rc.d/mountd.)