VIRTFS consuming a lot of space ( CPanel )

June 7, 2014 16.6k views
Hello, Can you help me to clear VIRTFS folder ? Currently its consuming 6.3GB only for one user ( there exists only this user ) like this: root@host [/home]# du -h --max-depth=1 579M ./user1 4.0K ./cprestore 286M ./cpeasyapache 85M ./user2 16K ./clamav 1008K ./.cpcpan 36K ./.cpanm 6.3G ./virtfs 725M ./user3 16K ./munin 124M ./user4 16K ./varnish 28M ./.cpan 4.0K ./cPanelInstall 8.1G . ---------------------------------- root@host [/home/virtfs]# du -h --max-depth=1 6.3G ./user3 4.0K ./_lock 6.3G . ---------------------------------- I don't have any Jailed Shell enabled. I know if I delete this folder will delete real files of this user, so I wanna know a secure wat to clean this folder ? That method is safe ? \/ Thank you
1 Answer
You should check out the documentation on CPanel's site:

Make sure that no users have jailed shell access in the "Manage Shell Access" interface. You can then use the script that you found in the blog post to unmout any bind-mounted directories.

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

CPanel also provides a script to remove the virtfs mounts:

/scripts/clear_orphaned_virtfs_mounts --clearall
Have another answer? Share your knowledge.