Announcement

Collapse
No announcement yet.

/home/virtfs/ consuming more space

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • /home/virtfs/ consuming more space

    Hi all,

    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.

    --------------------------
    # cat /proc/mounts | grep cpaneluser
    --------------------------

    This shows mount point still remain for that user.

    Step 2 : Kill the jailshell process related to that user.

    --------------------------
    # ps aufx |grep cpaneluser |grep jailshell
    --------------------------

    Note : Please take care that this user not actually using this SSH session.

    Step 3 : Finally unmount all the files related to that user

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

    Verify once that all mount point for that user are release using the command given in step 1.

    Step 4 : If there is no any mount point you are free to delete those files.

    --------------------------
    # rm -rf /home/virtfs/cpaneluser
    --------------------------

    Note : Disable the Jail Shell access to that user if not needed.

    Enjoy !!!!!!!!!!!!!

  • #2
    Re: /home/virtfs/ consuming more space

    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
    sigpicManaged osCmax hosting
    (I'm not social )

    Comment


    • #3
      Re: /home/virtfs/ consuming more space

      Hi,

      Thank you for your suggestion.

      /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: -

      Comment


      • #4
        Re: /home/virtfs/ consuming more space

        Originally posted by Sinclair J View 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.
        sigpicManaged osCmax hosting
        (I'm not social )

        Comment


        • #5
          Re: /home/virtfs/ consuming more space

          Originally posted by ejsolutions View Post
          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.

          Comment


          • #6
            Re: /home/virtfs/ consuming more space

            Try "/scripts/clear_orphaned_virtfs_mounts --inactiveonly"
            sigpicManaged osCmax hosting
            (I'm not social )

            Comment


            • #7
              Re: /home/virtfs/ consuming more space

              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: -

              Comment


              • #8
                Re: /home/virtfs/ consuming more space

                Originally posted by Sinclair J View Post
                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..
                Rock _a.k.a._ Jack Daniel

                Follow eUKhost on Twitter || Join eUKhost Community on Facebook

                Comment


                • #9
                  Re: /home/virtfs/ consuming more space

                  Originally posted by Rock View Post
                  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
                  Glad to see I'm vindicated.
                  sigpicManaged osCmax hosting
                  (I'm not social )

                  Comment


                  • #10
                    Re: /home/virtfs/ consuming more space

                    Originally posted by ejsolutions View Post
                    Glad to see I'm vindicated.
                    Rock _a.k.a._ Jack Daniel

                    Follow eUKhost on Twitter || Join eUKhost Community on Facebook

                    Comment

                    Working...
                    X