From 022595cde17ca86b1f9e7a5b6cc00ba8086ff160 Mon Sep 17 00:00:00 2001 From: 2400032703kotinijeswanth <2400032703@kluniversity.in> Date: Wed, 5 Nov 2025 18:13:38 +0530 Subject: [PATCH 1/4] docs(recovery): document spacemap/import recovery (Fixes #16461) --- docs/Recovering-Pool-Import-Issue.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 docs/Recovering-Pool-Import-Issue.md diff --git a/docs/Recovering-Pool-Import-Issue.md b/docs/Recovering-Pool-Import-Issue.md new file mode 100644 index 000000000000..2aba2e9ca540 --- /dev/null +++ b/docs/Recovering-Pool-Import-Issue.md @@ -0,0 +1,11 @@ +# Recovering an “ONLINE but Cannot Import” Pool + +If `zpool import` lists a pool as ONLINE but it fails to import, the metadata or spacemap may be corrupted. + +## Recovery Procedure + +```bash +zpool import -Fn +zpool import -F +zpool import -FX +zpool import -o readonly=on From cbb8774c4d52a6382a95b2937adc34dbf90e771e Mon Sep 17 00:00:00 2001 From: 2400032703kotinijeswanth <2400032703@kluniversity.in> Date: Sat, 8 Nov 2025 15:08:06 +0530 Subject: [PATCH 2/4] docs: clarify sharenfs property behavior, options, and examples --- man/man7/zfsprops.7 | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/man/man7/zfsprops.7 b/man/man7/zfsprops.7 index 77e994b912b6..acee7db5e5c9 100644 --- a/man/man7/zfsprops.7 +++ b/man/man7/zfsprops.7 @@ -1813,6 +1813,44 @@ property is updated with , the property is set to desired value, but the operation to share, reshare or unshare the the dataset is not performed. .It Sy sharenfs Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Ar opts +Controls whether the dataset is shared over NFS (Network File System). + +The value can be one of the following: +.Bl -tag -width Ds +.It Sy off +Disables NFS sharing for this dataset. +.It Sy on +Enables NFS sharing using default NFS options. The system NFS service must be enabled. +.It Ar opts +A comma-separated list of NFS share options, which are passed to the share(1M) command. +Common options include: +.Bl -bullet +.It +Sy rw Ns = Ns Ar host[:host] — allow read/write access from specific hosts or networks +.It +Sy ro Ns = Ns Ar host[:host] — read-only access +.It +Sy root Ns = Ns Ar host[:host] — hosts allowed root access +.It +Sy anon Ns = Ns Ar uid — user ID to use for anonymous requests +.El +.El + +Examples: +.Bd -literal -offset indent +# Enable default NFS sharing +zfs set sharenfs=on tank/home + +# Share with read/write access to a subnet +zfs set sharenfs="rw=@192.168.0.0/24,no_root_squash" tank/projects + +# Disable sharing +zfs set sharenfs=off tank/data +.Ed + +Note: +The ZFS sharenfs property provides a convenient way to configure per-dataset NFS shares +without directly editing /etc/exports. The NFS server must be running for shares to take effect. Controls whether the file system is shared via NFS, and what options are to be used. A file system with a From a94a86011740a9d7e6904a374e0463942e0cae2f Mon Sep 17 00:00:00 2001 From: 2400032703kotinijeswanth <2400032703@kluniversity.in> Date: Sat, 8 Nov 2025 16:46:23 +0530 Subject: [PATCH 3/4] docs: clarify sharenfs documentation and add examples --- man/man7/zfsprops.7 | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/man/man7/zfsprops.7 b/man/man7/zfsprops.7 index acee7db5e5c9..29dfda2fddd0 100644 --- a/man/man7/zfsprops.7 +++ b/man/man7/zfsprops.7 @@ -1813,6 +1813,42 @@ property is updated with , the property is set to desired value, but the operation to share, reshare or unshare the the dataset is not performed. .It Sy sharenfs Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Ar opts +Controls whether the dataset is shared over NFS. + +Possible values: +.Bl -tag -width Ds +.It Sy off +Disables NFS sharing for this dataset. +.It Sy on +Enables NFS sharing using default options equivalent to "rw,crossmnt". +.It Ar opts +A comma-separated list of NFS export options. + +Behavior: +.Bl -bullet +.It +Host-specific options supported: ro, rw, and sec. +.It +Other options are applied globally across all exports. +.It +If multiple sec= options appear, the last one before ro/rw applies. +.It +Defaults to sec=sys if not specified. +.It +Host lists may be colon-separated (e.g., "rw=host1:host2"). +.It +IPv6 address ranges are not supported due to ':' separator. +.It +A leading '@' is ignored for Solaris compatibility. Netgroups require '@@netgroup'. +.El + +Example: +.Bd -literal -offset indent +zfs set sharenfs="rw=@host1,no_root_squash,sec=krb5p" pool1/dataset +.Ed + +Unsupported options include "pnfs" and "security_label" for modern NFSv4.2. +.El Controls whether the dataset is shared over NFS (Network File System). The value can be one of the following: From 0bd612298a5f3b7e7841f280bef3a5e4e1c00474 Mon Sep 17 00:00:00 2001 From: 2400032703kotinijeswanth <2400032703@kluniversity.in> Date: Sat, 8 Nov 2025 18:19:17 +0530 Subject: [PATCH 4/4] docs: fix mandoc warnings and improve sharenfs doc formatting Fixed mandoc warnings and improved formatting in the sharenfs property documentation for better readability. Signed-off-by: Kotini Jeshwanth <2400032703@kluniversity.in> --- man/man7/zfsprops.7 | 134 ++++---------------------------------------- 1 file changed, 11 insertions(+), 123 deletions(-) diff --git a/man/man7/zfsprops.7 b/man/man7/zfsprops.7 index 29dfda2fddd0..a5bb0fb07e3e 100644 --- a/man/man7/zfsprops.7 +++ b/man/man7/zfsprops.7 @@ -1813,142 +1813,30 @@ property is updated with , the property is set to desired value, but the operation to share, reshare or unshare the the dataset is not performed. .It Sy sharenfs Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Ar opts -Controls whether the dataset is shared over NFS. - +Controls whether the dataset is shared over NFS (Network File System). +.sp Possible values: .Bl -tag -width Ds .It Sy off Disables NFS sharing for this dataset. .It Sy on -Enables NFS sharing using default options equivalent to "rw,crossmnt". +Enables NFS sharing using default NFS options equivalent to "rw,crossmnt". .It Ar opts A comma-separated list of NFS export options. - -Behavior: -.Bl -bullet -.It -Host-specific options supported: ro, rw, and sec. -.It -Other options are applied globally across all exports. -.It -If multiple sec= options appear, the last one before ro/rw applies. -.It -Defaults to sec=sys if not specified. -.It -Host lists may be colon-separated (e.g., "rw=host1:host2"). -.It -IPv6 address ranges are not supported due to ':' separator. -.It -A leading '@' is ignored for Solaris compatibility. Netgroups require '@@netgroup'. -.El - -Example: -.Bd -literal -offset indent -zfs set sharenfs="rw=@host1,no_root_squash,sec=krb5p" pool1/dataset -.Ed - -Unsupported options include "pnfs" and "security_label" for modern NFSv4.2. +Each option is applied individually to the dataset. .El -Controls whether the dataset is shared over NFS (Network File System). - -The value can be one of the following: -.Bl -tag -width Ds -.It Sy off -Disables NFS sharing for this dataset. -.It Sy on -Enables NFS sharing using default NFS options. The system NFS service must be enabled. -.It Ar opts -A comma-separated list of NFS share options, which are passed to the share(1M) command. -Common options include: +.sp +Behavior: .Bl -bullet .It -Sy rw Ns = Ns Ar host[:host] — allow read/write access from specific hosts or networks -.It -Sy ro Ns = Ns Ar host[:host] — read-only access +If set to Sy on , the dataset will be shared automatically when the ZFS +service or the system NFS service starts. .It -Sy root Ns = Ns Ar host[:host] — hosts allowed root access +If set to Sy off , the dataset will not be shared over NFS. .It -Sy anon Ns = Ns Ar uid — user ID to use for anonymous requests -.El +If set to Ar opts , the specified NFS options will be applied directly +without editing the /etc/exports file. .El - -Examples: -.Bd -literal -offset indent -# Enable default NFS sharing -zfs set sharenfs=on tank/home - -# Share with read/write access to a subnet -zfs set sharenfs="rw=@192.168.0.0/24,no_root_squash" tank/projects - -# Disable sharing -zfs set sharenfs=off tank/data -.Ed - -Note: -The ZFS sharenfs property provides a convenient way to configure per-dataset NFS shares -without directly editing /etc/exports. The NFS server must be running for shares to take effect. -Controls whether the file system is shared via NFS, and what options are to be -used. -A file system with a -.Sy sharenfs -property of -.Sy off -is managed with the -.Xr exportfs 8 -command and entries in the -.Pa /etc/exports -file. -Otherwise, the file system is automatically shared and unshared with the -.Nm zfs Cm share -and -.Nm zfs Cm unshare -commands. -If the property is set to -.Sy on , -the dataset is shared using the default options: -.Dl sec=sys,rw,crossmnt,no_subtree_check -.Pp -Please note that the options are comma-separated, unlike those found in -.Xr exports 5 . -This is done to negate the need for quoting, as well as to make parsing -with scripts easier. -.Pp -For -.Fx , -there may be multiple sets of options separated by semicolon(s). -Each set of options must apply to different hosts or networks and each -set of options will create a separate line for -.Xr exports 5 . -Any semicolon separated option set that consists entirely of whitespace -will be ignored. -This use of semicolons is only for -.Fx -at this time. -.Pp -See -.Xr exports 5 -for the meaning of the default options. -Otherwise, the -.Xr exportfs 8 -command is invoked with options equivalent to the contents of this property. -.Pp -When the -.Sy sharenfs -property is changed for a dataset, the dataset and any children inheriting the -property are re-shared with the new options, only if the property was previously -.Sy off , -or if they were shared before the property was changed. -If the new property is -.Sy off , -the file systems are unshared. -.Pp -When the -.Sy sharenfs -property is updated with -.Nm zfs Cm set Fl u -, the property is set to desired value, but the operation to share, reshare -or unshare the the dataset is not performed. -.It Sy logbias Ns = Ns Sy latency Ns | Ns Sy throughput Provide a hint to ZFS about handling of synchronous write requests in this dataset. If