This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 221755 - updatedb doesn't skip bind mounts
updatedb doesn't skip bind mounts
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: mlocate (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Miloslav Trmač
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-01-07 09:41 EST by Axel Thimm
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-03-05 21:12:46 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Axel Thimm 2007-01-07 09:41:40 EST
When bind mounts are present updatedb enters them and lists the files several
times. Currently only modifying PRUNEPATHS seems to help.

Is there a better way to skip bind mounts w/o having to explicitely maintain a
list of them? If not is it worth while adding such a check to mlocate? Thanks!
Comment 1 Miloslav Trmač 2007-02-27 16:26:01 EST
Thanks for your report.

I have seen bind mounts used in both of these ways:
a) mount --bind /home /path/to/chroot/home
b) mount --bind /mnt/big_disk /home/big_user

For a) the right thing is to ignore the destination, for b) to ignore the
source.  I don't think mlocate can automatically determine what it should do.
Comment 2 Axel Thimm 2007-02-27 18:36:06 EST
Always ignore the destination. The same argument could be brought forward for
symlinks, in fact usecase b) should seriously consider using symlinks or
directly mounting big_disk's device into /home/big_user.

Even for b) the admin will be grateful for not hammering his big_disk multiple
times. And with systems that do this multiple times (think of Fedora build
servers bind-mounting whole kernel-src trees into chroots or any other chroot
setup like http, ftp etc. bind-mounting the contents) you actually stall the
system into updatedb until noon (and that's on FC-SAN).

Since this is actually killing servers, I'm not considering this a feature
request anymore, but indeed a bug. At the very least it should be up to the
admin to decide on whether to follow bind-mounts or not. Currently the options
are no updatedb at all of nfs-mounting from localhost instead of bind-mounts,
which kills performance.
Comment 3 Miloslav Trmač 2007-03-05 21:12:46 EST
Thanks, I didn't realize there are legitimate cases of bind mounting the same
subtree ten or more times.

mlocate-0.16 has PRUNE_BIND_MOUNTS; disabled by default upstream, but enabled in
the Fedora package.
Comment 4 Axel Thimm 2007-03-06 07:53:52 EST
Thanks a ton, Miloslav, I'm going to test it on the FC6 setups by rebuilding the
src.rpm there.

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