xfs quota command examples
xfs_quota – manage use of quota on XFS filesystems
Enabling quota enforcement on an XFS filesystem (restrict a user to a set amount of space).
# mount -o uquota /dev/xvm/home /home # xfs_quota -x -c 'limit bsoft=500m bhard=550m tanya' /home # xfs_quota -x -c report /home
Enabling project quota on an XFS filesystem (restrict files in log file directories to only using 1 gigabyte of space).
# mount -o prjquota /dev/xvm/var /var # echo 42:/var/log >> /etc/projects # echo logfiles:42 >> /etc/projid # xfs_quota -x -c 'project -s logfiles' /var # xfs_quota -x -c 'limit -p bhard=1g logfiles' /var
Same as above without a need for configuration files.
# rm -f /etc/projects /etc/projid # mount -o prjquota /dev/xvm/var /var # xfs_quota -x -c 'project -s -p /var/log 42' /var # xfs_quota -x -c 'limit -p bhard=1g 42' /var