My understanding is incomplete, but I believe the problem is that it can take an unbounded amount of space to do a deletion atomically, so you can't just work around it by pre-allocating X amount of space...
And then, the (related) "problem" is that, to free space in that case, you need to (most commonly) truncate a file which is not required to be kept around after live copy deletion (by e.g. snapshots), and attempting to figure out a priori which files meet that criteria is...exciting. You could try to work around it by grossly overprovisioning a buffer, as Saso suggests, with e.g. zfs create foo/BUFFER -o reservation=1024G -o canmount=off, and then a DTrace-based daemon that notices ENOSPC returns from delete operations and turns the reservation down by 1G or so, with presumably an eventual reset condition...or just turning it down by hand when things break. ;) Disclaimer: I _believe_ that changing reservation is an operation you can do while getting ENOSPC from rm calls, but I don't have a handy full FS to test on, and I haven't tried implementing the above, so it may have flaws that render it infeasible at best. - Rich On Wed, Mar 19, 2014 at 7:05 PM, Saso Kiselkov <skiselkov...@gmail.com> wrote: > On 3/19/14, 11:58 PM, Xin Li wrote: >> Hi, >> >> Craig have hit this today on one of our build system where rm gives >> ENOSPC (No space left on device) and found an online article at >> http://www.surlyjake.com/blog/2010/01/19/zfs-cant-rm-no-space-left-on-device/ >> .. >> >> Will it be possible for us to reserve certain amount of space for each >> znode, so that we never run out of space when removing a file from a >> pool that is full? > > How about creating a fixed-size dataset that simply works as a "spacer" > to make sure you never dip below a dangerously low amount of space? > > -- > Saso > _______________________________________________ > developer mailing list > developer@open-zfs.org > http://lists.open-zfs.org/mailman/listinfo/developer _______________________________________________ developer mailing list developer@open-zfs.org http://lists.open-zfs.org/mailman/listinfo/developer