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 and Quotas

Discussion in 'General Discussion' started by hhost.ca, Jun 23, 2008.

  1. hhost.ca

    hhost.ca Member

    Joined:
    Feb 7, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I have a VPS, CentOS 5, Virtuosso, with some shell accounts.

    In WHM the accounts are only showing 3+ gb of space being used but the actual is over 8gb.

    Where are the best places to look for wasted space?

    Also, in the VirtFS directory in the home directory, some of the accounts are showing way more than the actual disk usage.

    For instance, one account is using 77mb of space but in the VirtFS directory the same account is showing 2gb of space being used.

    Any ideas on why this would be?

    There are other shell accounts in the VirtFS directory showing correct space usage.
     
  2. hhost.ca

    hhost.ca Member

    Joined:
    Feb 7, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    No ideas on this at all?
     
  3. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,381
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The virtfs directory in /home is a special directory. It is where the jailed SSH users are jailed to. Don't delete this directory or anything in this directory. All of the files in this directory are hard-links to the correct files on the file system. If you delete them then you also delete the real files which will render your server useless.

    I'm not sure where you are getting the different quota reports. But it is just best to completely disregard anything that is in the /home/virtfs directory.
     
  4. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Incorrect. The contents are bind mounts, not hard links. Hard links are safe to delete and would not remove the file linked to. Bind mounts are not hard links but a method of providing a file system level redirect.
     
    #4 cPanelKenneth, Jun 26, 2008
    Last edited: Aug 29, 2008
  5. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,381
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Learn something new everyday. At any case, don't delete any files in the virtfs folder.
     
  6. majoosh

    majoosh Well-Known Member

    Joined:
    Feb 18, 2006
    Messages:
    97
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    Yes I agree not to remove virtfs... but how can we fix the quota problem...

    For example : am having an account with 80M disk usage and this accounts allowed disk quota is 100M.... Now when I checked /home/virtfs/<user> then it's also using 80Mb...

    and cpanel reports 160Mb in total for this account... so the account is over quota ...

    How to fix this ...

    I fixed it by rebooting the server and run fix quota ... but is there any better method ?

    I tried unmounting /home and remounting ... but no luck

    Any idea??
    :eek:

    Majoosh
     
  7. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    We would appreciate you opening a ticket when you next experience this. Address the ticket: ATTN QA: VirtFS and Quotas

    Thank you.
     
  8. majoosh

    majoosh Well-Known Member

    Joined:
    Feb 18, 2006
    Messages:
    97
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    it didn't happen again...

    Majoosh
     
  9. xphost

    xphost Well-Known Member

    Joined:
    Nov 12, 2003
    Messages:
    76
    Likes Received:
    0
    Trophy Points:
    6
    So what i can do with /home/virtfs it 50GB
     
  10. majoosh

    majoosh Well-Known Member

    Joined:
    Feb 18, 2006
    Messages:
    97
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    Just want to update this thread.. if this help someone someday :)

    Here's a workaround for virtfs quota problem. If you see the quota for a user is double or above the normal limits just check the virtual filesystem mounted for the user and unmount each folders manually.

    For doing this follow the steps below,

    #cat /proc/mount

    now you will see lot of listing
    ---------
    /dev/root /home/virtfs/user/lib ext3 rw,data=ordered,usrquota 0 0
    /dev/sda2 /home/virtfs/user/usr/lib ext3 rw,data=ordered,usrquota 0 0
    /dev/sda2 /home/virtfs/user/usr/sbin ext3 rw,data=ordered,usrquota 0 0
    /dev/sda2 /home/virtfs/user/usr/share ext3 rw,data=ordered,usrquota 0 0
    /dev/sda2 /home/virtfs/user/usr/bin ext3 rw,data=ordered,usrquota 0 0
    /dev/sda2 /home/virtfs/user/usr/man ext3 rw,data=ordered,usrquota 0 0
    /dev/sda2 /home/virtfs/user/usr/X11R6 ext3 rw,data=ordered,usrquota 0 0
    /dev/sda2 /home/virtfs/user/usr/kerberos ext3 rw,data=ordered,usrquota 0 0
    /dev/sda2 /home/virtfs/user/usr/libexec ext3 rw,data=ordered,usrquota 0 0
    /dev/sda2 /home/virtfs/user/usr/local/bin ext3 rw,data=ordered,usrquota 0 0
    /dev/sda2 /home/virtfs/user/usr/local/share ext3 rw,data=ordered,usrquota 0 0
    ---------------
    and so on... you will need to unmount each of these by running
    umount /home/virtfs/user/tmp etc..

    For automating this task do this

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

    Please make sure you replace user with the cpanel username in the above command.
    This will then clear up the files in /home/virtfs and the quota should return to normal.

    Also run /scripts/fixquotas

    Before doing this make sure that any jailshell users are not logged in the server.

    there you go... ;)


    Majoosh
     
  11. dolphyn

    dolphyn Well-Known Member

    Joined:
    Nov 27, 2001
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Thanks Majoosh, that solution (followed by fixquotas) worked for me.

    However, the apostrophes around {print$2} did not copy and paste correctly into my SSH program. :rolleyes:
     
  12. upsforum

    upsforum Well-Known Member

    Joined:
    Jul 27, 2005
    Messages:
    446
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    I run the #cat /proc/mount but get this error:

    cat: /proc/mount: No such file or directory


    I the same problem with virtfs and cpanel quota limit
     
  13. WebHostDog

    WebHostDog Well-Known Member

    Joined:
    Sep 3, 2006
    Messages:
    144
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Website Owner
    Hello,
    It is :

    cat /proc/mounts
     
  14. upsforum

    upsforum Well-Known Member

    Joined:
    Jul 27, 2005
    Messages:
    446
    Likes Received:
    0
    Trophy Points:
    16
    ok, now it work..
    thank you
     
Loading...

Share This Page