What are those files "(on_delete_queue)"?

All your general support questions for OpenZFS on OS X.

What are those files "(on_delete_queue)"?

Postby Arne » Wed Oct 20, 2021 7:24 am

I've made a "zfs diff -F zfs/arne/Downlods@2021-10-09" on one of my datasets to look for files that have changed.
Strange enough I found a lot of ...

Code: Select all
+   F   /Users/arne/Downloads(on_delete_queue)
+   F   /Users/arne/Downloads(on_delete_queue)
+   F   /Users/arne/Downloads(on_delete_queue)
+   F   /Users/arne/Downloads(on_delete_queue)
+   F   /Users/arne/Downloads(on_delete_queue)
+   F   /Users/arne/Downloads(on_delete_queue)
+   F   /Users/arne/Downloads(on_delete_queue)
...


But I don't know what these "files" mean. There are no files I had deleted lately. The trash is empty.
Google only found this old entry https://utcc.utoronto.ca/~cks/space/blo ... eleteQueue from 2015 and it didn't help me.
So, where do those files come from? And how do I get rid of them? Cause I don't want them in my next snapshot.

Another "thing" of zfs:
There are a few "<xattrdir>" behind filenames, too.

Code: Select all
+   /   /Users/arne/Downloads/xing_event_3576385.ics/<xattrdir>
+   F   /Users/arne/Downloads/xing_event_3576385.ics/<xattrdir>/com.apple.quarantine
...
-   F   /Users/arne/MEGA/Icon\0015
-   /   /Users/arne/MEGA/Icon\0015/<xattrdir>
-   F   /Users/arne/MEGA/Icon\0015/<xattrdir>/com.apple.ResourceFork
-   F   /Users/arne/MEGA/Icon\0015/<xattrdir>/com.apple.FinderInfo
M   F   /Users/arne/MEGA/<xattrdir>/com.apple.FinderInfo
...


Maybe this was caused by me creating the pool/datasets without an explicite "xattr=...".
"zfs get" shows me it is "xattr=on" on all the datasets of the pool.

My pool is on a Mac Mini from 2009, with OSX 10.11 El Capitan and zfs 2.1.0
My system: Mini 2009 (early) with El-Capitan 10.11.6
Arne
 
Posts: 30
Joined: Mon Oct 29, 2018 7:59 am

Re: What are those files "(on_delete_queue)"?

Postby fissionfan » Wed Oct 20, 2021 4:21 pm

looks like those files are referenced by older snapshots....
https://utcc.utoronto.ca/~cks/space/blo ... eSnapshots
(follow up to the post you linked)
fissionfan
 
Posts: 8
Joined: Sun Dec 14, 2014 4:34 pm

Re: What are those files "(on_delete_queue)"?

Postby Arne » Thu Oct 21, 2021 6:38 am

I thought I've read it bevor. But maybe I was not prepared at that moment to "get" it. Thanks for hinting me to the post again.

Fortunately the problematic snapshot was the last I took. There is no newer one than @2021-10-09.

Making diffs of previous snapshot pairs showed that the delete_queue was captured only in this snapshot zfs/arne/Downlods@2021-10-09.

So I solved my problem by doing this:

- I took a new snapshot @delete
- made an incremental send/recv to the external pool zfs-extern from @2021-10-09 to @delete
- destroyed @2021-10-09 on the local and the external pool
- and renamed @delete to @2021-10-09 on both pools so that I could make incremental send/recv from the same base snapshot-name for all of the other datasets of the pool zfs in the future.

Strange that there were only delete_queues captured in "Downloads" and not in one of the other datasets, too.
I don't know how it could happen that those queues were captured. There were no deleting of files before and no files were open at the moment of the snapshoting.

Next time I make a diff of all my datasets to proof that there are no delete_queues waiting.
Is this the right way? Or how do I recognize that there is a queue waiting so that I prevent myself from catching it in a snapshot again?

And how do I get rid of them before I take a snapshot if some show up so that I can make the next send/recv? Or do I have to wait till zfs works itself thru the delete_queue?
My system: Mini 2009 (early) with El-Capitan 10.11.6
Arne
 
Posts: 30
Joined: Mon Oct 29, 2018 7:59 am

Re: What are those files "(on_delete_queue)"?

