If you notice you are not able to connect to your cPanel, Webmail, or WHM and your website is slow and giving errors, your server may be maxed out on the disk space. A common error you may see is like the following when going to your cPanel.

Sorry for the inconvenience!
The filesystem mounted at / on this server is running out of disk space. 
cPanel operations have been temporarily suspended to prevent something bad from happening. 
Please ask your system admin to remove any files not in use on that partition. 

Important! This is for VPS or Dedicated server customers only. If you are getting this error and you are not on a VPS or a Dedicated server, you will need to contact tech support to have our systems support check the server disk space.

You can check your Disk space usage through shell or you can check the disk space through the WHM. The purpose of this article is to show you how to check the disk space through shell.

How to view your overall disk size and usage

Checking disk space through Shell

You can check your disk space usage through the Shell Command line by typing the following command in your shell client.

df -h

You will get a similar to the following output.

root@vps#### [~]# df  -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/vzfs              39G   38G  858M  98% /
none                  512M  4.0K  512M   1% /dev

This Output shows that out of the 39 gigs of total disk space, 38 gigs are used with 858mb of space left over. This leaves the server at 98% disk space. This is enough to cause cPanel login failures, FTP file upload errors, and slow website issues. At this point you will need to remove some of the files from the server to bring the server back to normal operation.

Using the Web Host Manager

If you are not familiar with using command line, you can look at your disk space usage through the WHM . The WHM will show you the accounts with the highest usage. For more information on checking your Disk space through WHM, see our article on How to Monitor Disk Space and Bandwidth Usage in WHM. Unfortunately, you cannot remove files through the WHM, you will need to access the cPanel File Manager for the account that has the large disk space usage and remove the files / folder through File manager.

 

How to find files with a certain size

There are two commands you can use to check which folder files are taking up your disk space. You can use the "find" or the "du" command. Below explains the two commands you can use.

Important! You must have permission to access the files you are searching for. If not you will get permissions errors.

Finding all file sizes with the "du" command

The following command will display all files and folders sorted by MegaBytes.

du --max-depth=1 | sort -n | awk 'BEGIN {OFMT = "%.0f"} {print $1/1024,"MB", $2}'

You should see an output of all your folders with the size of them in megabytes similar to the following:

0 MB ./.htpasswds
0 MB ./.trash
0 MB ./public_ftp
0 MB ./etc
0 MB ./.fontconfig
0 MB ./.cpanel
0 MB ./mail
4 MB ./tmp
1173 MB ./public_html
1224 MB .

This output shows that all files over 1 MB are in the /public_html. You can run this command on a directory basis to find folders that are large. Also, this command can be customized to refne your search.

Finding specific file sizes using the "find" command

Below is the "find"command that looks for specific files in the "home" directory. The following script is finding files that are 500000k or larger

find /home -type f -size +500000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'

The previous command will output a similar result like the following.

/home/userna5/public_html/error_log: 514M
/home/userna5/backup-userna5.tar.gz: 738M

Here you can see that there is a backup that is 738MB large. You can find your backup files that are no longer needed and remove them to free up space.

If you cannot fix the disk space issue on your server, you can have tech support look into the matter for you. If you do not have any space to free up and cannot find files to remove, you can always upgrade your hosting plan to a plan with a larger disk.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Like this Article?

Comments

Post a comment
n/a Points
2014-03-05 9:40 am

Perfect!Thanks for the tutorial!

n/a Points
2014-04-27 1:03 am

Very useful. THis helped me find folders with lots of useless chuncks of data

n/a Points
2014-07-10 10:25 pm

Very helpful. Thanks for the info.............

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

News / Announcements

WordPress wp-login.php brute force attack
Updated 2014-07-17 06:43 pm EST
Hits: 201633

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!