1. install the following packages:
yum install quota* -y1. Enable user quota and/or group quota on a file system:
vi /etc/fstab
UUID="93ee7df7-4f3c-4127-be2b-5229b219f644" /home ext4 defaults,usrquota,grpquota 0 02. Create the quota database:
quotacheck -cug /homeOR create the databases for all partition that have quota enabled
quotacheck -acug3. Configure a quota for a user/group(modify the block limits in kb, that means 1024K*500=512MB):
edquota ramesh
Disk quotas for user dennis (uid 500):4. Check if quota is enabled or not:
Filesystem blocks soft hard inodes soft hard
/dev/mapper/vg0-home 512000 512000 512000 11 0 0
quotaon -ap
group quota on /home (/dev/mapper/vg0-home) is off5. To enable the quota on all partitions have quota configured:
user quota on /home (/dev/mapper/vg0-home) is off
quotaon -av6. To see the report of the quota:
repquota -sa
*** Report for user quotas on device /dev/mapper/vg0-home
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 4 0 0 1 0 0
dennis -- 501M 500M 500M 11 0 0
No comments:
Post a Comment