Red Hat Bugzilla – Bug 110575
autofs type mounts should be excluded from /etc/cron.daily/slocate.cron
Last modified: 2007-11-30 17:10:33 EST
Description of problem:
/etc/cron.daily/slocate.cron should have "autofs" added to
it's default list of excluded types.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
I get a lot of autofs activity!
The default skips type "nfs". It should skip "autofs" as well.
Modified my install so:
/usr/bin/updatedb -f "nfs,autofs,smbfs,ncpfs,proc,devpts" -e
Can confirm this. Please add "autofs" to the exclude list.
Hm. Seems to me that excluding autofs isn't _that_ easy.
I needed the attached patch to make autofs exclusion actually work.
Created attachment 96740 [details]
Patch for slocate to correctly exclude autofs mounted filesystems
Just made an effort to confirm this patch applies to the new fc1
update slocate-2.7-4 package. Editted the slocate spec file locally
and added this as a new patch to apply. It seems to apply cleanly.
And the package rebuilds on my system. I'm setting the patch keyword.
slocate-2.7-9 now excludes autofs by default, as seen in
/etc/updatedb.conf. However, Henning's patch hasn't been applied;
The patch suggests that "/etc/mtab" isn't current (or doesn't
inidicate an autofs type?), and that "/proc/self/mounts" does.
However, I do see correct autofs entries in /etc/mtab ... perhaps
some other fix affecting /etc/mtab entries removed the need for
If there's concurrance, I believe that this enhancement bug is closed.
One nit - the man page for updatedb doesn't document the
PRUNEFS and PRUNEPATH environment vars used in /etc/updatedb.conf.
The slocate page doesn't document these variables either.
And an additional nit ... I see there is now a rpc_pipefs mounted
at /var/lib/rpc_pipes . Should this be excluded as well? I don't
see any penalty for including it, but in general it doesn't have
any useful locate information.
Ideally, rpc_pipefs should be handled by a fix for bug 123914.
Closing, please reopen if it still fails for you with autofs.
Henning's patch seems to be needed in some cases (namely, when symbolic links
are used). I've tested this on RH73, FC and RHEL might be the same, but on the
other might not (2.6 vs 2.4 kernel and all other changes might have affected how
/etc/mtab is being populated).
The case when they are needed is when symlinks are used. For example, if /home
is symlink to /export/home, than we have this in /etc/mtab:
automount(pid807) /home autofs rw,fd=5,pgrp=807,minproto=2,maxproto=3 0 0
server:/users/foobar /home/foobar nfs rw,addr=220.127.116.11 0 0
On the other hand, /proc/self/mount has a bit different picture of how things
look like (second line would probably end up wrapped into two lines):
automount(pid807) /export/home autofs rw 0 0
server:/users/foobar /export/home/foobar nfs
rw,v3,rsize=4096,wsize=4096,hard,udp,lock,addr=server 0 0
It seems that updatedb traverses autofs and nfs mounted directories without the
patch (info read from /etc/mtab), however it works correctly with the patch
(info read from /proc/self/mounts).
Just realized I was unclear on what I tested, and what I haven't. I tested on
RH73. I did not test on FC and RHEL (only assuming the problem might exist on
(In reply to comment #9)
> Just realized I was unclear on what I tested, and what I haven't. I tested on
> RH73. I did not test on FC and RHEL (only assuming the problem might exist on
This seems to work fine on FC3 (no symlinks in /etc/mtab), but slocate should
be more robust in this respect anyway; slocate-2.7-21 will handle them correctly.