Out of Space?
When I access the account list in my WHM and check the "disk used" section, it shows that all my websites together use about 40GB of space. However, the server information indicates that a total of 160GB is currently in use, which is the full capacity of my hard drive. This discrepancy is concerning. How can I identify and delete unnecessary files or data that are taking up space on my hard drive so that I can free up some storage? What is consuming all of my space?
Current Disk Usage | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Filesystem Size Used Avail Use% Mounted on devtmpfs 7.6G 0 7.6G 0% /dev tmpfs 7.7G 0 7.7G 0% /dev/shm tmpfs 7.7G 8.8M 7.7G 1% /run tmpfs 7.7G 0 7.7G 0% /sys/fs/cgroup /dev/sda2 160G 160G 13M 100% / /dev/loop0 3.9G 2.8M 3.7G 1% /tmp |
-
If you SSH into the server as root (or open Terminal in WHM), you can then run:
du / -h --max-depth=1
which will list all the folders in the root directory (/) with a human readable file size (-h) just one directory deep (the max-depth). Doing it from root will throw up a few "cannot access /proc..." warnings which can be ignored.
Your largest directories will probably be /backup (if you've configured your backup to backup to the same drive - not a good idea), /home (where the user folders are kept) and then /var (where logs, MySQL data and the like is kept).
These figures will not necessarily total the "Usage" shown in the WHM Disk Usage (aka "df -h") as symlinks and the virtual file system (/home/virtfs) will cause "fake duplicates" and transient files (such as temporary files/emails etc) may be present at one point and not the next.
If you need more information, you can either re-run with a specific directory:
du /home/ -h --max-depth=1
(for example, to see whose user account is the largest - the "virtfs" directory should be ignored as it isn't actually a "real directory" but how WHM helps isolate users from each other, but it contains a lot of symbolic links [symlinks] which will cause it to look a lot larger than it really is)
or
du /var/ -h --max-depth=2
to list all the directories in /var/ and their immediate child directories (max-depth=2) and the associated directory/folder sizes.
0
Please sign in to leave a comment.
Comments
1 comment