Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Lustre 2.15.6
-
None
-
rhel8
-
3
-
9223372036854775807
Description
Hiya,
it seems I can chgrp any number of inodes to a group and exceed its quota.
ie. the inode quota is not enforced when doing a chgrp.
eg.
$ lfs quota -g grp1 .
Disk quotas for grp grp1 (gid 2001):
Filesystem kbytes quota limit grace files quota limit grace
. 2500 0 2097152 - 5000* 0 5000 -
- chgrp some files that were owned by another group to be grp1
$ chgrp grp1 b_*
$ lfs quota -g grp1 .
Disk quotas for grp grp1 (gid 2001):
Filesystem kbytes quota limit grace files quota limit grace
. 4288 0 2097152 - 8212* 0 5000 -
obviously, this should not be allowed...
I believe this is newish behaviour. I don't recall this bug being present in 2.12.x
steps to reproduce ->
make a user that is a member of grp1, grp2
turn on quota enforcing
lctl conf_param testfs.quota.mdt=u
lctl conf_param testfs.quota.ost=u
lctl conf_param testfs.quota.ost=g
lctl conf_param testfs.quota.mdt=g
give both groups an inode quota
lfs setquota -g grp1 -B2g -I5000 .
lfs setquota -g grp2 -B2g -I5000 .
make files
newgrp grp1
for f in
newgrp grp2
for f in {1..5001}
; do touch b_$f || break ; done
do a chgrp
chgrp grp1 b_*
and then you see the quota being exceeded as per above.
cheers,
robin