These days the installation of the CentOS 6 virtual machine always prompts the file system full, at first it was assumed that the recent Oracle operation of large data volumes caused an infinite expansion of the undo TBS, and later found that the NFS cache Management Pack CACHEFILESD problem. Share:
Because it is a test virtual machine, the file system is too lazy to specifically plan, dividing only one root directory partition. (Admin remember not to commit this kind of actual production environment taboo):
[[email protected]* /]df -hfilesystem Size Used Avail Use% Mounted on/dev/mapper/vg_*-lv_root 54G 54G 0G 100% /tmpfs 3.9G 604M 3.3G 16% /dev/shm/dev/sda1 485m 32m 428m 7% /boot/dev/mapper/vg_*-lv_ home 5.5g 478m 4.8g 9% /home
Find files larger than 1g to see if there are any files that can be deleted first:
[Email protected]*/]find-size +1g./var/log/messages./var/log/messages-20170109------Output omitted------
/var/log/messages and the log with date suffix is a problem, how can it be so big? Take the file after 100 lines to see:
[Email protected]* log]tail-100 Messagesjan 16:29:42 * cachefilesd[1226]: Scan Completejan 16:29:42 * cachefilesd[ 1226]: Scan Completejan 16:29:42 * cachefilesd[1226]: Scan complete------output omitted-------
CACHEFILESD Scan Complete What the hell? Find the hero asked the mother:
http://blog.itpub.net/17203031/viewspace-1130002/
" The CACHEFILESD process is responsible for the file and directory cache management of the network file system, such as AFS and NFS Network file systems, A Cache object needs to exist on the local system . This problem is caused by a bug in the CACHEFILESD service itself, due to the incorrect log level being set internally. So every time cachefilesd is working on the scan, it will be written to the/var/log/messages log file. "
For more information, please click on the link above.
Understand, anyway is virtual machine, above did not run NFS, intranet upgrade too troublesome, simply shut down:
[Email protected]* log]service cachefilesd stop[[email protected]* log]chkconfig cachefilesd--level
Finally, save the non-CACHEFILESD log to clean up the source file:
[[Email protected]* log]grep-v cachefilesd messages-20170109 > Messages.bak[[email protected]* log]grep-v cachefiles D Messages >> messages.bak[[email protected]* log]rm-f messages-20170109[[email protected]* log]echo > messages
Finally, check again messages.
CACHEFILESD[1226]: Scan complete
The log, no words are done.
Summary: 1, the business file system must be separated from the operating system file system! 2, regular inspection and cleaning messages.
This article is from "Balsam Pear" blog, please make sure to keep this source http://golehuang.blog.51cto.com/7499/1892334
An NFS cache Management Pack bug causes file system full problems and workarounds