Quoto:
Disk Quota: limits the usage of a user on a disk!
Limited space size. Limited number of files
Soft and Hard Limits
Soft limit: grace time, which can exceed the disk quota within a certain period of time!
Hard limit: you cannot exceed the disk quota!
The effective level of the disk quota is the file system;
The disk quota can be set to the quota of independent team users or groups!
Database configuration file for user quota: aquota. user
Database configuration file for group quota: aquota. group
How to implement a quota for the file system:
1. Set the mounting option for the file system to enable the disk quota;
Usrquota
Kgquota
Mount-o remount
(1) edit/etc/fstab to write the configuration file
LABEL =/home/boot ext3 defaults 1
Changed:
LABEL =/home/boot ext3 defaults, usrquota, kgquota 1
(2) then:
Umount/home
(3) mount-
(4) mount | grep home
2. databases used to create quotas
Quotacheck-cmug/home
-C is created and does not read the original database
-M avoid mounting the file system in read-only mode
-U: detects the user's database.
-G Detection Group database
-V: Display Process Information
3. Enable the disk quota function on the corresponding File System
Quotaon/home
Quotaoff/home
-A: all partitions
4. Set the user quota or group quota
Interactive:
Edquota
-U Limit user quota can also be omitted-u redhat = redhat
-P: copy the quota attribute of a user to another user-p redhat centos
-G limit group quota-g redhat
-U: Set the configuration file of a user or group.
1 K bolck Unit
-T modify the grace period
View disk quota:
Quota-ugvs USERNAME
-V: Show Details
-U: displays the user's quota limit value
-G: displays the quota limit values of individual user groups.
-S uses M, and G is the unit to display the result
The disk quota is invalid for administrator root!
The meaning of the seven fields:
Filesystem: Specifies the target file system!
Disk capacity (blocks): Unit: kb
Soft: the soft limit of the disk capacity (blocks), measured in kb.
Hard: The hard limit of the block, measured in kb.
Number of objects (inodes), measured in!
Soft: inode soft restrictions
Hard: hard limitation
Non-interactive:
Setquota
Repqutoa: view the disk quota overview of a file system
Usage: repquota-auvgs FILESYSTEM
-A: directly view the file system with the quota flag in/etc/mtab and report the quota result.
-V: Show Details
-U: displays the user's quota limit value
-G: displays the quota limit values of individual user groups.
-S uses M, and G is the unit to display the result
Warnquota: send an email to all users who have exceeded the quota of the file system to warn them!
The configuration file is/etc/warnquota. conf.
How to disable Disk Quota:
Quotaoff temporarily disabled
This disk is not mounted in the configuration file!
This article is from the "Linux communication" blog