[LU-12351] quota not enforced on chgrp Created: 29/May/19 Updated: 05/Aug/20 |
|
| Status: | Open |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | CEA | Assignee: | Hongchao Zhang |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
On today's master, if group quotas are on and a normal user creates files as one group then does a chgrp to a second one, group quotas are not enforced at all for the second group (inode or block).
I stumbled into this again because we have quite a few users that are over quota on our long-term filesystems and I believe the reason to be... rsync. Our users create their files in a scratch, then rsync -a their files over to the longer term FS; rsync will create the files under their primary group then chgrp it, letting them make more files despite having long overrun the limits. (we normally have the group sticky bit set so files should be created with the correct group right away, I need to look a bit more into this, but anyway...)
Splitting this into two sides: * inode quota: that is enforced directly by MDTs so should possible to re-introduce synchronous check without deadlocks? Frankly speaking this is the most important part for me. * block quota: I can imagine this will be difficult to fix properly, especially wrt. performance, but we don't really need a precise limit. As a thought, it might be possible to not do this synchronously but just check if the group already is over quota somehow and deny further user-induced chgrps in this case? I don't really know if MDTs already are aware of anything on this side, but since they should be responsible to distribute qunits to osts I believe they should?
( and third point: add tests for this!)
Thanks, Dominique
|
| Comments |
| Comment by Peter Jones [ 29/May/19 ] |
|
Hongchao Can you please investigate? Thanks Peter |
| Comment by Hongchao Zhang [ 06/Jun/19 ] |
|
the patch https://review.whamcloud.com/33996 is just updated and tracked at |
| Comment by Dominique Martinet (Inactive) [ 06/Jun/19 ] |
|
Thanks Hongchao, I'll have a look at the code and comment on gerrit. I just tested the patch first and it does restore functionality for block quota but not inode quota, it's probably missing some detail. |