1. Mount the file system in a way that supports the quota function
Modify The/etc/fstab file
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/79/DE/wKiom1ac-rvDKJDJAAAOrX6dI_s365.png "title=" 1.png " alt= "Wkiom1ac-rvdkjdjaaaorx6di_s365.png"/>
Add Usrquote,grpquota
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/79/DD/wKioL1adAebgqJzaAAAac0aMH0o901.png "title=" 2.png " alt= "Wkiol1adaebgqjzaaaaac0amh0o901.png"/>
Then restart the server or mount the file system again
2. Detect disk quotas and generate quota files
You can use the Quotacheck command to perform disk quota detection on a specified file system, or to establish a quota file
-A means to scan all partitions
- U and -G represent the detection of quota information for users and Groups
-C means creating a new quota file
-V indicates that details are displayed during command execution
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/79/DF/wKiom1adBUeT_PtGAADseoJYyOI406.png "title=" 3.png " alt= "Wkiom1adbuet_ptgaadseojyyoi406.png"/>
3. Edit quota settings for user and group accounts
use the Edquota command with the –u and -G options to make quota settings for users and Groups
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/79/DF/wKiom1adCvqxFMh9AAANefmP8Z8745.png "style=" float: none; "title=" 4.png "alt=" Wkiom1adcvqxfmh9aaanefmp8z8745.png "/>
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/79/DE/wKioL1adCzPByV4WAAAwc4nDjyI382.png "style=" float: none; "title=" 5.png "alt=" Wkiol1adczpbyv4waaawc4ndjyi382.png "/>
Seven Fields explained:
Filesystem: Indicates the file system (partition) corresponding to the bank's configuration record
Blocks: Indicates the disk capacity that the user is currently using, the default unit KB
Inodes: Indicates the number of files currently owned by the user
Soft: A soft limit value corresponding to the disk capacity, default unit KB. The latter soft indicates the soft limit of the number of corresponding files
hard: Indicates a rigid limit value corresponding to the disk capacity, the default unit is KB, and the latter hard indicates the number of the corresponding file.
4. Enable the file system disk quotas feature
Quotaon enable quotaoff Disable
-a enable all disk quotas
5. View Quota usage
Quota-u User name ( view user quota status )
Quota-g Group name ( view Group quota status )
Requota-a ( View all quota conditions )
6. Copy user Lisi quotas to other users
Edquota-p lisi-u Zhangsan Wagnwu
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/79/E0/wKiom1adDuzjzpYbAAARME8UAnY733.png "title=" 6.png " alt= "Wkiom1adduzjzpybaaarme8uany733.png"/>
This article is from the "Carey" blog, make sure to keep this source http://careygg.blog.51cto.com/11084669/1736351
Linux disk quotas