2

I'm running a server with virtfs enabled, and seeing very high disk usage compared to the amount of data actually uploaded/created by each user. I am getting DISKWARN emails telling my that I am using nearly all of my available space, but I can't figure out why.

I ran 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 bogus, as in redundant references to system files like /var/lib/mysql/....

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 the disk usage for these accounts (in /home/username), it ranges from essentially zero to no more than 237 MB: nowhere near the 11 GB reported.

Why am I seeing redundant listings? What can I do about this?

Edit: By request, the following is the output of df -h /:

Filesystem      Size  Used Avail Use% Mounted on
/dev/simfs       30G   25G  5.9G  81% /

Please note: this question was closed because it mentioned cPanel. The question is not about cPanel; it's about virtfs and what tools I can use to determine my available disk space. My server happens to run cPanel, but cPanel did not cause the issues above. I have found an answer that does not involve cPanel or cPanel tools, and I will happily post it here if the question is reopened. In the meantime, in the interest of being helpful, I have posted a version of that answer here.

3
  • Thanks for adding the df -h / ... being unfamilar with virtfs, I was wondering whether using virtfs itself causes one or more mount points (such as /home/virtfs, I'm speculating) to appear in the complete output of df -h. Dec 14, 2014 at 17:13
  • This might be something that can be solved pretty quickly by the folks at Unix and Linux, for example, this question. Looking into the documentation on VirtFS, it looks like these might be hardlinks, not symlinks. Jan 13, 2015 at 18:45
  • @HopelessN00b Thanks; I will try the suggestions in response to that post and will try posting my question over there if necessary.
    – elixenide
    Jan 13, 2015 at 18:47

1 Answer 1

3

VirtFS is used for jailed shell access on your various cpanel accounts:

https://documentation.cpanel.net/pages/viewpage.action?pageId=363754

The VirtFS doesn't actually count toward disk space since they're all basically symlinks.

Do NOT delete this folder if jailed shells are mounted-- it will delete all of the files inside and could damage your server's functionality.

The used disk space reported on /var/lib/mysql is the total disk space used by all your cPanel accounts together.

1
  • Thanks. Can you point me to documentation supporting your statement, "The VirtFS doesn't actually count toward disk space since they're all basically symlinks?" I have read this, but I can't find anything authoritative on that point. Also, part of my question is this: how do I find out how much space is actually being used by the system plus all accounts (not just the MySQL storage)?
    – elixenide
    Jan 1, 2015 at 16:49

Not the answer you're looking for? Browse other questions tagged .