Postby Arne » Wed Nov 10, 2021 8:22 am

Ok, I still wondered why these "on_delete_queue" files are still present.
To test it I made a new dataset and than snapshotted a lot after deleting files or copying files or clearing the trash (".Trashes") with the trashcan sympol to try to bring on the on_deleted_queue files.

Under 2.1.0 I found out that these files will not appear when I use xattr=sa instead of on (that means "dir", I suppose).
(The "xattr" entries will not be made either, but that was as expected.)

So, with 2.1.0:
sa => no "on_delete_queue"
on => "on_delete_queue" files will show up (with "+" or "-" before it)

I switched back to 1.9.4, just to look if it is different there.
And it is.
No "on_delete_queue" files either with xattr=on or sa.

(The xattr files show up with xattr=on as expected and not when I use sa, as expected.)

As this is a strange behaviour under 2.1.0 I'll stay on 1.9.4 just to be/feel safe.
My system: Mini 2009 (early) with El-Capitan 10.11.6
Arne
 
Posts: 30
Joined: Mon Oct 29, 2018 7:59 am

Re: What are those files "(on_delete_queue)"?

Postby Arne » Fri Nov 12, 2021 1:57 pm

I felt save with 1.9.4 but than the "on_delete_queue" entries in "zfs diff zfs/arne/Downloads@2021-10-09" are back:
Code: Select all
...
+ /Users/arne/Downloads(on_delete_queue)
...
- /Users/arne/Downloads(on_delete_queue)
...


And a new entry:
Code: Select all
Unable to determine path or stats for object 37946 in zfs/arne/Downloads@zfs-diff-1092-000000000008d54e: Stale NFS file handle


I googled for "Unable ..." and found the command "zdb -dddd ..."

So I did "zdb -dddd zfs/arne/Downloads/ > kgw"
and looked inside kgw, searched for 37946 and found that it is a directory.

I deleted the directory, but now zfs diff showed me another number by "Unable..." and this time it was a file.

I made a rollback to zfs/arne/Downloads@2021-10-09 and both problems are gone.
No on_delete_queue entries and no "Unable...".

Copied some files. Deleted some files. But neither on_delete_queue nor "Unable..." showed up again.

Don't know why those came up and now they don't. Or what I need to do to let them appear again.

So, it seems it is something that is showing up not only in 2.1.0 but in 1.9.4, too.
And the Downloads directory is the only one where those things happened.

Strange.
My system: Mini 2009 (early) with El-Capitan 10.11.6
Arne
 
Posts: 30
Joined: Mon Oct 29, 2018 7:59 am

Re: What are those files "(on_delete_queue)"?

Postby Arne » Sun Nov 14, 2021 10:53 am

They came back.

Actual status of my knowledge:

I've done tests with the newly created Dataset "zfs/arne/test" .

It seems when I copy something with Finder or when I downloaded something with a browser into the "zfs/arne/test" Dataset and then delete it those on_delete_queue entries are showing up.
And they are in number as the amount of xattrs that were associated to the files(e.g. "com.apple.quarantine" or other "com.apple...").
Finder is adding xattrs when copying or duplicating files. The same when I downloaded something. I guess it is the system file dialog that does it.

When I use rsync or cp those xattrs won't be added. Even when I use "rsync -XAa" or alike with cp. And when I delete files that are copied with rsync or cp than there are no on_delete_queue entries.

An entry "Unable ..." showed up, too. But I cannot replicate what needs to be done to let it show up. I've done some work with files and there are on_delete_entries and no "Unable...". But than out of nothing those "Unable ..." shows up when I delete something.

Interesting:
When I copy or download something and than making a snapshot and than deleting those files, in the "zfs diff zfs/arne/test@snapshot2" the xattrs are gone (com.apple....) and only the entries for the deleted files and one "<xattrdir>" for each file with a "-" at the beginning are shown:

- /Users/arne/test/file
- /Users/arne/test/file/<xattrdir>

and no "/Users/arne/test/file/<xattrdir>/com.apple.FinderInfo" or similar.

Still strange.
My system: Mini 2009 (early) with El-Capitan 10.11.6
Arne
 
Posts: 30
Joined: Mon Oct 29, 2018 7:59 am


Return to General Help

Who is online

Users browsing this forum: Google [Bot], jawbroken and 32 guests

cron