程式扎記: [Linux 常見問題] Deleting files but disk space is still full

標籤

2016年11月25日 星期五

[Linux 常見問題] Deleting files but disk space is still full

Source From Here 
Question 
Dealing with old CentOS 5.6 box, with no lvm setup, my root file system / is full, I have cleared many old log files and application files that I don't need, which was more then 2 -5GB in size, however my system still reports that disk is full. Any idea on what I should try to do next? unfortunately rebooting the box is not an option at this time. 

How-To 
Two things might be happening here. 

First, your filesystem has reserved some space that only root can write to, so that critical system process don't fall over when normal users run out of disk space. That's why you see 124G of 130G used, but zero available. Perhaps the files you deleted brought the utilisation down to this point, but not below the threshold for normal users. 

If this is your situation and you're desperate, you may be able to alter the amount of space reserved for root. To reduce it to 1% (the default is 5%), your command would be 
# tune2fs -m 1 /dev/sda3

Second, the operating system won't release disk space for deleted files which are still open. If you've deleted (say) one of Apache's log files, you'll need to restart Apache in order to free the space.

沒有留言:

張貼留言

網誌存檔