What should I do if there is insufficient disk space in centos?
1 df -ah Display/root directory occupies 90%
Enter the root directory to query the capacity of the specified folder
cd / du -sh * | sort -n
The disk size is 50G, and the files totaling about 10G cannot be found
2 I am affected by it, I have cleaned up the log, but the space is It is still not released, so I suspect it is a process occupation problem
Query the deleted files and files occupied by the process through commands
lsof | grep delete
3 Query For specific services, just find the corresponding service and restart it
ps -ef | pid号
Find a few services, restart them one by one, and handle them according to the specific situation
systemctl restart rsyslog systemctl restart gmain systemctl restart zabbix-agent systemctl restart cloudera-scm-agent
4, Finally check
lsof | grep delete
No more occupied files
df -ah
The occupied space has been released
Recommended: "centos Tutorial》
The above is the detailed content of What to do if centos disk space is insufficient. For more information, please follow other related articles on the PHP Chinese website!