NFSv2 Wrong FS Size

John Morgan Salomon john at zog.net
Tue Feb 3 10:39:04 PST 2009


Hi there,

I'm facing an odd problem with an NFSv2 mount.  I'm using userland  
nfsd from a Buffalo TeraStation Pro v1 NAS, running PPC Linux 2.4.20.

root at LEVIATHAN:~# uname -a
Linux LEVIATHAN 2.4.20_mvl31-ppc_terastation #3 Tue Jul 18 09:29:11  
JST 2006 ppc GNU/Linux

I am sharing the following filesystem:

root at LEVIATHAN:~# df -k
Filesystem           1K-blocks      Used Available Use% Mounted on
<local filesystems>
/dev/md1             1755708928 979032844 776676084  56% /mnt/array1

/etc/exports looks as follows:
/mnt/array1/data 192.168.2.0/255.255.255.0(rw,sync,insecure)

Mounting this on my Macbook Pro:

Fluffy:~ root# mount_nfs 192.168.2.11:/mnt/array1/data /mnt

Fluffy:~ root# df -k
Filesystem                    1024-blocks      Used Available  
Capacity  Mounted on
<local filesystems>
192.168.2.11:/mnt/array1/data  1755708928 979032844 776676084     
56%    /mnt

So far, so good...

Mounting this on a FreeBSD 7.1 client:

behemoth# mount /data
behemoth# df -k
Filesystem                    1024-blocks        Used     Avail  
Capacity  Mounted on
<local filesystems>
192.168.2.11:/mnt/array1/data  -391774720 -1168450804 776676084    
298%    /data

Here is my fstab:

192.168.2.11:/mnt/array1/data   /data   nfs     rw      0       0

Woo.  298%!  That's a record, even for me.

I've tried mount_nfs with -2, -T, and I can't think of anything else.   
There are no telling log messages, either on the NAS or on the FreeBSD  
box.

behemoth# uname -a
FreeBSD behemoth 7.1-RELEASE-p2 FreeBSD 7.1-RELEASE-p2 #2: Sat Jan 31  
20:13:15 CET 2009     root at behemoth:/usr/obj/usr/src/sys/BEHEMOTH  i386

Any ideas?  It's causing various php scripts that need an accurate  
filesystem size to puke all over the place. Help!

Thanks much for any thoughts,

-John


More information about the freebsd-questions mailing list