1. check whether the system kernel supports quotas # dmesg | grepquota2. check whether the software supporting quotas in the system is installed # rpm-qa | grepquota3. enable the quota function of mounted partitions # mount-ousrquota, remount/dev/sda1/quota // This is only temporary open...
1. check whether the system kernel supports quotas.
# Dmesg | grep quota
2. check whether the software supporting quota is installed in the system.
# Rpm-qa | grep quota
3. enable the quota function for mounted partitions
# Mount-o usrquota, remount/dev/sda1/quota // This is only temporarily enabled and can be enabled after restart
, You need to modify/etc/fstab
# Vim/etc/fstab
/Dev/sda1/quota ext3 defaults, usrquota 0 0
4. create a quota file to record user quota information
# Quotacheck-cuv
5. set the user quota
6. enable or disable disk quota management.
# Quotaon/dev/sda1
# Quotaon-avug
Or
# Quotaoff/dev/sda1
# Quotaoff-avug
7. View user quota information
# Repquota-a (for administrator only)
# Quota user name
8. send an email to the user who has exceeded the quota.
# Warnquota
The email content can be defined by the configuration file/etc/warnquota.
9. directly use the command to set the quota
# Setquota-u xiaozhu 1000 1500 6 10/quota
10. for example, I want to configure a quota for/var/spool/mail, but/var/spool/mail is not an independent partition.
Solution:
1. Move/var/spool/mail to the new folder mail in the independent partition.
2. use ln-s/home/mail/var/spool/mail to create a soft connection
3. limit the quota of the independent partitions in which mail is located.
Author: "New network subnet"