How to understand the output of quota?

Tim asked:

On a Scientific Linux server (actually a node of a cluster), I run

$ quota -vs
Disk quotas for user tim (uid 12345): 
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
       /dev/vdb      12    126G    126G               3   8389k   8389k      
  1. According to https://www.isg.inf.ethz.ch/HelpHowToCheckQuotaLinux,
    blocks is used disk space in kilobytes, but I found that my home
    has used much more than 12 kilobyes:

    $ du -sh ~
    4.1G    /afs/user/tim
    
  2. The webpage also says file is the number of files, but I have much
    more than 3 files in either my home or the current directory.

So how shall I understand the meaning of the output of quota?

Output of mount:

$ mount

/dev/vda1 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/vda2 on /var type ext4 (rw)
/dev/vda5 on /var/lib/cvmfs type ext4 (rw,noatime,nodiratime)
/dev/vdb on /tmp type ext3 (rw,_netdev,usrquota)
sssd on /var/lib/sss/db type tmpfs (rw,size=300M,mode=0700,rootcontext="system_u:object_r:sssd_var_lib_t:s0")
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
AFS on /afs type afs (rw)
xxx.xxx.xxx on /afs/user/xxx type fuse (rw,nosuid,nodev,user=xxx)
xxx.xxx.xxx on /afs/work/xxx type fuse (rw,nosuid,nodev,user=xxx)
xxx.xxx.xxx on /afs/work/xxx type fuse (rw,nosuid,nodev,user=xxx)
xxx.xxx.xxx on /afs/work/xxx type fuse (rw,nosuid,nodev,user=xxx)
xxx.xxx.xxx on /afs/user/xxx type fuse (rw,nosuid,nodev,user=xxx)
cvmfs2 on /cvmfs/xxx.xxx.xxx type fuse (ro,nosuid,nodev,allow_other,default_permissions)
xxx.xxx.xxx on /afs/work/xxx type fuse (rw,nosuid,nodev,user=xxx)
xxx.xxx.xxx on /afs/user/xxx type fuse (rw,nosuid,nodev,user=xxx)
xxx.xxx.xxx on /afs/work/xxx type fuse (rw,nosuid,nodev,user=xxx)
cvmfs2 on /cvmfs/xxx.xxx.xxx type fuse (ro,nosuid,nodev,allow_other,default_permissions)
xxx.xxx.xxx on /afs/work/xxx type fuse (rw,nosuid,nodev,user=xxx)
xxx.xxx.xxx on /afs/user/xxx type fuse (rw,nosuid,nodev,user=xxx)
xxx.xxx.xxx on /afs/user/xxx type fuse (rw,nosuid,nodev,user=xxx)
xxx.xxx.xxx on /afs/user/xxx type fuse (rw,nosuid,nodev,user=xxx)
xxx.xxx.xxx on /afs/user/xxx type fuse (rw,nosuid,nodev,user=xxx)
xxx.xxx.xxx on /afs/user/xxx type fuse (rw,nosuid,nodev,user=xxx)
xxx.xxx.xxx on /afs/work/xxx type fuse (rw,nosuid,nodev,user=xxx)
xxx.xxx.xxx on /afs/user/xxx type fuse (rw,nosuid,nodev,user=xxx)
xxx.xxx.xxx on /afs/work/xxx type fuse (rw,nosuid,nodev,user=xxx)
xxx@xxx.xxx.xxx.xxx:/xxx/xxx/xxx on /afs/user/xxx type fuse.sshfs (rw,nosuid,nodev,user=xxx)
xxx@xxx.xxx.xxx:/Volumes/RAID/Data/xxx on /afs/user/xxx/xxx type fuse.sshfs (rw,nosuid,nodev,user=xxx)
xxx.xxx.xxx on /afs/user/xxx type fuse (rw,nosuid,nodev,user=xxx)
xxx.xxx.xxx on /afs/user/xxx type fuse (rw,nosuid,nodev,user=xxx)
cvmfs2 on /cvmfs/xxx.xxx.xxx type fuse (ro,nosuid,nodev,allow_other,default_permissions)
cvmfs2 on /cvmfs/xxx.xxx.xxx type fuse (ro,nosuid,nodev,allow_other,default_permissions)
cvmfs2 on /cvmfs/xxx.xxx.xxx type fuse (ro,nosuid,nodev,allow_other,default_permissions)
cvmfs2 on /cvmfs/xxx.xxx.xxx type fuse (ro,nosuid,nodev,allow_other,default_permissions)

Output of fs lq

$ fs lq /afs/user/tim
Volume Name                    Quota       Used %Used   Partition
user.tim                   10485760    4266340   41%          0% 

My answer:


The listed quota applies to the /dev/vdb device, which you can see is mounted on /tmp. So, you can only create 8 million files or use 126GB of space under /tmp.

To see your AFS quota, for your network filesystem, you need to run fs lq <directory>.

For example: fs lq /afs/user/tim


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.