Skip to content

nfs-kernel-server: update to 2.9.1 and fix up v3 init and package#29122

Open
graysky2 wants to merge 2 commits intoopenwrt:masterfrom
graysky2:nfs
Open

nfs-kernel-server: update to 2.9.1 and fix up v3 init and package#29122
graysky2 wants to merge 2 commits intoopenwrt:masterfrom
graysky2:nfs

Conversation

@graysky2
Copy link
Copy Markdown
Contributor

@graysky2 graysky2 commented Apr 11, 2026

📦 Package Details

Maintainer: me
(You can find this by checking the history of the package Makefile.)

Description:

Update to 2.9.1 which includes a new dependency on libnl, see changelog.

Changelog: https://www.kernel.org/pub/linux/utils/nfs-utils/2.9.1/2.9.1-Changelog

This upstream release has some peculiar commits, including disabling NFS v4.0 by default and cache up calls migrated from /proc to netlink. In my testing, two parameters are needed to the nfsv4.init file in order to maintain functionality. Without these changes, there's a 90-second period where the shares are simply unavailable.

Beyond the update, this PR also modifies the v3 init script to mirrors upstream systemd's service, which includes
shipping nfsdctl and using it to manage the server. Also include /etc/nfs.conf to limit to pure version 3 for this package since the kmod supports all versions this confuses the server executable when started.

Without the limits in /etc/nfs.conf:

% cat /proc/fs/nfsd/versions
+3 +4 +4.1 +4.2

With them we get a pure v3:

% cat /proc/fs/nfsd/versions
+3 -4 -4.0 -4.1 -4.2

Finally supply a unified /etc/exports since this file will remain if users change from v3 to v4 or vice-verse, both syntax examples should be included.

Note that this cannot be merged until the changes to libnl have been merged first. See: openwrt/openwrt#22889


🧪 Run Testing Details

  • OpenWrt Version: SNAPSHOT
  • OpenWrt Target/Subtarget: x86/64-glibc
  • OpenWrt Device: Intel N150

✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

If your PR contains a patch:

  • It can be applied using git am
  • It has been refreshed to avoid offsets, fuzzes, etc., using
    make package/<your-package>/refresh V=s
  • It is structured in a way that it is potentially upstreamable
    (e.g., subject line, commit description, etc.)
    We must try to upstream patches to reduce maintenance burden.

@graysky2 graysky2 changed the title nfs-kernel-server: update to 2.9.1 nfs-kernel-server: update to 2.9.1 and fix up v3 init and package Apr 11, 2026
Update to 2.9.1 which includes a new dependency on libnl, see changelog.

Changelog: https://www.kernel.org/pub/linux/utils/nfs-utils/2.9.1/2.9.1-Changelog

This upstream release has some peculiar commits, including disabling NFS
v4.0 by default and cache up calls migrated from /proc to netlink. In my
testing, two parameters are needed to the nfsv4.init file in order to maintain
functionality. Without these changes, there's a 90-second period where the
shares are simply unavailable.

Note that this cannot be merged until the changes to libnl have been
merged first. See: openwrt/openwrt#22889

Signed-off-by: John Audia <therealgraysky@proton.me>
@graysky2 graysky2 force-pushed the nfs branch 2 times, most recently from ca5b2db to ea4bde8 Compare April 26, 2026 15:48
v3 init:
- Mirror upstream systemd service; use nfsdctl to manage the server
- Add /etc/nfs.conf to restrict to NFSv3 only:
  % cat /proc/fs/nfsd/versions
  +3 -4 -4.0 -4.1 -4.2

v4 init:
- Remove dead procd_append_param -F from nfsdcld instance
- Add respawn to nfsv4.exportd and rpc.idmapd; exclude nfsdcld as it
  daemonizes and would spawn duplicates under procd respawn
- Remove unused NFSDCLD_PID variable; nfsdcld writes no pidfile
- Add status_service() using pgrep; procd permanently misreports
  nfsdcld as stopped due to its daemonization behavior

exports:
- Supply unified /etc/exports covering both v3 and v4 syntax so the
  file survives switching between package variants

Signed-off-by: John Audia <therealgraysky@proton.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant