Disk Quota in linux

Source: Internet
Author: User

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"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.