Skip to contentSkip to conversation

FC2/2.6.8.1 does not fallback to NFSv2

bug Brandon D. Valentine 5 participants 16 messages Aug 27, 2004 – Aug 29, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

[ I tried to send this yesterday without actually subscribing, but it has yet to make it past the list moderator. I've given up and subscribed to yet another mailing list to get this bug report out. ]

We have just brought up several Fedora Core 2 systems running the latest 2.6.8.1 kernel revision in our NIS/NFS+autofs environment. The FC2/2.6 clients are refusing to mount one specific filesystem on our network. This filesystem is exported by a Debian/woody system running a 2.4.18 kernel. The kernel on this machine only supports NFSv2 exports.

When the FC2/2.6 client attempts to automount the filesystem on the 2.4 server we observe the following in the client's syslog:

  Aug 26 18:37:08 scylla automount[5056]: >> mount to NFS server 'reef'
  failed: server is down.
  Aug 26 18:37:08 scylla automount[5056]: mount(nfs): nfs: mount failure
  reef:/export/reef/httpd/ on /sb/www
  Aug 26 18:37:08 scylla automount[5056]: failed to mount /sb/www

And the following is observed in the server's syslog:

  Aug 26 18:37:12 reef kernel: svc: unknown version (3)

At this point the client gives up with the following error:

[root@scylla root]# ls /sb/www
ls: /sb/www: No such file or directory

None of our other Linux systems running 2.4 kernels have any trouble mounting that filesystem. They all automount it using NFSv2 as expected. All of our 2.4 systems also correctly mount using NFSv3 from systems that support it.

Autofs is configured on the FC2 systems to permit NFSv2 mounts as shown by the minproto option below:

[root@scylla root]# mount | grep automount
automount(pid1665) on /home type autofs (rw,fd=4,pgrp=1665,minproto=2,maxproto=4) automount(pid1695) on /sb type autofs (rw,fd=4,pgrp=1695,minproto=2,maxproto=4) automount(pid1739) on /scratch type autofs (rw,fd=4,pgrp=1739,minproto=2,maxproto=4)

The 2.6.8.1 kernel is configured with the following options:

[root@scylla root]# grep -i nfs /usr/src/linux/.config CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
# CONFIG_NFS_V4 is not set
# CONFIG_NFS_DIRECTIO is not set CONFIG_NFSD=y
CONFIG_NFSD_V3=y
# CONFIG_NFSD_V4 is not set
CONFIG_NFSD_TCP=y

I am able to manually mount this filesystem, but only if I explicitly add the vers=2 option to the mount command:

[root@scylla root]# mount -t nfs reef:/export/reef/httpd/ /mnt/temp mount to NFS server 'reef' failed: server is down.
[root@scylla root]# mount -t nfs -o vers=2 reef:/export/reef/httpd/ /mnt/temp [root@scylla root]#

Given the fact that the mount fails manually until vers=2 is specified I am inclined to believe this is a kernel NFS bug, not an autofs or mount bug.

I would be glad to gather any additional information that might be necessary to determine the cause of this behavior. Can anyone reproduce this or have advice on how I might fix it?

Thanks,

Brandon D. Valentine

Signature · 13 lines
[email protected]                           http://www.geekpunk.net
Pseudo-Random Googlism:  sunlight is the lowest frequency and therefore
                         is the biggest wave


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#1 lore raw

P=E5 fr , 27/08/2004 klokka 17:22, skreiv Brandon D. Valentine:

Quoted 1 line

Given the fact that the mount fails manually until vers=3D2 is specified =

I

Quoted 2 lines

am inclined to believe this is a kernel NFS bug, not an autofs or mount bug.

Sorry. I conclude the exact opposite. The problem here is the "mount" program autoprobe failing.

Cheers,
Trond

-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#2 lore raw

P=C3=A5 fr , 27/08/2004 klokka 17:36, skreiv Trond Myklebust:

Quoted 3 lines

P=C3=A5 fr , 27/08/2004 klokka 17:22, skreiv Brandon D. Valentine:
=20

Quoted 1 line

Given the fact that the mount fails manually until vers=3D2 is specifie=

d I

Quoted 5 lines
Quoted 2 lines

am inclined to believe this is a kernel NFS bug, not an autofs or mount bug.

=20
Sorry. I conclude the exact opposite. The problem here is the "mount" program autoprobe failing.

To be more specific, I believe the problem here is that you are using an NFSv2-only kernel together with a version of mountd that is advertising NFSv2 *and* NFSv3.

We used to have code in the kernel that retried using NFSv2 if the NFSv3 GETATTR call failed. I ripped that out of 2.6.x since people have had ample time (I'd say 4-5 years is pretty ample) to correct their setups. Add the '--no=E2=80=90nfs=E2=80=90version 3' flag to your rpc.mountd startu= p script,
just as the mountd manpage clearly states you should do, and all will be well.

Cheers,
Trond

-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#3 lore raw
Quoted 3 lines · Trond Myklebust

To be more specific, I believe the problem here is that you are using an NFSv2-only kernel together with a version of mountd that is advertising NFSv2 *and* NFSv3.

I would be very happy to find out that it was so simple, but it doesn't appear to be. The problem definitely appears to be on the client system, not the server.

[root@scylla root]# rpcinfo -u reef nfs
program 100003 version 2 ready and waiting
[root@scylla root]# rpcinfo -u reef nfs 3
rpcinfo: RPC: Program/version mismatch; low version = 2, high version = 2 program 100003 version 3 is not available

  reef:~# ps -Af | grep mountd
  root       395     1  0 Aug17 ?        00:00:00 /usr/sbin/rpc.mountd --no-nfs-version 3
Quoted 6 lines

We used to have code in the kernel that retried using NFSv2 if the NFSv3 GETATTR call failed. I ripped that out of 2.6.x since people have had ample time (I'd say 4-5 years is pretty ample) to correct their setups. Add the '--no???nfs???version 3' flag to your rpc.mountd startup script, just as the mountd manpage clearly states you should do, and all will be well.

I am willing to believe that this is not a kernel bug, but can you suggest where else in the client userland I might look for the source of this problem? It seems that this must either be a kernel bug or a bug in mount(8).

I am more than willing to gather any information you might need to discover the source of the behavior I'm experiencing. Attached is strace(1) output for the mount(1) command. Hopefully that'll make it through mailman, but I'll leave you in the Cc in case it doesn't. The mount binary on this system is stripped, so I don't know how much more useful debug information I can get out of it without compiling a debug version of mount. FWIW, the mount binary on this FC2 system comes from:

  [root@scylla root]# rpm -q --whatprovides /bin/mount
  util-linux-2.12-18

Let me know how I can help.

Thanks,

Brandon D. Valentine

Signature · 13 lines
[email protected]                           http://www.geekpunk.net
Pseudo-Random Googlism:  sunlight is the sun's weekly nonduplicating
                         shopper


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#4 lore raw

And of course I didn't actually attach the strace output file so here it comes. Sorry for the extra message.

Thanks,

Brandon D. Valentine

Signature · 2 lines
[email protected]                           http://www.geekpunk.net
Pseudo-Random Googlism:  brandon is going for his counts

execve("/bin/mount", ["mount", "-t", "nfs", "reef:/export/reef/httpd/", "/mnt/temp/"], [/* 27 vars */]) = 0 uname({sysname="Linux", nodename="scylla.structbio.vanderbilt.edu", release="2.6.8.1", version="#5 SMP Wed Aug 25 16:09:17 CDT 2004", machine="i686"}) = 0

brk(0)                                  = 0x805c000
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3

fstat64(3, {st_dev=makedev(3, 2), st_ino=4256539, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=144, st_size=71507, st_atime=2004/08/27-18:24:59, st_mtime=2004/08/26-10:03:26, st_ctime=2004/08/26-10:03:26}) = 0 old_mmap(NULL, 71507, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40000000
close(3) = 0
open("/lib/tls/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\273"..., 512) = 512
fstat64(3, {st_dev=makedev(3, 2), st_ino=20972881, st_mode=S_IFREG|0755, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=2848, st_size=1455084, st_atime=2004/08/27-18:24:59, st_mtime=2004/05/11-08:20:12, st_ctime=2004/08/20-04:02:55}) = 0 old_mmap(0x747000, 1158124, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x747000
old_mmap(0x85c000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x115000) = 0x85c000
old_mmap(0x860000, 7148, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x860000
close(3) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40012000
mprotect(0x85c000, 8192, PROT_READ) = 0
mprotect(0x743000, 4096, PROT_READ) = 0
set_thread_area({entry_number:-1 -> 6, base_addr:0x40012460, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0

munmap(0x40000000, 71507)               = 0
brk(0)                                  = 0x805c000
brk(0x807d000)                          = 0x807d000
brk(0)                                  = 0x807d000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_dev=makedev(3, 2), st_ino=25166981, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=78568, st_size=40246896, st_atime=2004/08/27-18:22:19, st_mtime=2004/08/19-15:00:54, st_ctime=2004/08/19-15:00:54}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40013000
close(3)                                = 0
umask(022)                              = 022
open("/dev/null", O_RDWR|O_LARGEFILE)   = 3
close(3)                                = 0
getuid32()                              = 0
geteuid32()                             = 0

lstat64("/etc/mtab", {st_dev=makedev(3, 2), st_ino=4256572, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=645, st_atime=2004/08/27-18:22:19, st_mtime=2004/08/27-18:09:34, st_ctime=2004/08/27-18:09:34}) = 0
stat64("/sbin/mount.nfs", 0xbffff730) = -1 ENOENT (No such file or directory)
uname({sysname="Linux", nodename="scylla.structbio.vanderbilt.edu", release="2.6.8.1", version="#5 SMP Wed Aug 25 16:09:17 CDT 2004", machine="i686"}) = 0
gettimeofday({1093649099, 827523}, NULL) = 0
getpid() = 6904
open("/etc/resolv.conf", O_RDONLY) = 3
fstat64(3, {st_dev=makedev(3, 2), st_ino=5146370, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=78, st_atime=2004/08/27-18:22:15, st_mtime=2004/08/19-15:17:43, st_ctime=2004/08/19-15:17:43}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40213000
read(3, "search structbio.vanderbilt.edu\n"..., 4096) = 78

read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x40213000, 4096)                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 3

connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3) = 0
open("/etc/nsswitch.conf", O_RDONLY) = 3
fstat64(3, {st_dev=makedev(3, 2), st_ino=4195335, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=1718, st_atime=2004/08/27-18:22:19, st_mtime=2004/08/19-15:30:34, st_ctime=2004/08/19-15:30:34}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40213000
read(3, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 4096) = 1718

read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x40213000, 4096)                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 3

fstat64(3, {st_dev=makedev(3, 2), st_ino=4256539, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=144, st_size=71507, st_atime=2004/08/27-18:24:59, st_mtime=2004/08/26-10:03:26, st_ctime=2004/08/26-10:03:26}) = 0 old_mmap(NULL, 71507, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40213000
close(3) = 0
open("/lib/libnss_files.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\33\0\000"..., 512) = 512
fstat64(3, {st_dev=makedev(3, 2), st_ino=25167015, st_mode=S_IFREG|0755, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=104, st_size=50944, st_atime=2004/08/27-18:24:59, st_mtime=2004/05/11-08:20:08, st_ctime=2004/08/19-15:00:56}) = 0 old_mmap(NULL, 45724, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40225000
old_mmap(0x4022f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x9000) = 0x4022f000

close(3)                                = 0
mprotect(0x4022f000, 4096, PROT_READ)   = 0
munmap(0x40213000, 71507)               = 0
open("/etc/host.conf", O_RDONLY)        = 3
fstat64(3, {st_dev=makedev(3, 2), st_ino=4194451, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=17, st_atime=2004/08/27-18:22:15, st_mtime=2000/07/23-10:06:54, st_ctime=2004/08/19-15:00:37}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40213000
read(3, "order hosts,bind\n", 4096)     = 17
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x40213000, 4096)                = 0
open("/etc/hosts", O_RDONLY)            = 3
fcntl64(3, F_GETFD)                     = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
fstat64(3, {st_dev=makedev(3, 2), st_ino=5146368, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=203, st_atime=2004/08/27-18:22:15, st_mtime=2004/08/19-15:17:43, st_ctime=2004/08/19-15:17:43}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40213000
read(3, "# Do not remove the following li"..., 4096) = 203
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x40213000, 4096)                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 3

fstat64(3, {st_dev=makedev(3, 2), st_ino=4256539, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=144, st_size=71507, st_atime=2004/08/27-18:24:59, st_mtime=2004/08/26-10:03:26, st_ctime=2004/08/26-10:03:26}) = 0 old_mmap(NULL, 71507, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40213000
close(3) = 0
open("/lib/libnss_nis.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\33"..., 512) = 512
fstat64(3, {st_dev=makedev(3, 2), st_ino=25167020, st_mode=S_IFREG|0755, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=88, st_size=43528, st_atime=2004/08/27-18:24:59, st_mtime=2004/05/11-08:20:08, st_ctime=2004/08/19-15:00:56}) = 0 old_mmap(NULL, 37440, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40231000
old_mmap(0x40239000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x7000) = 0x40239000
close(3) = 0
open("/lib/libnsl.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0pZq\000"..., 512) = 512
fstat64(3, {st_dev=makedev(3, 2), st_ino=25402408, st_mode=S_IFREG|0755, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=192, st_size=96248, st_atime=2004/08/27-18:24:59, st_mtime=2004/05/11-08:20:07, st_ctime=2004/08/20-04:03:03}) = 0 old_mmap(0x712000, 84192, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x712000

old_mmap(0x723000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x11000) = 0x723000
old_mmap(0x725000, 6368, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x725000
close(3)                                = 0
mprotect(0x723000, 4096, PROT_READ)     = 0
mprotect(0x40239000, 4096, PROT_READ)   = 0
munmap(0x40213000, 71507)               = 0

uname({sysname="Linux", nodename="scylla.structbio.vanderbilt.edu", release="2.6.8.1", version="#5 SMP Wed Aug 25 16:09:17 CDT 2004", machine="i686"}) = 0 open("/var/yp/binding/structbio.2", O_RDONLY) = 3
readv(3, [{"\377\377", 2}, {"\1\0\0\0\240\201\212\370\3U\0\0", 12}], 2) = 14
gettimeofday({1093649099, 830821}, NULL) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 4
bind(4, {sa_family=AF_INET, sin_port=htons(720), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
ioctl(4, FIONBIO, [1]) = 0
setsockopt(4, SOL_IP, IP_RECVERR, [1], 4) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
close(3) = 0
sendto(4, "LH!\371\0\0\0\0\0\0\0\2\0\1\206\244\0\0\0\2\0\0\0\3\0\0"..., 80, 0, {sa_family=AF_INET, sin_port=htons(853), sin_addr=inet_addr("160.129.138.248")}, 16) = 80 poll([{fd=4, events=POLLIN, revents=POLLIN}], 1, 5000) = 1
recvfrom(4, "LH!\371\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1"..., 8800, 0, {sa_family=AF_INET, sin_port=htons(853), sin_addr=inet_addr("160.129.138.248")}, [16]) = 140
close(4) = 0
time(NULL) = 1093649099
socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 3
bind(3, {sa_family=AF_INET, sin_port=htons(721), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(111), sin_addr=inet_addr("160.129.138.217")}, 16) = 0
write(3, "\200\0\0008\10\217\226\357\0\0\0\0\0\0\0\2\0\1\206\240"..., 60) = 60
poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, 60000) = 1
read(3, "\200\0\0\34\10\217\226\357\0\0\0\1\0\0\0\0\0\0\0\0\0\0"..., 400) = 32
close(3) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 3
bind(3, {sa_family=AF_INET, sin_port=htons(722), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
ioctl(3, FIONBIO, [1]) = 0
setsockopt(3, SOL_IP, IP_RECVERR, [1], 4) = 0
sendto(3, "\16\203\177\r\0\0\0\0\0\0\0\2\0\1\206\240\0\0\0\2\0\0\0"..., 56, 0, {sa_family=AF_INET, sin_port=htons(111), sin_addr=inet_addr("160.129.138.217")}, 16) = 56 poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, 5000) = 1
recvfrom(3, "\16\203\177\r\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 400, 0, {sa_family=AF_INET, sin_port=htons(111), sin_addr=inet_addr("160.129.138.217")}, [16]) = 28
close(3) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 3
bind(3, {sa_family=AF_INET, sin_port=htons(723), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
ioctl(3, FIONBIO, [1]) = 0
setsockopt(3, SOL_IP, IP_RECVERR, [1], 4) = 0
sendto(3, "7Ee\330\0\0\0\0\0\0\0\2\0\1\206\240\0\0\0\2\0\0\0\3\0\0"..., 56, 0, {sa_family=AF_INET, sin_port=htons(111), sin_addr=inet_addr("160.129.138.217")}, 16) = 56 poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, 5000) = 1
recvfrom(3, "7Ee\330\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\10"..., 400, 0, {sa_family=AF_INET, sin_port=htons(111), sin_addr=inet_addr("160.129.138.217")}, [16]) = 28
close(3) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 3
bind(3, {sa_family=AF_INET, sin_port=htons(724), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
ioctl(3, FIONBIO, [1]) = 0
setsockopt(3, SOL_IP, IP_RECVERR, [1], 4) = 0
sendto(3, "K\236#\v\0\0\0\0\0\0\0\2\0\1\206\243\0\0\0\3\0\0\0\0\0"..., 40, 0, {sa_family=AF_INET, sin_port=htons(2049), sin_addr=inet_addr("160.129.138.217")}, 16) = 40 poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, 3000) = 1
recvfrom(3, "K\236#\v\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0"..., 400, 0, {sa_family=AF_INET, sin_port=htons(2049), sin_addr=inet_addr("160.129.138.217")}, [16]) = 32
close(3) = 0
close(3) = -1 EBADF (Bad file descriptor)
write(2, "mount to NFS server \'reef\' faile"..., 33) = 33
write(2, ": server is down.\n", 18) = 18
exit_group(32) = ?

#5 lore raw

P=E5 fr , 27/08/2004 klokka 19:34, skreiv Brandon D. Valentine:

Quoted 2 lines

And of course I didn't actually attach the strace output file so here it comes. Sorry for the extra message.

It all looks OK, apart from the fact that the mount program gives up after it receives the PROG_MISMATCH reply from the server.

Mind applying the following debugging line to the util-linux SRPM, then using the resulting "mount" to test out what is going wrong?

Cheers,
Trond

-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#6 lore raw
Quoted 9 lines · Trond Myklebust

P? fr , 27/08/2004 klokka 19:34, skreiv Brandon D. Valentine:

Quoted 2 lines

And of course I didn't actually attach the strace output file so here it comes. Sorry for the extra message.

It all looks OK, apart from the fact that the mount program gives up after it receives the PROG_MISMATCH reply from the server.

Mind applying the following debugging line to the util-linux SRPM, then using the resulting "mount" to test out what is going wrong?

I would be happy to, but you forgot to include the debugging line. =)

Thanks,

Brandon D. Valentine

Signature · 14 lines
[email protected]                           http://www.geekpunk.net
Pseudo-Random Googlism:  sunlight is a project of the california voter
                         foundation to advance electronic filing and
                         internet disclosure of campaign finance data


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#14 lore raw
In reply to Brandon D. Valentine
Quoted 7 lines · Brandon D. Valentine

Autofs is configured on the FC2 systems to permit NFSv2 mounts as shown by the minproto option below:

[root@scylla root]# mount | grep automount
automount(pid1665) on /home type autofs (rw,fd=4,pgrp=1665,minproto=2,maxproto=4) automount(pid1695) on /sb type autofs (rw,fd=4,pgrp=1695,minproto=2,maxproto=4) automount(pid1739) on /scratch type autofs (rw,fd=4,pgrp=1739,minproto=2,maxproto=4)

The minproto and maxproto have nothing to to with NFS version. They are related to the autofs kernel module <-> automount daemon communication.

Ian

-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#15 lore raw
In reply to Brandon D. Valentine

It's a bug in Redhat's util-linux package - see:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=123416

As yet, I haven't found a fixed version available from Redhat - my simple workround is as follows - I guess it's OK, as this check doesn't seem to exist in other versions of nfsmount.c

James Pearson

*** util-linux-2.12/mount/nfsmount.c.dist 2004-07-08 15:08:38.000000000 +0
100
--- util-linux-2.12/mount/nfsmount.c 2004-07-08 15:15:28.000000000 +0100
***************
*** 423,430 ****
--- 423,435 ----

                                return 1;
                        memcpy(mnt_pmap, &save_mnt, sizeof(*mnt_pmap));
                }

+
+ /* the following check breaks the automatic fall back
+ to NFSv2 - JCP 8/7/2004 */
+ #if 0

                if (rpc_createerr.cf_stat != RPC_PROGNOTREGISTERED)
                        break;
+ #endif
                memcpy(nfs_pmap, &save_nfs, sizeof(*nfs_pmap));
        }

out_bad:

Quoted 65 lines · Brandon D. Valentine

[ I tried to send this yesterday without actually subscribing, but it has yet to make it past the list moderator. I've given up and subscribed to yet another mailing list to get this bug report out. ]

We have just brought up several Fedora Core 2 systems running the latest 2.6.8.1 kernel revision in our NIS/NFS+autofs environment. The FC2/2.6 clients are refusing to mount one specific filesystem on our network. This filesystem is exported by a Debian/woody system running a 2.4.18 kernel. The kernel on this machine only supports NFSv2 exports.

When the FC2/2.6 client attempts to automount the filesystem on the 2.4 server we observe the following in the client's syslog:

  Aug 26 18:37:08 scylla automount[5056]: >> mount to NFS server 'reef'
  failed: server is down.
  Aug 26 18:37:08 scylla automount[5056]: mount(nfs): nfs: mount failure
  reef:/export/reef/httpd/ on /sb/www
  Aug 26 18:37:08 scylla automount[5056]: failed to mount /sb/www

And the following is observed in the server's syslog:

  Aug 26 18:37:12 reef kernel: svc: unknown version (3)

At this point the client gives up with the following error:

[root@scylla root]# ls /sb/www
ls: /sb/www: No such file or directory

None of our other Linux systems running 2.4 kernels have any trouble mounting that filesystem. They all automount it using NFSv2 as expected. All of our 2.4 systems also correctly mount using NFSv3 from systems that support it.

Autofs is configured on the FC2 systems to permit NFSv2 mounts as shown by the minproto option below:

[root@scylla root]# mount | grep automount
automount(pid1665) on /home type autofs (rw,fd=4,pgrp=1665,minproto=2,maxproto=4) automount(pid1695) on /sb type autofs (rw,fd=4,pgrp=1695,minproto=2,maxproto=4) automount(pid1739) on /scratch type autofs (rw,fd=4,pgrp=1739,minproto=2,maxproto=4)

The 2.6.8.1 kernel is configured with the following options:

[root@scylla root]# grep -i nfs /usr/src/linux/.config CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
# CONFIG_NFS_V4 is not set
# CONFIG_NFS_DIRECTIO is not set CONFIG_NFSD=y
CONFIG_NFSD_V3=y
# CONFIG_NFSD_V4 is not set
CONFIG_NFSD_TCP=y

I am able to manually mount this filesystem, but only if I explicitly add the vers=2 option to the mount command:

[root@scylla root]# mount -t nfs reef:/export/reef/httpd/ /mnt/temp mount to NFS server 'reef' failed: server is down.
[root@scylla root]# mount -t nfs -o vers=2 reef:/export/reef/httpd/ /mnt/temp [root@scylla root]#

Given the fact that the mount fails manually until vers=2 is specified I am inclined to believe this is a kernel NFS bug, not an autofs or mount bug.

Quoted 7 lines

I would be glad to gather any additional information that might be necessary to determine the cause of this behavior. Can anyone reproduce this or have advice on how I might fix it?

Thanks,

Brandon D. Valentine

-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#10 lore raw
In reply to Brandon D. Valentine
Quoted 13 lines · Brandon D. Valentine
Quoted 5 lines · Trond Myklebust

To be more specific, I believe the problem here is that you are using an NFSv2-only kernel together with a version of mountd that is advertising NFSv2 *and* NFSv3.

I would be very happy to find out that it was so simple, but it doesn't appear to be. The problem definitely appears to be on the client system, not the server.

Quoted 10 lines

[root@scylla root]# rpcinfo -u reef nfs
program 100003 version 2 ready and waiting
[root@scylla root]# rpcinfo -u reef nfs 3
rpcinfo: RPC: Program/version mismatch; low version = 2, high version = 2 program 100003 version 3 is not available

 reef:~# ps -Af | grep mountd
 root       395     1  0 Aug17 ?        00:00:00 /usr/sbin/rpc.mountd --no-nfs-version 3

Upgrade your nfs-utils to the latest rawhide version (nfs-utils-1.0.6-31 I believe) to see if it take care of the problem. I think this has to do with the order of how mountd and rpc.imapd are started. Basically mountd has to be running before rpc.idmapd for things to work... So in the case of the server (where rpc.idmapd is already started), the nfs startup script send rpc.idmapd a signal telling it to reopen its nfsd files (i.e. files under /proc/fs/nfsd )

SteveD.

-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#11 lore raw
Quoted 7 lines · Steve Dickson

Upgrade your nfs-utils to the latest rawhide version (nfs-utils-1.0.6-31 I believe) to see if it take care of the problem. I think this has to do with the order of how mountd and rpc.imapd are started. Basically mountd has to be running before rpc.idmapd for things to work... So in the case of the server (where rpc.idmapd is already started), the nfs startup script send rpc.idmapd a signal telling it to reopen its nfsd files (i.e. files under /proc/fs/nfsd )

I do not see how rpc.idmapd has anything at all to do with NFSv2/3, it is an NFSv4ism. Also, rpc.mountd on the server is working fine, as evidenced by the rpcinfo output I included in a previous message and the fact that every other client on the network mounts filesystems from it successfully.

In other words: what the heck are you talking about? =)

Brandon D. Valentine

Signature · 12 lines
[email protected]                           http://www.geekpunk.net
Pseudo-Random Googlism:  sunshine is a great game that anyone will enjoy


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#7 lore raw
In reply to Brandon D. Valentine

På lau , 28/08/2004 klokka 02:29, skreiv Brandon D. Valentine:

Quoted 1 line

I would be happy to, but you forgot to include the debugging line. =)

Urgh. Mental note to stop sending mail on Fridays at 1:30am...

Cheers,
Trond

 nfsmount.c |    2 ++
 1 files changed, 2 insertions(+)
mount/nfsmount.c renamed from mount/nfsmount.c.orig +2 -0
@@ -310,6 +310,8 @@
 			 TIMEOUT);
 	clnt_destroy(clnt);
 	close(sock);
+	printf("Probed program %lu, vers %lu, (%s) with result %d\n",
+			prog, vers, prot == IPPROTO_UDP ? "udp" : "tcp", stat)
 	if (stat != RPC_PROGVERSMISMATCH)
 		return 1;
 
author Applied
#8 lore raw
Quoted 4 lines · Trond Myklebust

P? lau , 28/08/2004 klokka 02:29, skreiv Brandon D. Valentine:

Quoted 1 line

I would be happy to, but you forgot to include the debugging line. =)

Urgh. Mental note to stop sending mail on Fridays at 1:30am...

I know how you feel. FYI, for anyone else who wants to apply that patch, it's missing a semicolon. ;-)

I've applied this to the SRPM, built the mount binary, and got the following:

[root@scylla mount]# ./mount -t nfs reef:/export/reef/httpd/ /mnt/temp/ Probed program 100003, vers 3, (udp) with result 9
mount to NFS server 'reef' failed: server is down.

I applied the patch James Pearson also posted to this thread to the SRPM, and it allowed me to mount the filesystem.

[root@scylla mount]# ./mount -t nfs reef:/export/reef/httpd/ /mnt/temp/
Probed program 100003, vers 3, (udp) with result 9
Probed program 100003, vers 2, (udp) with result 0
Probed program 100005, vers 1, (tcp) with result 0
[root@scylla mount]# grep reef /proc/mounts
reef:/export/reef/httpd/ /mnt/temp nfs rw,v2,rsize=8192,wsize=8192,hard,udp,lock,addr=reef 0 0

Out of curiosity I just grabbed the upstream util-linux-2.12b tarball and built it and was also able to mount the filesystem no problem, so this bug definitely seems to be a bug in the RedHat SRPM. Their version of nfsmount.c is vastly different from the upstream version.

[root@scylla mount]# ./mount -t nfs reef:/export/reef/httpd/ /mnt/temp/ [root@scylla mount]# grep reef /proc/mounts
reef:/export/reef/httpd/ /mnt/temp nfs rw,v2,rsize=8192,wsize=8192,hard,udp,lock,addr=reef 0 0

Thanks for all of your help. I guess from here on out I've gotta take it up with the RPM maintainer.

Brandon D. Valentine

Signature · 13 lines
[email protected]                           http://www.geekpunk.net
Pseudo-Random Googlism:  valentine is helping to unravel the mystery of
                         how sound is interpreted 


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#9 lore raw
Quoted 12 lines · Brandon D. Valentine

On Sat, Aug 28, 2004 at 02:45:22PM -0400, Trond Myklebust wrote:

I applied the patch James Pearson also posted to this thread to the SRPM, and it allowed me to mount the filesystem.

[root@scylla mount]# ./mount -t nfs reef:/export/reef/httpd/ /mnt/temp/
Probed program 100003, vers 3, (udp) with result 9
Probed program 100003, vers 2, (udp) with result 0
Probed program 100005, vers 1, (tcp) with result 0
[root@scylla mount]# grep reef /proc/mounts
reef:/export/reef/httpd/ /mnt/temp nfs rw,v2,rsize=8192,wsize=8192,hard,udp,lock,addr=reef 0 0

Quoted 4 lines

Out of curiosity I just grabbed the upstream util-linux-2.12b tarball and built it and was also able to mount the filesystem no problem, so this bug definitely seems to be a bug in the RedHat SRPM. Their version of nfsmount.c is vastly different from the upstream version.

Yes, its definitely a bug in Redhat's version - a bugzilla comment says 'Patch added to CVS for the next util-linux package' - as yet, this doesn't seem to have been released yet.

It appears that a lot of the changes in their nfsmount.c are based on a patch that has been on Trond's site for sometime - http://client.linux-nfs.org/util-linux-2.11n.dif.gz (although, not the bit that causes it to fail to fall back to NFSv2!)

Quoted 7 lines

[root@scylla mount]# ./mount -t nfs reef:/export/reef/httpd/ /mnt/temp/ [root@scylla mount]# grep reef /proc/mounts
reef:/export/reef/httpd/ /mnt/temp nfs rw,v2,rsize=8192,wsize=8192,hard,udp,lock,addr=reef 0 0

Thanks for all of your help. I guess from here on out I've gotta take it up with the RPM maintainer.

May be someone on this list from RedHat can help ...

James Pearson

-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#12 lore raw
In reply to Brandon D. Valentine

Brandon D. Valentine wrote

Quoted 3 lines

In other words: what the heck are you talking about? =)

I thought the problem was that rpc.mount was being *unintentionally* started with the " -no-nfs-version 3" flag which I was happening in my testing of the nfs4 code Something similar to:

root 395 1 0 Aug17 ? 00:00:00 /usr/sbin/rpc.mountd --no-nfs-version 3

But I guess I was mistaken......

SteveD.

-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#13 lore raw
Quoted 8 lines · Steve Dickson

Brandon D. Valentine wrote

Quoted 2 lines

In other words: what the heck are you talking about? =)

I thought the problem was that rpc.mount was being *unintentionally* started with the " -no-nfs-version 3" flag which I was happening in my testing of the nfs4 code Something similar to:

Quoted 4 lines

root 395 1 0 Aug17 ? 00:00:00 /usr/sbin/rpc.mountd
--no-nfs-version 3

But I guess I was mistaken......

No problem. Thanks for taking the the time to respond.

BTW, I noticed you've worked on the util-linux package some recently. Can you look into whether the patch James Pearson posted in this thread will make it into Fedora Core 3 Test 2? It would be a shame for Fedora Core 3 to be released with a /bin/mount that doesn't work with NFSv2 servers, especially when the fix is so small.

Thanks,

Brandon D. Valentine

Signature · 12 lines
[email protected]                           http://www.geekpunk.net
Pseudo-Random Googlism:  summer is boom time for building


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs