NFS problems?

Matt Brown (matt@billy.eigen.co.uk)
Thu, 14 Aug 1997 10:31:15 +0100


I sent a quick mail a few days ago to this list about NFS problems I
was experiencing, without much detail as I hadn't time to look into
it. I've now got a bit more information, so here it is. I don't
unfortunately know much about how NFS works, so I can't tell what
causes the problem.

(if there's a better place to send this than linux-kernel, please
inform me!)

The problem I noticed was that the RCS command 'ci -u <filename>'
wouldn't work on NFS mounted files under 2.1.4[89], though it worked
OK on 2.0.27. Here's (abbreviated) 'strace' output for the important
part of the command under both systems. 2.0.27 first:

readlink("RCS/import.pl,v", 0xbffff724, 255) = -1 EINVAL (Invalid argument)
open("RCS/,import.pl,", O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0444) = 3
open("RCS/import.pl,v", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0555, st_size=51124, ...}) = 0

Here the lockfile 'RCS/,import.pl,' is opened successfully, and the
command works. Here's what happens under 2.1.49:

readlink("RCS/import.pl,v", 0xbffff71c, 255) = -1 EINVAL (Invalid argument)
open("RCS/,import.pl,", O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0444) = -1 EACCES (Permission denied)
stat("RCS/,import.pl,", {st_mode=S_IFREG|0444, st_size=0, ...}) = 0

Here, the open fails, and the command doesn't work. Despite this, the
file *is actually created on the server*.

Here's a log of the kernel messages generated with NFS and RPC logging
turned on in the kernel under 2.1.49:

Aug 14 10:19:30 billy kernel: NFS call lookup import.pl,v
Aug 14 10:19:30 billy kernel: RPC: diropres status 0
Aug 14 10:19:30 billy kernel: RPC: diropres OK type 1 mode 100555 dev 800008 ino 3e647
Aug 14 10:19:30 billy kernel: NFS reply lookup: 0
Aug 14 10:19:30 billy kernel: NFS: mtime change on 6/255559
Aug 14 10:19:30 billy kernel: NFS call lookup ,import.pl,
Aug 14 10:19:30 billy kernel: RPC: diropres status 2
Aug 14 10:19:30 billy kernel: NFS reply lookup: -2
Aug 14 10:19:30 billy kernel: NFS call create ,import.pl,
Aug 14 10:19:30 billy kernel: RPC: diropres status 0
Aug 14 10:19:30 billy kernel: RPC: diropres OK type 1 mode 100444 dev 800008 ino 3e641
Aug 14 10:19:30 billy kernel: NFS reply create: 0
Aug 14 10:19:30 billy kernel: NFS: mtime change on 6/255553
Aug 14 10:19:30 billy kernel: NFS: invalidate dircache for 6/255527
Aug 14 10:19:30 billy kernel: NFS call setattr
Aug 14 10:19:30 billy kernel: RPC: attrstat status d
Aug 14 10:19:30 billy kernel: NFS reply setattr
Aug 14 10:19:30 billy kernel: NFS: revalidating 6/255553 inode
Aug 14 10:19:30 billy kernel: NFS call getattr
Aug 14 10:19:30 billy kernel: RPC: attrstat status 0
Aug 14 10:19:30 billy kernel: RPC: attrstat OK type 1 mode 100444 dev 800008 ino 3e641
Aug 14 10:19:30 billy kernel: NFS reply getattr
Aug 14 10:19:30 billy kernel: NFS: mtime change on 6/255553
Aug 14 10:19:30 billy kernel: NFS: nfs_invalidate_pages(6/255553)
Aug 14 10:19:30 billy kernel: NFS: inode 6/255553 revalidation complete (status 0).

Can anyone make sense of what's going on? I'm going to continue to
look into it, but since my knowledge of NFS and RPC operations is
scant it's going to take a while.

-Matt