Home >Operation and Maintenance >CentOS >What to do if centos disk space is insufficient

What to do if centos disk space is insufficient

藏色散人
藏色散人Original
2020-05-17 13:43:517478browse

What to do if centos disk space is insufficient

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

What to do if centos disk space is insufficient

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

 What to do if centos disk space is insufficient

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

What to do if centos disk space is insufficient

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn