-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
rhel-8.9.0
-
None
-
Moderate
-
rhel-sst-cs-plumbers
-
ssg_core_services
-
None
-
False
-
-
None
-
None
-
None
-
None
-
-
All
-
None
What were you trying to do that didn't work?
Even with "nfs4" and "nfs" removed from from PRUNEFS in /etc/updatedb.conf , mlocate-updatedb service does not update the DB with files in NFS mounts.
A direct call of updatedb effectively adds files on NFS mounts to the DB.
https://bugzilla.redhat.com/show_bug.cgi?id=1365662
Please provide the package NVR for which bug is seen:
mlocate-0.26-20.el8.x86_64
How reproducible:
Always
Steps to reproduce
- Remove nfs nfs4 from PRUNES in /etc/updatedb.conf
- add files in NFS mounts
- Wait for mlocate-updatedb service to execute
Expected results
- Files in NFS mounts are excluded
The issue is due to the file call by the service: /usr/libexec/mlocate-run-updatedb
nodevs=$(< /proc/filesystems awk '$1 == "nodev" && $2 != "rootfs" && $2 != "zfs" { print $2 }')
/usr/bin/updatedb -f "$nodevs"
nfs and nfs4 appear with nodev in /proc/filesystems, so they are excuded.
The filter should be:
nodevs=$(< /proc/filesystems awk '$1 == "nodev" && $2 != "rootfs" && $2 != "zfs" && $2 !~ "nfs" { print $2 }') * Workaround, override the service file with:
systemctl edit mlocate-updatedb.service
{{}}
[Service]
ExecStart=
ExecStart=/bin/sh -c /usr/bin/updatedb --debug-pruning -f $(awk '$1 == "nodev" && $2 != "rootfs" && $2 != "zfs" && $2 !~ "nfs" { print $2 }' /proc/filesystems)
BZ on fedora: