Skip to content

Commit cbb8774

Browse files
docs: clarify sharenfs property behavior, options, and examples
1 parent 022595c commit cbb8774

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

man/man7/zfsprops.7

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1813,6 +1813,44 @@ property is updated with
18131813
, the property is set to desired value, but the operation to share, reshare
18141814
or unshare the the dataset is not performed.
18151815
.It Sy sharenfs Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Ar opts
1816+
Controls whether the dataset is shared over NFS (Network File System).
1817+
1818+
The value can be one of the following:
1819+
.Bl -tag -width Ds
1820+
.It Sy off
1821+
Disables NFS sharing for this dataset.
1822+
.It Sy on
1823+
Enables NFS sharing using default NFS options. The system NFS service must be enabled.
1824+
.It Ar opts
1825+
A comma-separated list of NFS share options, which are passed to the share(1M) command.
1826+
Common options include:
1827+
.Bl -bullet
1828+
.It
1829+
Sy rw Ns = Ns Ar host[:host] — allow read/write access from specific hosts or networks
1830+
.It
1831+
Sy ro Ns = Ns Ar host[:host] — read-only access
1832+
.It
1833+
Sy root Ns = Ns Ar host[:host] — hosts allowed root access
1834+
.It
1835+
Sy anon Ns = Ns Ar uid — user ID to use for anonymous requests
1836+
.El
1837+
.El
1838+
1839+
Examples:
1840+
.Bd -literal -offset indent
1841+
# Enable default NFS sharing
1842+
zfs set sharenfs=on tank/home
1843+
1844+
# Share with read/write access to a subnet
1845+
zfs set sharenfs="[email protected]/24,no_root_squash" tank/projects
1846+
1847+
# Disable sharing
1848+
zfs set sharenfs=off tank/data
1849+
.Ed
1850+
1851+
Note:
1852+
The ZFS sharenfs property provides a convenient way to configure per-dataset NFS shares
1853+
without directly editing /etc/exports. The NFS server must be running for shares to take effect.
18161854
Controls whether the file system is shared via NFS, and what options are to be
18171855
used.
18181856
A file system with a

0 commit comments

Comments
 (0)