Quoto: Disk quota: limits the usage of a user on a disk! Limited space size. limited file quantity soft limit, hard limit soft limit: gracetime, can exceed the disk quota within a certain period of time! Hard limit: you cannot exceed the disk quota! Magnetic... capital 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
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.