I was browsing around my server and noticed a directory named virtfs in /home. I did a du -sh on it and realized it was taking up 11GB. Why? Is it safe to delete this directory? What is the purpose of this directory?
Do you have a virtual machine installed on your computer? That would be consistent with a massive file.
/home/virtfs contains hard links to your system resources for jailshell settings. Thought it will display it takes 11 gigs, you do not need to worry. It takes up no more than a simple link or folder.
DO NOT TOUCH IT!
Removing the folder will take your system down, for good. You will need to reimage your server.
Virtfs is actually created by cpanel, and the space represents the destination it links to.
Think of the WWW link in your directory for a website, its actually public_html. Only difference is, if you remove www, you remove a link, if you remove virtfs, you delete needed system files.
Edit: Also, if you are running a backup, you should exclude this, as it will back up files you dont need, unless you delete them.
If you delete it, you will instantly realize cpanel/whm goes down, all your accounts go to 500 server errors, you get kicked out of ssh, and wont be able to get back in, and there is no way to fix it.
Checkout my new forum! http://adminreference.com/
I've seen this directory before and wondered specifically what its purpose was. So Justin, what you are saying is that it is a bunch of symbolic links to other files and directories?
/home/virtfs is used to chroot users into a jailed shell. Cpanel hard links system files to it, they are all real live files.
If a user is reporting double the quota and it is from /home/virtfs then we need to umount or kill and hanging jailshell process. To do this run
If there are no jailshell processes then runps aufx |grep user |grep jailshell
It will show,cat /proc/mount
You will need to unmount each of these by running/dev/root /home/virtfs/user/lib ext3 rw,data=ordered,usrquota 0 0
/dev/sda2 /home/virtfs/user/usr/lib ext3 rw,data=ordered,usrquota 0 0
/dev/sda2 /home/virtfs/user/usr/sbin ext3 rw,data=ordered,usrquota 0 0
/dev/sda2 /home/virtfs/user/usr/share ext3 rw,data=ordered,usrquota 0 0
/dev/sda2 /home/virtfs/user/usr/bin ext3 rw,data=ordered,usrquota 0 0
/dev/sda2 /home/virtfs/user/usr/man ext3 rw,data=ordered,usrquota 0 0
/dev/sda2 /home/virtfs/user/usr/X11R6 ext3 rw,data=ordered,usrquota 0 0
/dev/sda2 /home/virtfs/user/usr/kerberos ext3 rw,data=ordered,usrquota 0 0
/dev/sda2 /home/virtfs/user/usr/libexec ext3 rw,data=ordered,usrquota 0 0
/dev/sda2 /home/virtfs/user/usr/local/bin ext3 rw,data=ordered,usrquota 0 0
/dev/sda2 /home/virtfs/user/usr/local/share ext3 rw,data=ordered,usrquota 0 0
/dev/sda2 /home/virtfs/user/usr/local/Zend ext3 rw,data=ordered,usrquota 0 0
/dev/sda2 /home/virtfs/user/usr/include ext3 rw,data=ordered,usrquota 0 0
/dev/sda2 /home/virtfs/user/usr/local/lib ext3 rw,data=ordered,usrquota 0 0
/dev/sda3 /home/virtfs/user/var/spool ext3 rw,noatime,nodiratime,data=ordered,usrquota 0 0
/dev/sda3 /home/virtfs/user/var/lib ext3 rw,noatime,nodiratime,data=ordered,usrquota 0 0
/dev/sda3 /home/virtfs/user/var/run ext3 rw,noatime,nodiratime,data=ordered,usrquota 0 0
/dev/sda3 /home/virtfs/user/var/log ext3 rw,noatime,nodiratime,data=ordered,usrquota 0 0
/dev/sda6 /home/virtfs/user/tmp ext3 rw,nosuid,nodev,noexec,data=ordered 0 0
/dev/root /home/virtfs/userbin ext3 rw,data=ordered,usrquota 0 0
and so onumount /home/virtfs/user/tmp
You can also run
donefor i in `cat /proc/mounts |grep virtfs |grep user |awk ‘{print$2}’`; do umount $i;
Make sure to replace user with the cpanel username in the above command. This will then clear up the files in /home/virtfs and the quota should return to normal.
Checkout my new forum! http://adminreference.com/
Excellent explanation.
Wow, excellent explanation. Thanks!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks