xfs_quota: Failed with Secondary Group
Unfortunately xfs_quota
is only valid for Primary Group. It wont work for Secondary Group (in your case group: itshare
).
You need Project Quota as workaround.
Mount your disk/partition with
prjquota
option:# mount -o rw,remount,prjquota /home # mount | grep home
Make sure
prjquota
option is displayed.Create
itshare
dir:# mkdir /home/itshare # chown -R testuser:itshare /home/itshare # chmod -R g+rwx /home/itshare
Create Project ID (can be any numerical value)
# echo "11:/home/itshare" >> /etc/projects # echo "itshare:11" >> /etc/projid
Initialize project directory
# xfs_quota -x -c 'project -s itshare' /home
Configure quotas for projects with initialized directories:
# xfs_quota -x -c 'limit -p bsoft=3m bhard=4m itshare' /home
Test
Reference:
[1] https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/managing_file_systems/assembly_limiting-storage-space-usage-on-xfs-with-quotas_managing-file-systems
[2] https://stackoverflow.com/questions/40244862/xfs-quota-issue-for-group/76857835#76857835
Subscribe to my newsletter
Read articles from Nur Kholis M. directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by