How to clear or unmount cPanel jailed virtfs mounts?

You may see /home/virtfs taking a lot of disk space on the server or you may see a lot of virtfs mounts in /proc/mounts. In order to unmount these virtual file system mounts, you need to understand that, virtfs is an filesystem environment for normal users to see fake mounts of server. This is good way to jail the users from access server's actual mounts. So you are fine using cPanel virtfs, however, make sure you don't remove these mounts using rm -rf command, that will end up removing original files on server since they are hard linked. 

First, check list of virtfs mounts, run command:
cat /proc/mounts | grep "/home/virtfs"

To unmount all these user mounts, run following command:
for i in `cat /proc/mounts | grep /home/virtfs | cut -d ' ' -f 2 ` ; do umount $i ; done

The above for loop greps virtfs and cuts second row of the /proc/mounts file & appends to umount them. So, you are only unmounting fake mounts of customers. If you are a cPanel user, you can use their script:
/scripts/clear_orphaned_virtfs_mounts  . If this doesn't work, of course the above command should work for you. 


 

  • cpanel, virtfs, fake, jail
  • 502 Users Found This Useful
Was this answer helpful?

Related Articles

Understanding Email Services

MUA: Mail User Agent (email client): The MUA is the front-end for the end user to manage and read...

Understanding POP, IMAP, Dovecot

Dovecot is an open source IMAP and POP3 email server for Linux/UNIX-like systems, written with...

Installing Exim on Cent OS 6.x / 7.x

Operating System: Cent os 6.x / 7.xHostname: hostname [not a registered domain name, but you can...

Introduction of Exim MTA

Exim is a mail transfer agent (MTA) for hosts that are running Unix or Unix-like operating...

Understanding and Reading an Exim Maillog

Reading exim log can be a confusing or complicated at first, however, having understanding of...

Powered by WHMCompleteSolution