Subject: df values can differ with nfsv2/nfsv3 mounts
To: NetBSD userland <tech-userlevel@NetBSD.org>
From: Nicolas Joly <njoly@pasteur.fr>
List: tech-userlevel
Date: 07/01/2005 17:16:59
Hi,

I noticed that df(1) can show diffrent values for a NFS filesystem if
mounted with v2 or v3 protocol :

Filesystem                                     Size      Used     Avail Capacity  Mounted on
xx.xx.pasteur.fr:/vol/banques/.snapshot/prod   596G     663G      -67G   111%    /mount/banks2
xx.xx.pasteur.fr:/vol/banques/.snapshot/prod   596G     -15T       16T1475378468640%    /mount/banks3

Our main storage device is a NetApp filer R150 with about 12TB; it
holds the biological databanks in a 2.3TB volume (= partition). We
export a read-only snapshot from that volume to all our working
nodes. This method, allow the databanks maintainers to update/work on
the datas without disturbing the users ...

Sometime, the modifications are really big and the reserved space for
the snapshot is hit; then, the filer automatically extends the
snapshot size by taking needed blocks in the underlying volume.

In that case, i noticed that the NFSv3 mounted partition give
erroneous values; but the same partition, NFSv2 mounted, has the
correct values.

xx.xx.pasteur.fr:/vol/banques/.snapshot/prod on /mount/banks2 type nfs (fsid: 0xb04/0x70b, reads: sync 0 async 0, writes: sync 0 async 0, [nfs: addr=157.99.64.123, port=2049, addrlen=16, sotype=2, proto=0, fhsize=0, flags=0x8080<noconn,resvport>, wsize=8192, rsize=8192, readdirsize=8192, timeo=300, retrans=10, maxgrouplist=16, readahead=2, leaseterm=30, deadthresh=9])
xx.xx.pasteur.fr:/vol/banques/.snapshot/prod on /mount/banks3 type nfs (fsid: 0xb05/0x70b, reads: sync 0 async 0, writes: sync 0 async 0, [nfs: addr=157.99.64.123, port=2049, addrlen=16, sotype=2, proto=0, fhsize=0, flags=0x8280<noconn,nfsv3,resvport>, wsize=32768, rsize=32768, readdirsize=8192, timeo=300, retrans=10, maxgrouplist=16, readahead=2, leaseterm=30, deadthresh=9])

Filesystem                                   1K-blocks      Used     Avail Capacity  Mounted on
xx.xx.pasteur.fr:/vol/banques/.snapshot/prod 625152980 694898324 -69745344   111%    /mount/banks2
xx.xx.pasteur.fr:/vol/banques/.snapshot/prod 625152980 -16484970860 171101238401475378468640%    /mount/banks3

Thanks in advance,
Regards.

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.