#23 prune-bind-mounts not working
Opened 11 years ago by maxime1986. Modified 3 years ago

I have one bind mount on the system :
{{{
% grep bind /etc/fstab
/home/max /export/max none bind 0 0
% mount | grep bind
/home/max on /export/max type none (rw,bind)
% grep bind /etc/mtab
/home/max /export/max none rw,bind 0 0
}}}

I have activated PRUNE_BIND_MOUNTS in my updatedb.conf file.
{{{
% grep BIND /etc/updatedb.conf
PRUNE_BIND_MOUNTS="yes"
}}}

but updatedb is still parsing /export/max :
{{{
% locate -r '/backup$'
/export/max/backup
/home/max/backup
/home/postgres_backup/backup
}}}

I tried removing the old database, using the "--prune-bind-mounts yes" option on updatedb… but nothing change.

I attached the output of "updatedb --debug-pruning" and my updatedb.conf file.


sudo updatedb --debug-pruning 2> debug-pruning
debug-pruning

Thanks for your report. I'm afraid the current implementation of bind mounts is incorrect (it only recognizes bind mounts where the parent directory is on the same file system). This is also tracked in https://bugzilla.redhat.com/show_bug.cgi?id=723279 .

I wasted time debugging this having carefully read the fine man page more than once. Please at least update updatedb.conf(5) and updatedb(8) to state pruning bind mounts does not work.

Login to comment on this ticket.

Metadata