quota
This shows you your current quota situation. Here is the
current sutuation for a user named tstudent on shaula.
[tstudent@shaula:~]$ quota
Disk quotas for user tstudent (uid 551):
Filesystem blocks quota limit grace files quota limit grace
/dev/sda11 16500 81920 102400 588 0 0
[tstudent@shaula:~]$
This shows: usage soft hard
This shows that on /dev/sda11 the hard limit is 102400 blocks or 100Mb, the soft limit is
81920 (80Megs) and the current usage is 16500 (16Megs). (as far as I know
at this time these are 1K blocks and are not following the block size of
the disks).
mount
The mount command shows you the various mounted filesystems, this is how
you can find out the actual filesystem of the partition /dev/sda11 .
[tstudent@shaula:~]$ mount
/dev/sda3 on / type ext3 (rw)
proc on /proc type proc (rw)
/dev/sda1 on /boot type ext3 (rw)
/dev/sda5 on /usr type ext3 (rw)
/dev/sda6 on /opt type ext3 (rw)
/dev/sda7 on /tmp type ext3 (rw)
/dev/sda8 on /var/log type ext3 (rw)
/dev/sda9 on /export type ext3 (rw)
/dev/sda10 on /export/staff type ext3 (rw)
/dev/sda11 on /export/students type ext3 (rw,nosuid,usrquota)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
[tstudent@shaula:~]$
Notice that /dev/sda11 is mounted on /export/students . And
this is the partition that your home directories are in.
Implementing Quotas in Your own System
Edit your /etc/fstab
touch aquota.group and touch aquota.user etc. in the root of the mounted file system
chmod 600 aquota.files Jason has these set at 644 on shaula but
students have had it work with 600. But I am getting permission denied on some
systems.
remount your filesystem mount -o remount /var
quotacheck -vagum (as root) shows quotas and tries to fix them if they are corrupted.
edquota -g documents and the other edquota -u username
quotaon -a
Test the quotas
Monitoring Quotas using repquota
[root@gacrux ~]# repquota /tmp
*** Report for user quotas on device /dev/hda7
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 17908 0 0 40 0 0
xfs -- 4 0 0 1 0 0
smauney -- 4 0 0 1 11 15
Other Commands:
quotaoff Turns off quotas
apropos quota shows all of the quota utilities
man fstab
See also:
convertquotas (8) - convert quota from old file format to new one
edquota (8) - edit user quotas
quota (1) - display disk usage and limits
quotacheck (8) - scan a filesystem for disk usage, create, check and repair quota files
quotactl (2) - manipulate disk quotas
quotaoff [quotaon] (8) - turn filesystem quotas on and off
quotaon (8) - turn filesystem quotas on and off
repquota (8) - summarize quotas for a filesystem
rpc.rquotad [rquotad] (8) - remote quota server
rquota (3) - implement quotas on remote machines
rquotad (8) - remote quota server
setquota (8) - set disk quotas
smbcquotas (1) - Set or get QUOTAs of NTFS 5 shares
warnquota (8) - send mail to users over quota
xfsdq (8) - XFS dump and restore quota
xfsrq [xfsdq] (8) - XFS dump and restore quota