Hide Forgot
if device files are created (using mknod), then the total disk usage of all the device files becomes 7.9MB but df output shows used space as 0. And while creating those device files it dows not says "No disk space available". There are total 2000 device files.
same case with pipes, directories and even touching of files. Only dd files and copying some data containing files will increase the used space in the df output. Otherwise it will show used space as 0, but actually the total usage would be more than 40MB.
The quota translator is loaded above AFR with a disk-usage-limit of 5MB. When a 10MB file is written on the mount point using dd (dd if=/dev/zero of=file bs=1M count=10) then the command exited saying "closing file: No space left on device". But when du command is issued on that file it shows the disk usage as 8.8 MB and 7.7 MB which is greater than 5MB. When df command is issued it shows usaed space as 5MB and available space as 0. Now if a 5MB file is created (dd if=/dev/zero of=file bs=1M count=5), then it creates the file, and if a 1MB file is created then it says no space left on the device and the 1MB file is not created. It seems when continuously data is being written, then it writes more than 5MB and then says "No space left on device." Otherwise if a separate file is created other than the 5MB file, it works fine.
For all cases which create directories, device files and the like, we need to add/subtract values from their parent directories. Currently it's just checking the statbuf, which gives st_blocks =0 and quota assumes that it has not taken any disk space. Patch coming.. The continuous data scenario is also a manifestation of the same problem. Will verify it with fixes to the above. We also need a fix for the quota xlator to be multiple clients compatible.
PATCH: http://patches.gluster.com/patch/2923 in release-3.0 (features/quota: Account for disk usage changes in directories and device files)
PATCH: http://patches.gluster.com/patch/2926 in release-3.0 (features/quota: Handle multiple clients on volume quotas.)
PATCH: http://patches.gluster.com/patch/2927 in release-3.0 (features/quota: Minor quota fixes due to xattrop FOP which results in quota not to work properly on the client side.)
Quota translator will be production ready only in release-3.1.x
Will release-3.1.0 will fix this bug?
All quota related bugs in one place. *** This bug has been marked as a duplicate of bug 1243 ***