cPanel Disk Space Full ? Here’s How to Find Top Disk Space Users in cPanel/WHM And Solve it.
Today, we are going to discuss one of the most disastrous issues that come up with cPanel, especially on cPanel servers.
When your Disk Space is Full, cPanel completely stops working and starts throwing errors on logins(Refer Below), so Logging into the WHM and check out via “List Accounts” is not an option.
The filesystem mounted at /home/ 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.
When you cPanel installation shows such errors, It is time that you follow the guide and solve your issue –
All the userdata in cPanel(Files and Folders) are stored in the /home/ directory and it is one of the most obvious reason for cPanel for throwing above error.
To check which users are using the most space Run this command once you have logged in to SSH –
du -hsx /home/* | sort -rh | head -10
It will take some time to show up the result of Top 10 Disk Hoggers on your Shared cPanel server.
Let us consider that the top user was “user1”.
Most of the times, It is the zip files and trash folder inside the cPanel hogging the space.
So go to the user’s directory by running this command –
Now you can search for zip files around and delete them.
To Empty User’s Trash Folder –
rm -rf *
You’ll probably need to do it for the top 2-3 users, and your server will be fine and running well.
If Incase there are no zips and you want to investigate more files inside a particular user, You can use the following command to check top folders inside the user’s directory and move ahead stepwise –
du -hsx /home/user1/* | sort -rh | head -10
Now you can consider that “folder1” is taking up most of the space, you can investigate further by using –
du -hsx /home/user1/folder1/* | sort -rh | head -10
Using this way, You can look for the file/folder using most of the space on your server and by deleting it if it is unusable you can make your server up and functional in a very less amount of time.