1. Introduction to the use of disk quota management
In the Linux system, due to the multi-user and multi-tasking environment, if a few users use a lot of disk space, other users’ Normal use, so you need to manage and limit the disk space of each user.
2. Usage and usage of quota
Usage: Limit the maximum disk quota of a user
Usage: add usrquota and grpquota parameters after the configuration file /etc/fstab mount parameters
Use the xfs_quota editing command
xfs_quota -x- c’limit -u bsoft=N bhard=N isoft=N ihard=N username’ mount point
Common commands
-x enable expert mode
-c enable command execution
-u limit users
-g limit group members
limit field
bsoft=N
bhard=N
isoft=N
ihard=N
3. Quota usage restrictions
Only applicable to the entire file system
The kernel must support
Only valid for general users
Here is a sample to describe the configuration management of quota.
4. How to add a SATA hard disk and build an LVM logical volume to create a case, create a user duoduo, the user’s permission to use the disk is: the use space is 100M, and the number of files is 10.< br>●Prepare user duoduo
●Create LVM logical volume
Create a partition on the hard disk
Command: fdisk /dev/sdb (partition type setting 8e)
fdisk /dev/sdc (partition type setting 8e)
Set /dev/sdb /dev/sdc to pv volume
put/ dev/sdb /dev/sdc is set to vg group
Set /dev/sdb /dev/sdc to 39G logical volume
Format logical volume
●Check whether the current system Support quota
command: rpm -qa |grep xfsprogs
Check if quota is installed
Command: rpm -ql xfsprogs |grep quota
●Permanently mount logical volume lv1
Configure disk quota for account pp
Switch to user pp account test
It can be seen that it is beyond the scope of use and is not allowed to write