df report wrong free space on NFSv4 share

Russian russian at russerver.org
Sun Sep 11 10:56:54 UTC 2016


Hi all.
After migrating to NFSv4 (from NFSv3) i found that df on client shows
wrong free space:

root at server:~ # df -hT
Filesystem         Type     Size    Used   Avail Capacity  Mounted on
/dev/mirror/gm0p2  ufs       39G    3.8G     32G    11%    /
devfs                            devfs    1.0K    1.0K      0B   100%   
/dev
/dev/mirror/gm1p1  ufs      1.8T    1.6T    1.6G   100%    /usr/local/data

root at client:~ # df -hT
Filesystem            Type     Size    Used   Avail Capacity  Mounted on
/dev/ada0p2           ufs      7.3G    4.5G    2.3G    66%    /
devfs                      devfs    1.0K    1.0K      0B   100%    /dev
server:/                  nfs      1.8T    1.6T    146G    92%    /mnt

Difference is exactly 8% (looks like nfs don't respect ufs minfree)
Is it a bug? or it's me doing something wrong?

Server:
root at server:~ # uname -a
FreeBSD server 10.3-RELEASE-p7 FreeBSD 10.3-RELEASE-p7 #0: Thu Aug 11
18:38:15 UTC 2016    
root at amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

root at server:~ # less /etc/exports
/usr/local/data -mapall=user client
V4:/usr/local/data client

root at storage:~ # less /etc/rc.conf
rpcbind_enable="YES"
nfs_server_enable="YES"
nfsv4_server_enable="YES"
nfsuserd_enable="YES"


Client:
root at client:~ # uname -a
FreeBSD client 10.3-RELEASE-p7 FreeBSD 10.3-RELEASE-p7 #0: Thu Aug 11
18:38:15 UTC 2016    
root at amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

root at client:~ # less ./fstab
# Device        Mountpoint      FStype  Options Dump    Pass#
/dev/ada0p2     /               ufs     rw      1       1
/dev/ada0p3     none            swap    sw      0       0
server:/         /mnt        nfs          rw,bg,tcp,intr,nfsv4      0      0

root at client:~ # less /etc/rc.conf
nfs_client_enable="YES"
nfsuserd_enable="YES"
nfscbd_enable="YES"


More information about the freebsd-questions mailing list