/home/virtfs consuming a lot of space?

May 2, 2011 by: Akhthar Parvez

/home/virtfs is the directory created by cpanel to provide a restricted data access to jailshell users. When a user is logged in via jailshell, a virtual fileystem is created for the cpanel user by mounting only the selected filesystems under /home/virtfs/ so the user can (only) access the data under these filesystems.

Since the data in /home/virtfs/ is pointed to the actual data, system would show the aggregate amount of data mounted under /home/virtfs/ if you perform a du. So do not perform a du under /home/virtfs if any user is logged in as ssh and never try to remove the data from this directory as that would cause the data to be removed from their actual location.

Sometimes, system wouldn’t unmount some or all of the filesystems properly from /home/virtfs/ even if the user is logged out from jailshell. And you can guess what would happen in such cases; du would show that directory is consuming a lot of space.

Check if there’s any jailshell process running and if so, kill the process. If none, you may run the following bash one liner in order to fix this issue:

for i in `cat /proc/mounts|awk '/virtfs/ {print $2}'`; do umount $i;done

Run du again and you should see that /home/virtfs is hardly consuming any space at all. 🙂

Filed under: cPanel,Filesystem
Tags: , ,

Leave a Reply

You must be logged in to post a comment.