Subject: misc/34557: Problem with NetBSD-3 as a NFSv3 server with ext2fs
To: None <misc-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <deather.dede@gmail.com>
List: netbsd-bugs
Date: 09/19/2006 12:45:01
>Number:         34557
>Category:       misc
>Synopsis:       Problem with NetBSD-3 as a NFSv3 server with ext2fs
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 19 12:45:00 +0000 2006
>Originator:     Thomas Lecomte
>Release:        3.0
>Organization:
N/A
>Environment:
NetBSD barney.hinyx.info 3.0 NetBSD 3.0 (GENERIC) #0: Mon Dec 19 01:04:02 UTC 2005  builds@works.netbsd.org:/home/builds/ab/netbsd-3-0-RELEASE/i386/200512182024Z-obj/home/builds/ab/netbsd-3-0-RELEASE/src/sys/arch/i386/compile/GENERIC i386
>Description:
I export an ext2fs partition using NFS.
When I mount it on a Solaris box, it works using either NFSv2 and NFSv3.
However, when mounting it on a Linux box, NFSv3 doesn't work.

root@babe:~# mount -t nfs -o nfsvers=3 barney:/big /big
root@babe:~# ls /big
ls: reading directory /big: Input/output error
root@babe:~# umount /big
root@babe:~# mount -t nfs -o nfsvers=2 barney:/big /big
root@babe:~# ls /big
[Directory listing comes here]

Same problem when using an  SCO OpenServer client, but here with both NFSv2 and NFSv3:

bart#truss ls /big 2>&1 | grep EIO
getdents(3, 0x08329B70, 2048)                   Err#5  EIO

(have to use truss because  `ls' doesn't print out any error message)

Here's the tcpdump output when running `ls' on /big with NFSv3 under Linux:

08:35:47.552875 IP (tos 0x0, ttl  64, id 54812, offset 0, flags [DF], proto: TCP (6), length: 52) babe.hinyx.info.1023 > barney.hinyx.info.nfs: ., cksum 0x53a5 (correct), 2156:2156(0) ack 1685 win 1728 <nop,nop,timestamp 16794340 72>

08:35:57.296691 IP (tos 0x0, ttl  64, id 54813, offset 0, flags [DF], proto: TCP (6), length: 196) babe.hinyx.info.4274594373 > barney.hinyx.info.nfs: 144 getattr [|nfs]

08:35:57.296877 IP (tos 0x0, ttl  64, id 10228, offset 0, flags [DF], proto: TCP (6), length: 168) barney.hinyx.info.nfs > babe.hinyx.info.4274594373: reply ok 116 getattr [|nfs]

[stops here]

Here's the uname -a output of the Linux box:
# uname -a
Linux babe 2.6.15-26-sparc64 #1 Thu Aug 3 02:59:18 UTC 2006 sparc64 GNU/Linux

It's an Ubuntu Server 6.06.1.

And by the way, if I suspect ext2fs, it's because the NetBSD machine exports an ffs NFS share as well, which works perfectly using NFSv3 on Linux and SCO boxes.
>How-To-Repeat:
Simply export an ext2fs partition using NFS and mount it with NFSv3 on a Linux box.
>Fix:
Using NFSv2 could be a workaround for Linuxes box.
Didn't found a fix for SCO OpenServer.