Linux-Disk QuotaQuota
The disk quota meets the requirements.
1. kernel greater than or equal to 2.4
2. Set user or group
3. operate on a single file system
Lab environment:
1. Modify/etc/fstab settings/partitions to support the disk quota function (you can also set other partitions). This setting is permanent and the system startup will not be affected.
After the modification, re-mount/partition and re-read the/etc/fstab file from the kernel.
Use the quotacheck-cugm command to generate the disk quota configuration file under.
Disk Quota
Set the space size of user1 for normal users. The soft limit is 480 MB, and the hard limit is 500 mb. If the user exceeds the soft limit, an alarm is triggered)
View your disk quota
Switch to user1 and log on. Run the dd command to simulate writing large files to/partition.
When the bandwidth exceeds MB, an alarm is triggered.
When the data volume exceeds MB, the data cannot be written.
Check the user's disk usage again and find that the user space is used up. The system requires the user to reduce the capacity to less than MB in 7 days. Otherwise, the user cannot use the disk after 7 days, it must be reduced to less than MB to continue using.
Simulate the deletion of some files again and continue viewing. The user space usage is normal.
View the global Disk Quota configuration of all users. The default value is 7 days.
-T you can set a user's disk quota separately.
How to limit the number of files created by the user and set the soft and hard values after inodes is the same as setting the space quota.
This article is from the blog of "the Linux open source technology blog", please be sure to keep this source http://dreamfire.blog.51cto.com/418026/1085490