Function to retrieve the location of the file at high speed is provided in Linux as the locate command. The updatedb command is periodically executed to update the file name database used by this function. The updatedb command retrieves the file on each file system, and updates the file name database.
See
For details about the updatedb and locate commands, see the following online manual pages.
[RHEL6] updatedb(1L) and locate(1L)
[RHEL7] updatedb(8) and locate(1L)
While the updatedb command is executed to look for GFS Shared File System, file access performance can deteriorate considerably. To evade it, it is recommended to set up not to register the files on GFS Shared File System to the file name database.
Note
The file on the GFS Shared File System cannot be retrieved by the locate command when setting up it.
So as not to register the files on the GFS Shared File System to the file name database, add "sfcfs" to PRUNEFS parameter (specifies the file system excluded from the retrieval object by the updatedb command) defined in /etc/updatedb.conf. It must be set up on all nodes which share the GFS Shared File System. The following shows an example of setting.
# cat /etc/updatedb.conf PRUNE_BIND_MOUNTS = "yes" PRUNEFS = "9p afs anon_inodefs auto autofs bdev binfmt_misc (text omitted) tmpfs ubifs udf usbfs sfcfs" PRUNENAMES = ".git .hg .svn" PRUNEPATHS = "/afs /media /mnt /net /sfs /tmp /udev /var/cache/ccache /var/lib/yum/yumdb /var/spool/cups /var/spool/squid /var/tmp" |
When the files on the GFS Shared File System is registered to the file name database, deterioration in the file access performance can be reduced while the updatedb command operates by setting as follows.
Set the execution time of the updatedb command to when GFS Shared File System is accessed fewer according to the user operation.
Adjust the execution time of the updatedb command to avoid executing the updatedb command simultaneously by the nodes which shared GFS Shared File System.
Usually, the updatedb command is executed by the file that exists on the /etc/cron.daily directory. The execution time of /etc/cron.daily is specified in /etc/anacrontab. Change the settings of /etc/anacrontab as necessary.
See
For details of the contents of /etc/anacrontab, see anacrontab(5).