From: Matthew Ahrens [mailto:[email protected]] Sent: 星期二, 十一月 18, 2014 12:40 To: Fred Liu Cc: [email protected]; [email protected] Subject: Re: [OpenZFS Developer] usedbydataset > refquota ?
On Mon, Nov 17, 2014 at 8:19 PM, Fred Liu <[email protected]<mailto:[email protected]>> wrote: It looks I have typo in following: /* All of these (used, usedby*, refer, quota, refquota) include metadata (e.g. indirect blocks). [Fred]: So “quota” overrides “refquota” as in my case? Otherwise the logic should be {“used” < “referenced” < “refquota”} per this reply. */ The one I want to state is { “*usedbydataset*” <= “referenced” <= “refquota” }. Yes, I think that's right. [Fred]: So “usedbydataset > refquota” breaks ZFS quota design intention and is abnormal due to the bug 4950. But there are still some unclear points for me here: 1): To enable file removing, my hacking is "$new_refquota = $usedbydataset + 1". After this, we can remove files. But it looks like a coincidence. The nitty-gritty is the bug 4950. Right? 2): refquota doesn't account usedbysnapshot. Right? Correct. [Fred]: 1): It looks recompiling kernel is a must for illumos-bases OSes. I am thinking about the technology to patch kernel lively. And will start a separate thread. 2): The space for snapshot itself(pointer address) is accounted in usedbysnapshot. And unlimited number of snapshots are still applicable even being enforced with refquota as long as there enough physical space. Right? 3): In which condition, ["usedbydataset" != "referenced”] is true? (assuming no descendent file systems and snapshots) If the dataset is a clone, its "usedbydataset" does not include any space shared with the origin (because this space will not be recovered if the dataset is destroyed), but "referenced" does. [Fred]: Gotcha. --matt Thanks. Fred From: Fred Liu Sent: 星期一, 十一月 17, 2014 19:41 To: 'Matthew Ahrens' Cc: [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]> Subject: RE: [OpenZFS Developer] usedbydataset > refquota ? Matt, Thank you so much! ^--^. See my comment below. Fred From: Matthew Ahrens [mailto:[email protected]<mailto:[email protected]>] Sent: 星期一, 十一月 17, 2014 15:52 To: Fred Liu Cc: [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]> Subject: Re: [OpenZFS Developer] usedbydataset > refquota ? On Sun, Nov 16, 2014 at 10:46 PM, Fred Liu <[email protected]<mailto:[email protected]>> wrote: We just met the case that usedbydataset is bigger than refquota. It prevents users from removing files while the file system is full. Do you have the fix for bug 4950? commit 4bb73804952172060c9efb163b89c17f56804fe8 Author: Matthew Ahrens <[email protected]<mailto:[email protected]>> Date: Mon Jul 7 11:49:36 2014 -0800 4950 files sometimes can't be removed from a full filesystem Reviewed by: Adam Leventhal <[email protected]<mailto:[email protected]>> Reviewed by: George Wilson <[email protected]<mailto:[email protected]>> Reviewed by: Sebastien Roy <[email protected]<mailto:[email protected]>> Reviewed by: Boris Protopopov <[email protected]<mailto:[email protected]>> Approved by: Dan McDonald <[email protected]<mailto:[email protected]>> [Fred]: Oh, the OS is a fairly old OpenSolaris 134b. I will check and test. I guess it could come from quota setting(we set both quota and refquota). Normally we have the equation -- “usedbydataset” = “userdata” + “metadata”. Will refquota also constraint metadata? All of these (used, usedby*, refer, quota, refquota) include metadata (e.g. indirect blocks). [Fred]: So “quota” overrides “refquota” as in my case? Otherwise the logic should be {“used” < “referenced” < “refquota”} per this reply. In this case, usedbydataset is only 98107 bigger than refquota(zfs get –Hp …). FYI, the "refquota" property constrains the "referenced" property. [Fred]: Ha! That is the place where this tiny delta resides. --matt It is really trivial if we don’t feed “-Hp”. zfs get quota,refquota,usedbysnapshots,usedbydataset,used cn03/3/is8169am NAME PROPERTY VALUE SOURCE cn03/3/is8169am quota 55G local cn03/3/is8169am refquota 50G local cn03/3/is8169am usedbysnapshots 3.24G - cn03/3/is8169am usedbydataset 50.0G - cn03/3/is8169am used 53.2G - For metadata is variable, I think it should not be accounted in refquota. Correct? Thanks. Fred _______________________________________________ developer mailing list [email protected]<mailto:[email protected]> http://lists.open-zfs.org/mailman/listinfo/developer
_______________________________________________ developer mailing list [email protected] http://lists.open-zfs.org/mailman/listinfo/developer
