This script when supplied with a proper option (clearall or inactiveonly) will definitely unmount any virtfs mounts whose users no longer exist or whose shell is not currently jailshell.
/scripts/clear_orphaned_virtfs_mounts --clearall - Unmount all virtfs mounts regardless of user's jailshell status
/scripts/clear_orphaned_virtfs_mounts --inactiveonly - Only cleanup for users with no running processes
Sorry to say but this script [ /scripts/clear_orphaned_virtfs_mounts --inactiveonly } is not resolving the main issue.
i.e. jail shell user for which mount points are not properly clear.
This script when supplied with a proper option (clearall or inactiveonly) will definitely unmount any virtfs mounts whose users no longer exist or whose shell is not currently jailshell.
/scripts/clear_orphaned_virtfs_mounts --clearall - Unmount all virtfs mounts regardless of user's jailshell status
/scripts/clear_orphaned_virtfs_mounts --inactiveonly - Only cleanup for users with no running processes
I've tested using both of these options & they work as they are designed to Try running upcp (/scripts/upcp --force) on your server & hopefully it'll clear out any persisting issues with cPanel or other related scripts..
Sorry to say but this script [ /scripts/clear_orphaned_virtfs_mounts --inactiveonly } is not resolving the main issue.
i.e. jail shell user for which mount points are not properly clear.
Last edited by Sinclair J; 29-06-2013, 09:09.
Reason: -
Given the name of the script, then it should only 'kill' inactive virtfs mounts (otherwise it sounds like a bug!). Try without the argument to the the command.
I observed some limitation of this scripts "/scripts/clear_orphaned_virtfs_mounts" , without argument it will
not fixed the space issue for the user which are not properly logout from their session.
However, If your already disabled the jail shell for the user then it unmount the directory structure for that particular user.
By the way it's good to use "/scripts/clear_orphaned_virtfs_mounts --clearall " when no one user is currently login to jail shell.
After that manually delete the directories under /home/virtfs, otherwise you need to go through the steps given in starting post.
/scripts/clear_orphaned_virtfs_mounts --clearall
But this gives some problem when any user is actually using its session. In this case its unexpectedly interrupt that user session.
Given the name of the script, then it should only 'kill' inactive virtfs mounts (otherwise it sounds like a bug!). Try without the argument to the the command.
/scripts/clear_orphaned_virtfs_mounts --clearall this script definitely resolved your issue.
But this gives some problem when any user is actually using its session. In this case its unexpectedly interrupt that user session.
That the reason I have given that steps. So first of all you check any jail shell user is not currently login.
Then go ahead and unmont the directories for remaining user.
Last edited by Sinclair J; 25-06-2013, 06:17.
Reason: -
It is a shame that this thread hasn't been properly researched prior to posting.
I have had major grief over this "feature" that hasn't raised its' ugly head until recently. Quite why virtfs has been deemed to be necessary is beyond me and I'm still trying to find a means to disable it entirely!
There are a number of articles and posts scattered around the internet in relation to virtfs, though few, if any, address the consequences.
Those of us with WHM/cPanel can supposedly disable jail shell to allegedly prevent virtfs from being activated. If you care about security at all then you will quickly find that this is not the case. Any secure connection, such as ssh, scp or sftp (ftp-es) will once again create a virtual file system for the account that is being used. If someone can find a means of stopping this then please do tell, as this would be the much preferred modus operandi.
When using backup software, I recommend that you create a wildcard exclude on /home/virtfs/*. It is pointless to double backup these system files. If using R1Soft do not use automatically attach devices - I discovered that mount points created by virtfs has produced various issues in R1Soft. If any of your chosen backup software does a similar action with devices, then I suggest reviewing the process.
I have utilised a frequent cron job to detach the extraneous mount point, with so far, limited success.
Clue: /scripts/clear_orphaned_virtfs_mounts --clearall
I suggest that this might be a safer approach than running individual commands, as in the previous post.
I hope this gives some food for thought and any definitive guide/actions that people can offer will be appreciated. Whilst we're at it how about a group appeal to cPanel to get their act together on this subject?!
EJ
Last edited by ejsolutions; 24-06-2013, 12:36.
Reason: slight typo
Many times you come accross the issue that "/home/virtfs/cpaneluser" consuming more space.
/home/virtfs/cpaneluser : This directory structure is created when user access jail shell. You can enable jail shell access to cpanel user using below WHM option.
WHM >> Manage Shell Access and disable Jailed Shell for users.
Note : Do not directly delete any files under this, because it is hard link to actual server directory structure and deleting this may caused issue to server.
When any capnel usr which have access to jail shell for his account login to shell and failed to properly logout from his session this issue occure.
because the bind (virtual) mount for his direcory are recreated and not properly realease.
To resolved this issue go through the below steps :
Step 1 : You can check un-realise mount point for that user using below command.
Leave a comment: