This is regarding setting of Project Quotas/ Directory Quotas on ext4 filesystems. The patch for allowing Project Quotas in ext4 filesystems was submitted via patch https://lore.kernel.org/patchwork/patch/541895/ .
I have tried the below steps (followed by relevant commands): 1. Create file system on block device mkfs.ext4 /dev/nvme0n1
Enable Project quota tune2fs -O project -Q prjquota /dev/nvme0n1
Mount the block device: mount -o prjquota /dev/nvme0n1 /test
Enable Quotas on mount path: quotaon -Pv -F vfsv1 /test
Create the Project ID / Project Name for the Project Quota: echo 51:/test/first >> /etc/projects echo testproj:51 >> /etc/projid
Edit the Quota related to Project user: testproj edquota -P testproj
set the soft block unit to 10, hard unit to 20
- Conform the Quota is set
repquota -avugP
Report for project quotas on device /dev/nvme0n1 Block grace time: 7days; Inode grace time: 7days Block limits File limits
Project used soft hard grace used soft hard grace
testproj -- 0 10 20 0 0 0
- Start writing/ performing IO on said directory under /test/first
fallocate -l 10G ten.txt
- I can see that a file with size 10G is created at said location, and running the above command in #7 I can see no change in inodes consumed.
Are there any other steps to enable quotas on ext4 file systems?
Kernel Version:4.15.0-36-generic