▲ Why to use disk quotas Quota ?
???? in the Linux system, because it is a multi-tasking environment, so there will be many people together to use a hard disk space situation. However, system resources are limited, so administrators should properly open the drive's permissions to the user to properly allocate system resources
?
Disk quota program restrictions on hard disk quotas items:
Soft : Soft limit, also known as the minimum capacity limit. Within the grace period, the user's capacity can exceed the minimum capacity limit. However, the disk capacity must be lowered to the minimum capacity within the grace period
Hard : Hard limit, also called maximum capacity limit. Is definitely not going to exceed the capacity
Soft to the Hard the capacity between is the grace capacity
Grace time: When the user uses more space than the soft limit, the grace time will be automatically started, and the user will reduce the capacity to the soft limit, the grace time will be automatically canceled.
?
Quota Basic classification of directives:
Query function: Quota,quotacheck,quotastats,warnquota,repquota
Editing Features: Edquota,setquota
?
▲ steps for disk quotas
1 the file system that sets the partition supports disk quota parameters. Because the file system with the best support for disk quotas is ext2/ext3, it is agood idea to set the file system to ext2/ext3. The simplest way to start a file system-supported disk quota is to edit the /etc/fstabso that disksready to be opened can support disk quotas
2 ) to establish a disk quota record file. The entire disk quota for disk limit record is aquota.user/aquota.group, and these two files must be used Quotacheck Scan is only OK.
3 ) to edit the disk quota limit value data. use Edquota to edit the available space for each user or group
4 ) Rescan and boot disk quotas. After you set the disk quotas, you can Quotacheckagain andthen quotaon to start
?
quota [-UVSL] [username]
quota [-GUVL] [groupname]
???? Parameters - u???????? the user indicates that the user's disk quota limit value is displayed. Do not answer the user indicates that the performer's disk quota limit value is displayed
???? Parameters - g???????? The user group represents the disk quota limit value for the group
???? Parameters - v???????? Show each filesystem the disk quota value
???? Parameters - s???????? you can choose to Inode or the limit value of the disk capacity to display
???? Parameters - L???????? Show only the current machine above filesystem the disk quota value
?
Quotacheck [-avug] [/mount_point]
???? Parameters -A ???????? Scan all the /etc/mtab contains disk quota support. filesystem . Add this parameter,/mount_point can not write, because it will scan all the file system
???? Parameters - u???????? the use of files and directories scanned by the user will create Aquota.user
???? Parameters - g???????? the use of files and directories scanned for groups will create Aquota.group
???? Parameters - v???????? displays information about the scanning process
???? Parameters - m???? forced to Quotacheck the scan
Edquota [-UGTP]
???? Parameters - u???????? followed by the account name. Can enter the disk quota of the edit screen vi set The limit value of username
???? Parameters - g???????? followed by the group name. Can enter the disk quota of the edit screen vi set The limit value of groupname
???? Parameters - t???????? You can modify the grace time
???? Parameters - p???????? Copy the template. Username_demo for a user who already exists and has set a disk quota, copy the username_demo disk quota limit value to username
?
Quotaon [-avug] [/mount_point]
???? Parameters -A ???????? according to /etc/mtab set the disk quota to start on. When you do not use this parameter, you need to add a specific file system later
???? Parameters - u???????? start disk quotas for the consumer ( Aquota.user )
???? Parameters - g???????? start disk quotas for groups ( Aquota.group )
???? Parameters - v???????? displays information about the startup process
?
Quotaoff [-aug] [/mount_point]
???? Parameters -A ???????? disk quotas for all file systems are closed, not followed Mount_point
???? Parameters - u???????? only for the one that's back. /mount_point To turn off user disk quotas
???? Parameters - g???????? only for the one that's back. /mount_point Turn off group disk quotas
?
Repquota [-avug]???? Show more complete Quota Report
?
Linux Disk quota Management