Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Mar 1997 19:46:45 +0100
From:      j@uriah.heep.sax.de (J Wunsch)
To:        hackers@freebsd.org
Cc:        dfr@freebsd.org
Subject:   NFSv3 (was: Maybe a showstopper...)
Message-ID:  <19970311194645.GS08931@uriah.heep.sax.de>
In-Reply-To: <Pine.BSF.3.95q.970311110509.23141G-100000@fallout.campusview.indiana.edu>; from John Fieber on Mar 11, 1997 11:11:33 -0500
References:  <Pine.NEB.3.95.970310211652.24717A-100000@mail.cdsnet.net> <Pine.BSF.3.95q.970311110509.23141G-100000@fallout.campusview.indiana.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
As John Fieber wrote:

> I'm not NFS expert, but I'll describe one problem I have with the
> 2.2 branch.  The situation is a Solaris client mounting a disk
> from my FreeBSD box.  On a large directory tree, doing an `rm -r'
> on the Solaris box misses files.  It takes multiple invocations
> of `rm -r' to actually clean everything out. 

Now, this was a good description, and something reproducible:

rm: Unable to remove directory ld/testsuite/lib: File exists
rm: Unable to remove directory ld/testsuite: File exists
rm: Unable to remove directory ld: File exists

etc.

Note that this does only happen when using the (default) NFSv3
protocol.  If you mount NFSv2 (-o vers=2), the rm -rf works okay.

That's a piece of the appropriate truss log of the rm -r on the Sun:

getdents(7, 0x00025220, 1048)                   = 48
lstat("ld.exp", 0xEFFFF728)                     = 0
unlink("ld.exp")                                = 0
getdents(7, 0x00025220, 1048)                   Err#22 EINVAL
close(7)                                        = 0
chdir("..")                                     = 0
rmdir("lib")                                    = 0
getdents(6, 0x00024DF0, 1048)                   Err#22 EINVAL
close(6)                                        = 0
chdir("..")                                     = 0
rmdir("testsuite")                              = 0
getdents(5, 0x000233A8, 1048)                   Err#22 EINVAL
close(5)                                        = 0
chdir("..")                                     = 0
rmdir("ld")                                     Err#17 EEXIST

The EINVALs are our problem...  Here's the tcpdump log of the very
same part.  I have removed the timestamps for brevity, since they
aren't relevant here anyway.  Note that the readdirplus calls yield an
error 10003.

Doug, can you make any sense out of this?

sunny.9dca8c93 > freeboy.nfs: 124 readdirplus fh 4,12/1 1048 bytes @ 0 (DF)
freeboy.nfs > sunny.9dca8c93: reply ok 592 readdirplus
sunny.9dca8c94 > freeboy.nfs: 112 remove fh 4,12/1 ld.exp (DF)
freeboy.nfs > sunny.9dca8c94: reply ok 144 remove
sunny.9dca8c95 > freeboy.nfs: 120 readdir fh 4,12/1 1048 bytes @ 512 (DF)
freeboy.nfs > sunny.9dca8c95: reply ok 116 readdir ERROR: 'Unknown error: 10003'
sunny.9dca8c96 > freeboy.nfs: 108 rmdir fh 4,12/1 lib (DF)
freeboy.nfs > sunny.9dca8c96: reply ok 144 rmdir
sunny.9dca8c97 > freeboy.nfs: 120 readdir fh 4,12/1 1048 bytes @ 512 (DF)
freeboy.nfs > sunny.9dca8c97: reply ok 116 readdir ERROR: 'Unknown error: 10003'
sunny.9dca8c98 > freeboy.nfs: 116 rmdir fh 4,12/1 testsuite (DF)
freeboy.nfs > sunny.9dca8c98: reply ok 144 rmdir
sunny.9dca8c99 > freeboy.nfs: 120 readdir fh 4,12/1 1048 bytes @ 1024 (DF)
freeboy.nfs > sunny.9dca8c99: reply ok 116 readdir ERROR: 'Unknown error: 10003'
sunny.9dca8c9a > freeboy.nfs: 108 rmdir fh 4,12/1 ld (DF)
freeboy.nfs > sunny.9dca8c9a: reply ok 144 rmdir ERROR: 'Directory not empty'

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970311194645.GS08931>