How to manage quotas
Jump to navigation
Jump to search
NOTE: The XFS file system doesn't seem to support quotas.
Setup for a partition mounted at /:
touch /aquota.userchmod 600 /aquota.user- edit
/etc/fstab, add ",usrquota" after the word "defaults" in the affected partition. - reboot
quotacheck -vm /quotaon -v /
To setup quotas for a certain user:
setquota <user> <soft-limit> <hard-limit> 0 0 <mount-point>
Example: to set a soft-limit of 10MB, hard-limit of 12MB, for sccmarti whose home directory /home/sccmarti lives under the / mount point:
setquota sccmarti 10240 12288 0 0 /
To edit quotas (using editor specified in $EDITOR, or vi):
edquota <user>
To view quotas for a specific user:
quota <user>
To update quota files
quotacheck -vfm /
To see a report on quota usage
repquota -a
Troubleshooting
If repquota shows much more used space than you can account for, check /root/.cpan/build for perl modules that don't belong to root.
Conversions
|
10 M |
10240 K |
|
12 M |
12288 K |
|
1 G |
1048576 K |
|
1.2 G |
1258291 K |
|
2 G |
2097152 K |
|
2.2 G |
2301952 K |
|
10 G |
10485760 K |
|
18 G |
18874368 K |
|
20 G |
20971520 K |