Discussion:
NFSv3
(too old to reply)
Michael Richardson
2007-04-05 15:49:38 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


I moved an ext3 drive to a NetBSD machine (actually, a specific purpose
domU). My Linux NFS clients mounted it incorrectly with NFS version 3.

mount aragorn:/c1 /mnt
client# ls -lt /mnt &
ls: reading directory /mnt: Input/output error

client# mount nfsvers=2 aragorn:/c1 /mnt
client# ls -lt /mnt

broken server is:
aragorn# uname -a
NetBSD aragorn.sandelman.ca. 4.99.6 NetBSD 4.99.6 (XEN3_DOMU) #2: Sat Dec 30 11:17:44 EST 2006 ***@istari.sandelman.ca:/corp/network/kernels/compile-current/XEN3_DOMU i386

working server is:
istari-[/usr/pkgsrc/packages/All] mcr 1024 %uname -a
NetBSD istari.sandelman.ca 3.0 NetBSD 3.0 (NETSERV) #7: Fri Mar 24 22:31:44 EST 2006 ***@istari.sandelman.ca:/corp/network/kernels/compile-current/NETSERV i386

- --
] Bear: "Me, I'm just the shape of a bear." | firewalls [
] Michael Richardson, Xelerance Corporation, Ottawa, ON |net architect[
] ***@xelerance.com http://www.sandelman.ottawa.on.ca/mcr/ |device driver[
] panic("Just another Debian GNU/Linux using, kernel hacking, security guy"); [






-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Finger me for keys

iQEVAwUBRhUaj4CLcPvd0N1lAQKAZQf/ajvk4tye22ZOm3J46vtZdn6NBoolQfGF
di2trePuyyS7Ap6HEnexhSZ13RbQp2WKap8XBy22LQmY9BmO7JBwVzah07gg9Rta
jmZfN74jzzPZvWw4fKsUrIw9mLBpXwXhaPcOAKvuOi3vGAMRHJ0EwkhhhCOZ3U9U
SUswz6YQryxmp4fAv5KppdsSq63bX34oIKFfxTkZ1FnV7MF6U491iXIGtyw9jon1
fIbKdQC1bCTKHLYfCRTqUS4RLEtjFS0nFXBGY+0I843gDIKpJDkQcWZnkovb3KP0
eYyYAHZj0fn9OMnsX/UC17s0yuLWXZBd5N+Cw1NGwAv4e3pkqBb6Nw==
=1Czs
-----END PGP SIGNATURE-----

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Matthias Scheler
2007-04-09 07:15:16 UTC
Permalink
Post by Michael Richardson
I moved an ext3 drive to a NetBSD machine (actually, a specific purpose
domU).
NetBSD does *not* support ext3 properly.
Post by Michael Richardson
My Linux NFS clients mounted it incorrectly with NFS version 3.
I don't have NFS problem with a Linux client mounting a UFS from a
NetBSD 3.1 NFS server.

Kind regards
--
Matthias Scheler http://zhadum.org.uk/

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Thor Lancelot Simon
2007-04-09 07:44:13 UTC
Permalink
Hmmmm. Linux does something very funny with NFSv3 directory cookies,
so that we have to have a compatibility option on our mount_nfs so we
can get things right for Linux binaries when running as a client. I
wonder if we need something similar to serve some filesystems to Linux
clients -- but I don't understand what's going on well enough to say
for sure.
This old thread: http://sourceware.org/ml/libc-alpha/2001-02/msg00264.html
has a discussion of just what Linux does -- or did, anyway: peek inside
the opaque cookie and splode inside glibc with EOVERFLOW if it didn't
like the value. Heaven knows if that's still the case, or if it's what
you're seeing, but by looking at the cookie values with tcpdump it should
be possible to tell.

Thor

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Michael Richardson
2007-04-09 18:01:01 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Thank you for the replies.
I realize that NetBSD doesn't do ext3... I figured if the journal was
properly re-played, that I could transfer the disk and use it as ext2.
No, I don't intend to move it back to Linux... Likely I will jungle some
things around, and move it to UFS. It's a 300G drive full of movies + my
/distros mirrors.

I'm moving it to NFS so that I can re-install the "media" machine
multiple times with different setups/etc.

I was able to get it mounted with nfsvers=2,udp options.
Yes, I also serve UFS file systems regularly to all sorts of clients
from a NetBSD 3.0 host. Generally, I'm happier with NetBSD as NFS
server than Linux.

It certainly looks like it's the getdirent() code.
The thread you pointed to suggests that it's glibc's fault?
It seems to me like it's a fault in the ext2 handling of readdirplus() call.

- From an ubuntu host:

***@franklin:~# uname -a
Linux franklin.sandelman.ca 2.6.16-xen #3 SMP Mon Sep 11 19:59:33 EDT 2006 i686 GNU/Linux
***@franklin:~# mount aragorn:/kesey /mnt
***@franklin:~# ls /mnt/.
ls: reading directory /mnt/.: Input/output error
***@franklin:~# umount /mnt

TCPDUMP inline below.

One of the partitions on the moved disk is junk, so I newfs'ed it:

aragorn# uname -a
NetBSD aragorn.sandelman.ca. 4.99.6 NetBSD 4.99.6 (XEN3_DOMU) #2: Sat Dec 30 11:17:44 EST 2006 ***@istari.sandelman.ca:/corp/network/kernels/compile-current/XEN3_DOMU i386
aragorn# newfs /dev/xbd2g
...
***@franklin:~# mount aragorn:/psalm /mnt
***@franklin:~# ls -lt /mnt
total 0

No problems with UFS.
(tell me if I should be updating my kernel)

I guess LFS is really what I should be using for such large partitions,
though.

aragorn# tcpdump -v -v -s 1600 -i xennet0 -n -p host franklin.sandelman.ca.
tcpdump: listening on xennet0, link-type EN10MB (Ethernet), capture size 1600 bytes
17:26:24.531144 IP (tos 0x0, ttl 64, id 2, offset 0, flags [DF], length: 152) 205.150.200.226.1279213905 > 205.150.200.227.2049: 124 access fh 142,21/127947 001f
17:26:24.531229 IP (tos 0x0, ttl 64, id 48815, offset 0, flags [none], length: 148) 205.150.200.227.2049 > 205.150.200.226.1279213905: reply ok 120 access attr: DIR 775 ids 179/1002 sz 0x1000 nlink 21 rdev 2/5 fsid 0x8e15 fileid 0x2 a/m/ctime 1176137227.000000 1160500348.000000 1160500348.000000 c 001f
17:26:24.532391 IP (tos 0x0, ttl 64, id 3, offset 0, flags [DF], length: 148) 205.150.200.226.1295991121 > 205.150.200.227.2049: 120 getattr fh 142,21/127947
17:26:24.532439 IP (tos 0x0, ttl 64, id 48816, offset 0, flags [none], length: 140) 205.150.200.227.2049 > 205.150.200.226.1295991121: reply ok 112 getattr DIR 775 ids 179/1002 sz 0x1000

17:26:24.532603 IP (tos 0x0, ttl 64, id 4, offset 0, flags [DF], length: 172) 205.150.200.226.1312768337 > 205.150.200.227.2049: 144 readdirplus fh 142,21/127947 512 bytes @ 0x0 max 4096 verf 0000000000000000

17:26:24.532644 IP (tos 0x0, ttl 64, id 48817, offset 0, flags [none], length: 144) 205.150.200.227.2049 > 205.150.200.226.1312768337: reply ok 116 readdirplus ERROR: Input/output error POST: DIR 775 ids 179/1002 sz 0x1000 nlink 21 rdev 2/5 fsid 0x8e15 fileid 0x2 a/m/ctime 1176137227.000000 1160500348.000000 1160500348.000000

17:26:27.981252 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], length: 84) 205.150.200.226.628 > 205.150.200.227.111: [udp sum ok] UDP, length: 56
17:26:27.981418 IP (tos 0x0, ttl 64, id 48824, offset 0, flags [none], length: 56) 205.150.200.227.111 > 205.150.200.226.628: [udp sum ok] UDP, length: 28
17:26:27.981683 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], length: 128) 205.150.200.226.629 > 205.150.200.227.1020: [udp sum ok] UDP, length: 100
17:26:28.054081 IP (tos 0x0, ttl 64, id 48826, offset 0, flags [none], length: 52) 205.150.200.227.1020 > 205.150.200.226.629: [udp sum ok] UDP, length: 24
^C
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Finger me for keys

iQEVAwUBRhp/WICLcPvd0N1lAQJMawf/V8jTI1Vm27sb6x9cThQbZjxZrrTGQ6Od
RJ7VuL6ZytxHRIxf4xB29atL9XpnmrhcrHCtUuPfbHwG3WxR68qG2L5vnJ9XbUS3
g4w//YG3zCCmNeVD7MmO/INAYKr+4zc0jjd01/xKg1GM6C0ZCV/RbANerH7niKKw
TzmeDdurUI8Ec2VdqRP2YiKaq4aenS6LssGj6iHdFG1Jg3F1xmSMA+xalbK8vajy
QQcpEDZ3u4JcDo+FstZsCtoisSwcpewcJbqxcsqcftuBQ5B2rvuPujFQaYck33iS
lfkLcNRicwoMEG/t8veqKAe24wBSD/WyYbfUN9SGEawRsdOrLw+eog==
=g/0Z
-----END PGP SIGNATURE-----

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...