I'm trying to figure out (1) how much actual space is in use on my server and (2) what will happen if I use more of it. I originally posted a version of this question on ServerFault, but they kicked me over here.
Background: I am running a server that uses virtfs (thanks to cPanel), and seeing very high disk usage compared to the amount of data actually uploaded/created by each user. I am getting warning emails telling my that I am using nearly all of my available space.
The following is the output of
df -h /:
Filesystem Size Used Avail Use% Mounted on /dev/simfs 30G 25G 5.9G 81% /
du -h / | grep "[0-9][MG]" | sort -n -r to generate a list of the paths using the most space. This was the output:
68G / 44G /home 43G /home/virtfs 11G /home/virtfs/john 11G /home/virtfs/paul 11G /home/virtfs/george 11G /home/virtfs/ringo 11G /backup 5.3G /usr 5.3G /home/virtfs/john/usr 5.3G /home/virtfs/paul/usr 5.3G /home/virtfs/george/usr 5.3G /home/virtfs/ringo/usr 5.2G /var 5.2G /home/virtfs/john/var 5.2G /home/virtfs/paul/var 5.2G /home/virtfs/george/var 5.2G /home/virtfs/ringo/var 4.6G /var/lib 4.6G /home/virtfs/john/var/lib 4.6G /home/virtfs/paul/var/lib 4.6G /home/virtfs/george/var/lib 4.6G /home/virtfs/ringo/var/lib 4.3G /home/virtfs/paul/usr/local 4.2G /usr/local 4.2G /home/virtfs/john/usr/local 4.2G /home/virtfs/george/usr/local 4.2G /home/virtfs/ringo/usr/local 3.8G /usr/local/cpanel 3.8G /home/virtfs/john/usr/local/cpanel 3.8G /home/virtfs/paul/usr/local/cpanel 3.8G /home/virtfs/george/usr/local/cpanel 3.8G /home/virtfs/ringo/usr/local/cpanel 3.0G /var/lib/mysql.orig 3.0G /home/virtfs/john/var/lib/mysql.orig 3.0G /home/virtfs/paul/var/lib/mysql.orig 3.0G /home/virtfs/george/var/lib/mysql.orig 3.0G /home/virtfs/ringo/var/lib/mysql.orig 2.6G /backup/weekly 2.2G /backup/cpbackup 2.1G /var/lib/mysql.orig/ringo_demo 2.1G /home/virtfs/john/var/lib/mysql.orig/ringo_demo 2.1G /home/virtfs/paul/var/lib/mysql.orig/ringo_demo 2.1G /home/virtfs/george/var/lib/mysql.orig/ringo_demo 2.1G /home/virtfs/ringo/var/lib/mysql.orig/ringo_demo 1.9G /cpanel_backups 1.7G /backup/monthly 1.6G /var/lib/mysql 1.6G /home/virtfs/john/var/lib/mysql 1.6G /home/virtfs/paul/var/lib/mysql 1.6G /home/virtfs/george/var/lib/mysql 1.6G /home/virtfs/ringo/var/lib/mysql 1.2G /usr/local/cpanel/bin 1.2G /home/virtfs/john/usr/local/cpanel/bin 1.2G /home/virtfs/paul/usr/local/cpanel/bin 1.2G /home/virtfs/george/usr/local/cpanel/bin 1.2G /home/virtfs/ringo/usr/local/cpanel/bin 1.1G /root
(No, my users aren't actually all named for the Beatles...) It looks like nearly all of the disk usage is due to the virtfs redundancy, such as redundant references to system files like
None of my users is actually using as much space as reported. For example, none of them alone uses the full 1.6 GB reported above for
/var/lib/mysql. And when I look at cPanel's own reports in the web interface, I see that the disk usage for these accounts ranges from essentially zero to no more than 237 MB: nowhere near the 11 GB reported.
So, my questions:
- How can I determine how much space is actually being used?
- What happens if I add another, say, 10 GB of data to the server? Will it have some sort of meltdown because
dfwill think I'm using 35 out of 30 GB? Or will everything work just fine because I'm still using less than 30 GB?
Please note: this question is not about cPanel; it's about virtfs and what tools I can use to determine my available disk space.