Linux disk Quotas Quota learning notes

Source: Internet
Author: User

1, the Linux disk quota quota function.

Quota's role is to limit the user and group usage limits on the disk, limit the amount of space used to block and the number of files created by the inode, which is generally used to limit blocks.

2, see if the partition supports quota function, how to establish quota.

See if the partition is turned on quota, view the/etc/fstab file, add Usrquota and Grpquota parameters in the file options.

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/86/65/wKioL1e9tc_T4RjaAAAYDYcOv9k442.png "title=" Qq20160824225632.png "style=" float:left;width:600px;height:78px "width=" "height=" "border=" 0 "hspace=" 0 " Vspace= "0" alt= "wkiol1e9tc_t4rjaaaaydycov9k442.png"/>




Then use the Mount-a command to mount the fstab device again.

3, establish quota record file.

Establish quota record file: Quotacheck-avug need to close SELinux command is: Setenforce 0

The Aquota.group and aquota.user two files are generated under the partition directory where the quota feature is turned on.

Need to install quota oh. Can yum install-y quota

4. Turn on the quota service.

The parameters of the Quotaonn-avug command can be queried directly.

Quotaoff to close the service command.

5. Edit account, group restrictions and grace time.

Ediquota Options

-U: Follow-up account

-G: Follow the group next

-T: Modify the wide time limit

-P: Copy by template

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/86/73/wKiom1e-2Oaj5AOFAAAYwtNWaAY581.png "title=" Qq20160825193959.png "alt=" Wkiom1e-2oaj5aofaaaywtnwaay581.png "/>

0 means no limit, edit on it, soft for alarm value, hard for limit value.

Setquota [-u|-g] name block (soft) block (hard) directory can also be used directly with Setquota


1. File System (FileSystem): Indicates which file system (or partition) the limit value is for;

2. Disk capacity (Blocks): This value is calculated by quota himself, the unit is Kbytes, please do not change him;

3. Soft: Soft limit value for disk capacity (block), Unit is also KB

4. Hard:block Hard limit value, unit KB;

5. Number of files (inodes): This is the quota himself, the number of units, please do not change him;

6. Soft limit value of soft:inode;

7. Hard limit value of hard:inode;

This is also true for quota restrictions on group changes.

6, modify the grace time.

Edquota-t

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/86/72/wKioL1e-2X6CkNyPAAAPFTn5pec410.png "title=" Qq20160825194240.png "alt=" Wkiol1e-2x6cknypaaapftn5pec410.png "/>


7. Quota Report

Quota options for single-user quota reports

U; follow the account number.

G: Follow up the group

V: Shows each account's

S: shown in multiples of 1024.

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/86/73/wKiom1e-2tGRcAVNAAAdCXW6Q7g173.png "title=" Qq20160825194751.png "alt=" Wkiom1e-2tgrcavnaaadcxw6q7g173.png "/>

One more grace than Edquota, when the limit is exceeded, Grace starts counting down.

Requota options for quota reports for file systems

A: Go to/etc/fstab to search for file system with quota, and report.

U: Show user's quota value

G: Show quota values for individual groups

V: The output will contain detailed information about the file system.

S: Displays the result in multiples of 1024.

8. Warn the person exceeding the limit.

Detailed configuration of the Warnquota in the/etc/warnquota.conf file

Warnquota separate execution will send an email to the account and root,

Linux disk Quotas Quota learning notes

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.