How to implement disk quota destination: For users zhao on / home directory to implement Soft Limit is 5K, Hard Limit is 10K disk quota implementation steps: 1, # vi / etc / fstab, modify the line containing / home, will fourth columns Change to: Defaults, usrquota. That is to increase USRQUOTA items. Then save the exit. 2, # umount / home Uninstall / Home Directory #mount / Home Mount / Home Directory 3, # UserAdd Zhao Add User Zhao 4, # Passwd Zhao Modify Password 5, # Quotacheck -vu / Home Generate Quota Information about / Home Directory 6, # repquota -au View all users' information 7, # edquota -u zhao change Soft and Hard to 5 and 10 8, # wq! Save and exit 9, # Edquota -t modification time 10, # wq! 11 , # Quotaon / Home On / HOME disk quota function
Set the disk quota limit for the user or user group. Suppose there is a Bob of users on your system, now I want to give him 10MB hard disk quota limit, the maximum number of files he has exceeded 100. Execute Edquota -u DQUO, the system will enter the editing environment (the specific editing environment is set by Editor variables), will be as follows
Quotas for User Bob:
/ dev / hda2: Blocks in Use: 14, Limits (SOFT = 0, HARD = 0)
Inodes in Use: 12, Limits (Soft = 0, HARD = 0)
Change to
Quotas for User Bob:
/ DEV / HDA2: Blocks in Use: 14, Limits (Soft = 0, HARD = 10240)
Inodes in Use: 12, Limits (SOFT = 0, HARD = 100)
among them,
Blocks in use: The user has used the size of the block, and the unit is KB.
Inodes in Use: The size of the user's existing file.
Both of these are automatically given, do not have to be changed.
Soft Limits
Typically set flexible restrictions to a value close to hard-restricted, beyond this limit, the system will warn the user to the maximum disk quota limit. There is no soft restriction at 0 when the soft limit is 0. When using a binding period, as long as the user exceeds the soft limit, an extra demand for disk space will be immediately rejected.
Hard Limits
The absolute limit of hard limit disk quotas, users who set the quota cannot surpass this limit.
Groad period (GRACE PERIOD)
The grace period is that the user exceeds the soft restriction without reaching the hard limit. In this time, the user can freely use disk space freely within the hard limit, more than this time, all of the additional requirements for disk space Will be rejected, even if the user is still within hard limits. The unit of the gap may be seconds, divided, time, days. Execute the edquota -t command to set a wide limit. After executing this command, change the two 0 days in the system prompt to you think the right value is available.
Sometimes I want to add the same restrictions to a group of users, such as all 100 users on the system, plus the same restrictions like Bob, can handle BOB to BOB, then execute the following command:
Edquota -P Bob 'awk -f:' $ 3 499 {Print $ 1} '/ etc / passwd'