Subject: Re: problems with recursive removal of hierarchy that's loopback mounted from NFS
To: NetBSD-current Discussion List <current-users@NetBSD.ORG>
From: Greg A. Woods <woods@weird.com>
List: current-users
Date: 05/29/2000 12:17:25
[ On Monday, May 29, 2000 at 10:30:26 (-0500), Bob Nestor wrote: ]
> Subject: Re: problems with recursive removal of hierarchy that's loopback mounted from NFS
>
> I don't know if it's related, but I'm seeing some funny stuff with NFS 
> mounted filesystems too.  I've got the current source tree NFS mounted 
> and I'm trying to do a "make release" on a client system.  Every so often 
> I'm seeing "permission denied" on file accesses.  The build is running as 
> root and the file protections are all open.  In interactive mode the 
> offending command always succeeds.  I'm in the process of copying the 
> source tree to local storage to see if the problem is in fact NFS related.

One thing I forgot until I tried the next removal by accident on the
client instead of the NFS server is that sometimes NFS' .nfs* files get
in the way.  For example if I do a "cvs import" from the directory and
then immediately try to do a "cd ..; rm -rf $OLDPWD" I'll get:

        rm: nvi-1.79/ex: Directory not empty
        rm: nvi-1.79/include/sys: Directory not empty
        rm: nvi-1.79/include: Directory not empty
	^?

because there a zillions of .nfs* files in each subdirectory that for
some reason 'rm -rf' won't clobber (normally they would be removed).

Even an explict rm won't touch them on the client side:

$ ll .nfsA15*
229515  8 -rw-------  1 woods  ftpadmin  3369 Feb 18 22:45 .nfsA15404.4
229820 10 -rw-------  1 woods  ftpadmin  4225 Mar 13 17:10 .nfsA154e4.4
229821  8 -rw-------  1 woods  ftpadmin  3950 Mar 13 17:10 .nfsA15d64.4
$ rm -f .nfsA15*
$ ll .nfsA15*    
229515  8 -rw-------  1 woods  ftpadmin  3369 Feb 18 22:45 .nfsA15404.4
229820 10 -rw-------  1 woods  ftpadmin  4225 Mar 13 17:10 .nfsA154e4.4
229821  8 -rw-------  1 woods  ftpadmin  3950 Mar 13 17:10 .nfsA15d64.4
$ fstat .nfsA15d54.4
USER     CMD          PID   FD MOUNT      INUM MODE         SZ|DV R/W NAME
$

This might be the problem, but if so there's a transient element too
that I've not yet been able to predict.

Eventually of course the .nfs* files do disappear, and they can of
course be removed by "rm -rf" on the NFS server.

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>      <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>