How to use quota in linux

Source: Internet
Author: User
In the use of quota in linux tutorial 1, you must first confirm that the directory to be restricted is a separate file system df-h/home test 2 if it is a separate file system. You need to add the quota support for this directory. a: temporary solution. the computer restarts and becomes invalid: mount-oremount, usrquota, kgquota /... in the use of quota in linux tutorial 1, you must first confirm that the directory to be restricted is a separate file system df-h/home test 2 if it is a separate file system. You need to add the quota support for this directory. a: temporary solution, and the computer restart failure: mount-o remount, usrquota, or kgquota/home B: Restart. you can also use: Edit the fstab file: vi/etc/fstab add the following usrquota, maid: LABEL =/home ext3 defaults, usrquota, maid 1 2 3: Create the quota file quotacheck-avug-: all the filesystems supported by quota are scanned in the/etc/mtab. after this parameter is added,/mount_point is required because all the filesystems are scanned! -U: Why not scan user files ?? Aquota. user-g will be created for usage: Why is the target group scan file not displayed ?? Aquota. group-v: displays the scanning process information;-f: forces scanning the file system ,? Pregnant ci quota configuration file (dangerous)-M: Force scanning of the file system in read/write mode, which is used only in special circumstances. 4: start quotaquotaon [-avug] start-u: for users, activate quota (aquota. user)-g: starts quota (aquota. group)-v: displays information related to the startup and termination processes.-a: determines the quota related to startup according to filesystem restart in/etc/mtab. if-a is not added, the specific filesystem needs to be added later! 5: quota close-a: All filesystem's quota are closed (according to/etc/mtab)-u: only disable user quota-g for the/mount_point that follows: disable group quota 6: quota edit edquota [-u username] [-g groupname]-u: name of the connected account for the/mount_point that follows. You can enter the quota editing screen (vi) to set the limit value of username;-g: followed by the group name. You can go to the quota editing screen (vi) to set the groupname limit value.-t: you can modify the grace period. -P: copy the template. The template account is a user who already exists and has set quota. it means "copying the quota limit value of the template account to the new account 』! Run the following command to modify quotaedquota-u myquota1 for myquota1. The vi mode is displayed. the fields that can be edited are as follows: (when soft/hard is 0, there is no restriction.). filesystem: specifies the target file system (partition) and B. disk capacity (blocks): is this value calculated by quota? T, in Kbytes. please do not change it; c. soft: the soft limit of disk capacity (block). unit: KB d. hard: The block's hard limit value, in KB; e. inodes: this is calculated by quota. the unit is the number. do not change this parameter. f. soft: the soft limit value of inode; g. hard: hard limit value of inode; use the following command to copy quota settings edquota-p myquota1-u myquota2 and use the following command to set the quota group: edquota-g myquotagrp use the following command to set the quota grace time: after edquota-t is used, it enters the vi mode. you can edit the content as follows: filesystem Block grace period Inode grace period/dev/hda3 14 days 7d Ays 7: view the quota report: quota [-uvs] [username] quota [-gvs] [groupname]-u: the user name can be followed, indicates that the user's quota limit value is displayed. If username is not connected, the limit value of the executor's quota is displayed. -G: followed by groupname, indicating that the quota limit value of the group is displayed. -V: Display the quota value of each user in filesystem.-s: use 1024 as a multiple? T ?? Unit. the unit such as M is displayed! Use the following command to view the user's quota settings: quota-uvs myquota1 myquota2 use the following command to view the group's quota settings: quota-gvs myquotagrp 8: repquota: report the quota of the file system. repquota-a [-vugs]-a: directly go to/etc/mtab to search for the filesystem with the quota flag ,? The result of the member queue quota;-v: the output data records all the filesystem-related information;-u: displays the user's quota limit (this is the default value);-g: the quota limit of an individual group is displayed. -S: Use M, G as the display result. run the following command to view all the quota settings of the current file system: repquota-auvs 9: setquota: set the quota in the dig command setquota [-u |-g] name block (soft) block (hard) \ use the following command to directly set the quota value: setquota-u myquota5 100000 200000 0 0/home 10: warnquota: send a warning letter to anyone who exceeds the quota to modify/etc/warnquota. conf allows the system to automatically execute warnquota to edit vi/etc/cron. daily/warnquota add the following command:/usr/sbin/warnquota # You are not mistaken! If this line is left blank, write the execution file in an absolute path!
Related Article

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.