Linux df not updating dating a greek
I've discovered that some objects remain in the root dataset after deleting all the files in it.
In my test, I created a pool name junk, copied a bunch of files into it and then removed them.
I just did a bit more digging and I find be possibly related to, at least, the leakage that I've discovered. It would be interesting for you to examine the output of zdb -dddd gfs and see what type of objects are layout around when you have some leakage.
They'll be pretty obvious because their path will show up as "??? @fabiokorbes After a bit more experimenting, I discovered that, at least in non-xattr=sa mode in which extended attributes are stored in their own ZFS directory and file objects, removing a file does not free its space.
Some applications are famous for bad behavior related to this fact.
For example, I have to deal with some versions of My SQL that will not properly close some files, over the time I can find several GB of space wasted in /tmp.
On the other side, Windows used to complain that it can't delete a file because it is in use, seems that in later incarnations explorer will pretend to delete the file.
So, the disk usage should be constant in a short term. it always increase (as reported by df or zfs list commands).
Although, the disk usage reported by du command remains constant. So I don't think it is an asynchronous-delete or recently-freed issues. or is there something I could do to make the deletions work?
We are testing the use of a ZFS volume to store logs.
We delete old logs in the same pace we write new ones.Further debugging with zdb -dddd shows me that when the dataset is in this condition (after having copied lots of files and directories and then deleting them), there is unprocessed stuff in the ZFS delete queue and lots of "ZFS directory" objects laying around like this: uid 0 gid 0 atime Thu Jun 27 2013 mtime Thu Jun 27 2013 ctime Thu Jun 27 2013 crtime Thu Jun 27 2013 gen 715 mode 40755 size 2 parent 7 links 0 pflags 40800000144 xattr 5056 microzap: 1024 bytes, 0 entries Even further examination shows me that these objects are still in the ZFS delete queue object (seemingly always object #3).