[OpenAFS-devel] Why find do not work on afs???

Steve Simmons scs@di.org
Fri, 11 Feb 2005 11:22:45 -0500


Vitaly et al -

Terry Gliedt forwarded your note to me.  I've recently (like, er, this
Tuesday) volunteered to support/develop/test some AFS features for
GNU find, and can answer some of your questions.

First and foremost, it depends on which version of 'find' you are
using.  Sun/Solaris find does one thing, recent GNU finds do another,
and GNU finds that someone has managed to activate the AFS features
for do yet a third.  The comments from Chris Huebsch and Rainer Schöpf
are accurate, and I recommend judicious use of -noleaf rather than
-follow.  However, I believe that if you have circular volume mounts
you'll get some surprising results, including possible near-infinite
recursion or early abort of find.  Neither is an acceptable result.

Currently GNU find will not build the AFS extensions even when asked
with --with-afs.  The attached modifes ./configure so that if you do
    ./configure --with-afs
on a Transarc AFS system, the '-fstype afs' feature will be properly
enabled.  This patch is for findutils-4.2.15 and alpha versions 4.2.16
and 4.2.17 (the most recent alpha).  4.2.15 is available at
ftp:ftp.gnu.org//gnu/findutils, .16 and .17 are available at
ftp:alpha.gnu.org//gnu/findutils.

GNU find gives a bogus error message about symlinks on circular AFS
mounts when AFS is enabled during the build.  It complains:
  <name> changed during execution of ./find (old inode number X, \
      new inode number Y, filesystem type is afs)>...
where X and Y are inode numbers.  Find then halts.  This is on my
'to be fixed' list.

If there is another minor release of GNU find (and if it happens a
month or more from now), the configuration script will be fixed
such that -with-afs will work correctly and maybe not even be
needed.  That means that '-type afs' will work correctly.  In addition
there will be a new switch similar to -mount but specific to AFS
volumes.  It remains to be seen if we should make -mount also
detect AFS volumes; feedback from AFS developers welcomed:

Other near-term things on my TODO list -

  o  -volname, analogous to -name but matches on the volume
     name.  Useful with -prune to exclude .backup volumes, etc.
  o  -cellname, analogous to -name but matches on the cell name
     of a volume.  Useful with -prune to avoid crossing cell
     boundaries, or to find mounts to external cells.

I hope to have both of these implemented with the next release
of GNU find, be that major or minor.  If any of you are interested
in testing it, please let me know.  The ./configure fix will actually
be the harder part, so the greater the breadth of sites it's tested
at, the better.

Longer term, I'm mulling over:

  o  Something analogous to -perm but for AFS acls.
  o  Extensions to -printf to handle things like acls.

Again, comments welcomed. 

Steve
-- 
"In my darker moments I consider creating the eeyore fan club with a theme
song by Leonard Cohen, logo by Edvard Munch and costumes by Tim Burton."
   -- anonymous, forwarded by Ellen.