The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

virtfs Mount Just Won't Go Away! Disk Being Wasted

Discussion in 'Workarounds and Optimization' started by kray, Mar 18, 2016.

  1. kray

    kray Member

    Joined:
    Mar 30, 2012
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I have a user account that has a large /home/user directory and large mysql databases. It takes up a lot of space in /home/virtfs/username. I disabled jailshell for this account and also changed the cron shell from jailshell to /bin/bash. I ran /scripts/clear_orphaned_virtfs_mounts which output "No action needed" for the account. Though I have disabled jailed shell everywhere, when I run grep -i username /proc/mounts I get:

    Code:
    root@starfrost [~]# grep -i username /proc/mounts
    devtmpfs /home/virtfs/username/dev devtmpfs rw,nosuid,noexec,relatime,size=1930336k,nr_inodes=482584,mode=755 0 0
    /dev/vda2 /home/virtfs/username/opt xfs ro,nosuid,relatime,attr2,inode64,usrquota 0 0
    /dev/vda2 /home/virtfs/username/tmp xfs rw,nosuid,noexec,relatime,attr2,inode64,usrquota 0 0
    /dev/vda2 /home/virtfs/username/usr xfs ro,nosuid,relatime,attr2,inode64,usrquota 0 0
    /dev/vda2 /home/virtfs/username/var xfs ro,nosuid,relatime,attr2,inode64,usrquota 0 0
    /dev/vda2 /home/virtfs/username/var/log xfs rw,nosuid,noexec,relatime,attr2,inode64,usrquota 0 0
    /dev/vda2 /home/virtfs/username/var/tmp xfs rw,nosuid,noexec,relatime,attr2,inode64,usrquota 0 0
    /dev/vda2 /home/virtfs/username/etc/mail xfs rw,nosuid,noexec,relatime,attr2,inode64,usrquota 0 0
    /dev/vda2 /home/virtfs/username/usr/sbin xfs ro,relatime,attr2,inode64,usrquota 0 0
    /dev/vda2 /home/virtfs/username/var/spool xfs rw,nosuid,noexec,relatime,attr2,inode64,usrquota 0 0
    /dev/vda2 /home/virtfs/username/etc/pki/tls xfs ro,nosuid,relatime,attr2,inode64,usrquota 0 0
    /dev/vda2 /home/virtfs/username/etc/pki/ca-trust xfs ro,nosuid,relatime,attr2,inode64,usrquota 0 0
    /dev/vda2 /home/virtfs/username/var/cpanel/email_send_limits xfs rw,nosuid,noexec,relatime,attr2,inode64,usrquota 0 0
    /dev/vda2 /home/virtfs/username/home/username xfs rw,relatime,attr2,inode64,usrquota 0 0
    I do have accounts on the server that I want to keep under jailed shell but for this account I don't want it because it takes up too much space. Disk Usage reports the increased usage and ncdu shows the space mostly being taken up by this user account's virtfs mount.

    What should I do?
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,145
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    A bind mount is a transparent link between two places on the file system. For example, if a user views the contents of /home/virtfs/username/usr/bin, the user actually sees the contents of /usr/bin. Thus, the /home/virtfs/$user directory itself is not actually using up any additional space than already exists. Data is not actually duplicated. Documentation on VirtFS is found at:

    VirtFS (Jailed Shell) - Documentation - cPanel Documentation

    Thank you.
     
  4. kray

    kray Member

    Joined:
    Mar 30, 2012
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    An issue needs to be created for the Disk Usage reporting in WHM because it doesn't subtract virtfs mounts which results in unnecessary diskwarns and could have other potential side-effects.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Could you provide some more details on this? For instance, where in particular is the usage reported incorrectly, and have you utilized the "du" command to verify the disk space usage via the command line? Are you sure it's not coming from another source?

    Thank you.
     
  6. kray

    kray Member

    Joined:
    Mar 30, 2012
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    The contents of /home/virtfs is reported as used space in the WHM section "Disk Usage" and with ncdu. ncdu shows me very exactly where my disk usage is coming from and reports /home/virtfs as taking up a very large amount of space.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    The following document helps to explain what bind mounts are:

    What is a bind mount?

    It explains why it looks like they are taking up space, but really are not. Feel free to open a support ticket using the link in my signature if you want us to verify if disk space is actually miscalculated on your system, as I've been unable to reproduce that behavior.

    Thank you.
     
Loading...

Share This Page