question about freebsd zfs nfsv4 server configuration?

hi all:
I have created FreeBSD 15 ZFS nfsv4_only server in today...below was my nfsv4 server configure :

/etc/rc.conf
Code:
#enable nfsv4 service 
nfs_server_enable="yes"
nfsv4_server_enable="yes"
nfsv4_server_only="yes"
mountd_enable="yes"

/etc/exports
Code:
V4:  /rootpoo/
Code:
zfs create rootpool/nfs
 zfs get sharenfs rootpool/nfs
NAME          PROPERTY  VALUE                                                 SOURCE
rootpool/nfs  sharenfs  -network [fcff::0]/64,192.168.255.0/24 -maproot=root  local
ok. that server ip was [fcff::3]

freebsd15 nfs client :
mount -t nfs -o nfsv4 [fcff::3]:/nfs /mnt
problem coming ..
Code:
df - H
[fcff::3]:/nfs                               7.6T     96K    7.6T     0%    /mnt
looks like the mounting operation was right ...but ls file will get error as below .
Code:
#cd /mnt
#ls 
.: Input/output error (os error 5)
 kernel: nfsv4 no file handle: usually means the file system is not exported on the NFSv4 server
can everybody help me ? thanks.
 
Ahem
ZFS has its own NFS share management builtin.
Use of the the Old way to share NFS should not be requierd.


From the zfsprops (7) manual page.

sharenfs=on|off|opts
Controls whether the file system is shared via NFS, and what options
are to be used. A file system with a sharenfs property of off is
managed with the exportfs(8) command and entries in the /etc/exports
file. Otherwise, the file system is automatically shared and unshared
with the zfs share and zfs unshare commands. If the property is set to
on, the dataset is shared using the default options:
sec=sys,rw,crossmnt,no_subtree_check

Please note that the options are comma-separated, unlike those found in
exports(5). This is done to negate the need for quoting, as well as to
make parsing with scripts easier.

For FreeBSD, 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
exports(5). Any semicolon separated option set that consists entirely
of whitespace will be ignored. This use of semicolons is only for
FreeBSD at this time.

See exports(5) for the meaning of the default options. Otherwise, the
exportfs(8) command is invoked with options equivalent to the contents
of this property.

When the 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 off, or if they were
shared before the property was changed. If the new property is off,
the file systems are unshared.

When the sharenfs property is updated with zfs set -u , the property is
set to desired value, but the operation to share, reshare or unshare
the the dataset is not performed.
 
Back
Top