Casbay Knowledge Base

Search our articles or browse by category below

Server Hard Disk Full? A Quick Guide

Last modified: October 1, 2022
Estimated reading time: 1 min

Server Hard Disk Full? A Quick Guide

Hi, if you are facing this problem:

Server Hard Disk Full.

For server administrators, it is essential to maintain your server upkeep in terms of the hard disk space. When the server hard disk full, there will be a serious downtime that will happen to your server.

The most important sign when the hard disk is full, you will start getting complaints that email service is down and customers unable to login to WHM/cPanel. Usually, you will get this error when trying to login:

====================================

Sorry for the inconvenience!

The filesystem mounted at /home/username on this server is running out of disk space.

cPanel operations have been temporarily suspended to prevent something bad from happening.

lease ask your system admin to remove any files, not in use on that partition.

====================================

Please bear in mind that when it comes to this situation, your ONLY choice is to urgently clear the hard disk space by remoting to the server using a telnet client application.

Once Inside

So once you are inside, go to / and run the command below:

This will display the overall hard disk usage of your server. 

Next, type the command below:

Identify file or folder

You can then select the folder that has the biggest size and continue running the “du -sh *” command until you are able to identify the files or folders.

To remove the files or folders, you can use the commands below:

========================

1. rmdir command – Deletes the specified empty directories.

2. rm command – Delete the file including sub-directories. You can delete non-empty 

========================

If you are having a problem executing the command above, you can execute this command instead “rm -rf foldername” But please be careful while using this command since it will not ask for any confirmation before deleting.

Most common folders or files that you can check for removal:

======================

/backup/

/home/backup/

/home/username/public_html/error_log

/var/log/

/var/lib/mysql/serverhostname.err

======================

Have a nice day!

If you are interested in the topic: Linux Operating System, you can find more articles like this from our Knowledge Base.

Was this article helpful?
Dislike 0
Previous: Disable Automatic Updates on Server 2016
Next: HOW TO: Test Apache and PHP configuration