diff options
| author | Rick Macklem <rmacklem@FreeBSD.org> | 2026-04-05 16:00:24 +0000 |
|---|---|---|
| committer | Rick Macklem <rmacklem@FreeBSD.org> | 2026-04-12 00:38:44 +0000 |
| commit | 2a97b49bc47228618242843d0d84f51ec67f3f36 (patch) | |
| tree | e0672749f7d164b3dc3787f8147ea167889d28a7 /include | |
| parent | 4beef6a4c5676249c6e87de5354938d5b15dbd88 (diff) | |
nfs_diskless: Add support for an NFSv4 root fs
Without this patch, diskless root NFS file systems
could only be mounted via NFSv3 (or NFSv2).
This patch adds the basic support needed to mount
a root fs via NFSv4.
At this time, the NFSv4 mount will only work if
the following is done on the NFS server configuration:
- The root directory specified in the "V4:" line in
/etc/exports must be "/". This is needed since the
path to mount must be the same for NFSv3 and NFSv4.
- The NFS server must be configured to do both NFSv3
and NFSv4, since the bootstrap code still uses NFSv3.
- The NFSv4 server must be configured with:
vfs.nfs.enable_uidtostring=1
vfs.nfsd.enable_stringtouid=1
since the NFSv4 root fs cannot be running nfsuserd(8)
when it is booting. (This limitation may be removed
in a future commit by hard-wiring enough id<-->name
mapping entries to handle things until the nfsuserd(8)
is running.)
To enable the root fs to be mounted via NFSv4, it needs:
- in the root file system's /boot/loader.conf
boot.nfsroot.options="nfsv4"
(Additional options like rsize=65536,wsize=65536 can
also be specified.)
- in the root file system's /etc/sysctl.conf
vfs.nfs.enable_uidtostring=1
(cherry picked from commit 8b9775912cbc7bb3c05c1fdfc3597dc4b68a9b9e)
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
