Admin guidelines for user quotas
Disk quotas on xfs are supported, and all EL7 and above systems in the company use xfs. No limits are planned for ext4 filesystems at this time.
Report on entire filesystem quotas
sudo xfs_quota -xc 'report -h' /home
$ sudo xfs_quota -xc 'report -h' /home
User quota on /home (/dev/mapper/bf-home)
Blocks
User ID Used Soft Hard Warn/Grace
---------- ---------------------------------
root 0 1000M 1.3G 00 [------]
svcacct1 192K 1000M 1.3G 00 [------]
jdoe1 0 1000M 1.3G 00 [------]
bgstack15 98.2M 1000M 1.3G 00 [------]
sudo du -xBM --max-depth 1 /home | sort -n | tail
# sudo du -xBM --max-depth 1 /home | sort -n | tail
1M /home/testuser
2M /home/wharvey
53M /home/jsmith
179M /home/bgstack15
261M /home/svcacct2
14489M /home/jdoe1
14986M /home
Changing quotas
After a Linux engineer approves, a user quota may be changed.
Change the default quota
The default quota affects all users. Do not use this one!
sudo xfs_quota -x -c 'limit bsoft=250m bhard=300m -d' /home
Change a user quota
sudo xfs_quota -xc 'limit bsoft=1000m bhard=1200m jdoe1' /home
Remove a user quota
Setting to zero will return a user back to the default quota. The documentation states this makes an unlimited quota, but the documentation is incorrect (original research).
sudo xfs_quota -xc 'limit bsoft=0 bhard=0 jdoe1' /home
Comments