banner
破影岚歌

破影岚歌的博客

bilibili
twitter
github

13. Disk quota management in CentOS 7

Disk Quota Management in CentOS 7#

Excluding root users, for regular users

Experimental Steps#

  1. Add a new hard drive (partition, format, mount)
  2. Edit the /etc/fstab file to configure automatic mounting (rw, usrquota, grpquota)
  3. Install quota tool: yum -y install quota
  4. Create quota file: quotacheck -ug /media/disk
  5. Edit user quotas or group quotas: edquota -u user or edquota -g group

blocks: Limits based on file size

inodes: Limits based on the number of files

soft: Soft limit (warning)

hard: Hard limit (restriction)

  1. Enable quotas: quotaon -ug /media/disk

    Disable quotas: quotaoff -ug /media/disk

  2. Verify with the user mike (ensure write permissions):

Disk quota is a feature of the ext4 file system

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.