[LU-11017] quota exceeded returned when creating files with root user in directory where setgid is set Created: 14/May/18 Updated: 29/May/18 Resolved: 29/May/18 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.12.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Wang Shilong (Inactive) | Assignee: | Wang Shilong (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
Set setgid flag on the directory and set inode hard quota for the gruop.
# cd /lustre
# mkdir aaa
# chown test1:tes1 aaa
# chmod g+s aaa
# lfs setquota -g test1 -I 4096 /lustre
With test1 group, create many files until quota exceeded occur.
# su - test1
$ for i in `seq -w 0001 4096`; do touch ${i} ; done
$ exit
Then, with root user, create a directory. It returns quota exceeded error.
# mkdir bbb
mkdir: cannot create directory ‘bbb’: Disk quota exceeded
reason is Lustre try to check quota for file owner uid, gid and it will skip quota type check if this For setgid, even root user try touch a file, the file's group id will still inherit from its parents. The idea should be Like GPFS or ext4, that we pass CAP_SYS_RESOURCE down and use this |
| Comments |
| Comment by Gerrit Updater [ 14/May/18 ] |
|
Wang Shilong (wshilong@ddn.com) uploaded a new patch: https://review.whamcloud.com/32378 |
| Comment by Peter Jones [ 14/May/18 ] |
|
Thanks Shillong |
| Comment by Gerrit Updater [ 29/May/18 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/32378/ |
| Comment by Peter Jones [ 29/May/18 ] |
|
Landed for 2.12
|