Bug 110575 - autofs type mounts should be excluded from /etc/cron.daily/slocate.cron
autofs type mounts should be excluded from /etc/cron.daily/slocate.cron
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: slocate (Show other bugs)
1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Miloslav Trmač
Brock Organ
: FutureFeature, Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-11-21 09:59 EST by Bob Arendt
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version: 2.7-21
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-16 05:13:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch for slocate to correctly exclude autofs mounted filesystems (405 bytes, text/plain)
2004-01-02 07:35 EST, Henning Schmiedehausen
no flags Details

  None (edit)
Description Bob Arendt 2003-11-21 09:59:14 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):
slocate-2.6-10

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.
  
Actual results:
I get a lot of autofs activity!

Expected results:
The default skips type "nfs".  It should skip "autofs" as well.

Additional info:
Modified my install so:
/usr/bin/updatedb -f "nfs,autofs,smbfs,ncpfs,proc,devpts" -e
"/tmp,/var/tmp,/usr/tmp,/afs,/net"
Comment 1 Miloslav Trmac 2003-11-21 11:32:53 EST
Triage->Easyfix
Comment 2 Henning Schmiedehausen 2004-01-02 07:06:31 EST
Can confirm this. Please add "autofs" to the exclude list.
Comment 3 Henning Schmiedehausen 2004-01-02 07:35:11 EST
Hm. Seems to me that excluding autofs isn't _that_ easy.

I needed the attached patch to make autofs exclusion actually work.
Comment 4 Henning Schmiedehausen 2004-01-02 07:35:52 EST
Created attachment 96740 [details]
Patch for slocate to correctly exclude autofs mounted filesystems
Comment 5 Jef Spaleta 2004-02-01 15:19:44 EST
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.

Comment 6 Bob Arendt 2004-04-20 09:00:01 EDT
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
Henning's patch?

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.
Comment 7 Bill Nottingham 2004-05-21 13:26:02 EDT
Ideally, rpc_pipefs should be handled by a fix for bug 123914.

Closing, please reopen if it still fails for you with autofs.
Comment 8 Aleksandar Milivojevic 2005-04-15 11:41:52 EDT
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=1.2.3.4 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).
Comment 9 Aleksandar Milivojevic 2005-04-15 11:44:23 EDT
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
them).
Comment 10 Miloslav Trmač 2005-04-16 05:13:15 EDT
(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
> them).
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.

Note You need to log in before you can comment on or make changes to this bug.