CentOS configuration disk quota

  

1, install quota package

rpm -q quota#Check if quotaum install quota# install quota package

2, check whether the Linux kernel supports Disk quota

grep CONFIG_QUOTA /boot/config-2.6.32-220.e16.i686# If the current kernel does not support quota, you need to recompile the kernel and compile quota support into the kernel. 3, modify /etc/fstab, add usrquota, grpquota on the mount script of the mount /backup partition. Save and restart!

vi /etc/fstabUUID=27e8d329-8e2b-43f0-87b6-eabfa2b293b6 /backup ext4 defaults,usrquota,grpguota 1 2:wqreboot


4, enable disk quotas And configure the quota for the /backup partition

quotacheck -cmug /backls /backup#Create two files: aquota.user and aquota.group5, set the quota value for the user or group (configure the test user in /backup Partition has a 5kb soft limit, up to 10kb space)

edquota -u testFilesystem blocks soft hard inodes soft hard/dev/sda6 0 5 10 0 0 06, enable quota management

quotaon -av7 Modify disk quota grace time

edquota -t8, view disk quota usage

repquota -a

Copyright © Windows knowledge All Rights Reserved