Use Trash with local raidz2?

All your general support questions for OpenZFS on OS X.

Use Trash with local raidz2?

Postby crayonshin » Tue Jan 21, 2020 6:05 pm

Hello, it's been a while since I tried to use ZFS on macOS so I don't remember if this was normal.

I created a 4 disk raidz2 pool with one dataset using the recommended method from the wiki:
Code: Select all
sudo zpool create -f -o ashift=12 -O compression=lz4 -O casesensitivity=insensitive -O atime=off -O normalization=formD tank raidz2 disk3 disk4 disk5 disk6

This worked fine and I can copy files over to it. However, when I try to delete a file, it asks if I'm sure because it will permanently be deleted. I know this happens with network shares but was hoping it would work with local ZFS mounted datasets.

Am I doing something wrong or is this just how it is? Thanks!

EDIT: forgot to say I'm on Catalina 10.15.2 with latest OpenZFS 1.9.3
crayonshin
 
Posts: 11
Joined: Sat Oct 14, 2017 1:12 pm

Re: Use Trash with local raidz2?

Postby lundman » Tue Jan 21, 2020 6:10 pm

You could try deleting the .Trashes directory, and export/import it to let Finder create a new one.
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Use Trash with local raidz2?

Postby crayonshin » Tue Jan 21, 2020 6:16 pm

I did try to delete and recreate in the root of the dataset when I found this super old cnet article:
https://www.cnet.com/news/trash-not-wor ... mediately/

I will try what you suggest now.

For reference, is there a difference between .Trash and .Trashes and where each should go? Thank you!
crayonshin
 
Posts: 11
Joined: Sat Oct 14, 2017 1:12 pm

Re: Use Trash with local raidz2?

Postby crayonshin » Tue Jan 21, 2020 6:21 pm

lundman wrote:You could try deleting the .Trashes directory, and export/import it to let Finder create a new one.

Awesome, that worked!

Weird that I have to do it on a fresh pool and dataset. I destroyed and recreated several times and the Trash never worked. Like you said though, I deleted .Trashes from the zpool root and the dataset root, exported/imported and voila! Thanks again!
crayonshin
 
Posts: 11
Joined: Sat Oct 14, 2017 1:12 pm

Re: Use Trash with local raidz2?

Postby lundman » Tue Jan 21, 2020 9:35 pm

Yeha, it's actually https://github.com/openzfsonosx/zfs/com ... aa8cfa5101
turns out that the first 16 "file ID numbers" are reserved, and alas, .Trash is nearly always guaranteed to be created among the first 16 things on the dataset. (.fsevents generally gets 2, .Spotlight 3, and so on).

And by deleting the .Trashes, and letting Apple re-create it (which it does on mount) you are "virtually guaranteed" a new ID. You can see "ID"s with "ls -li". It's the first number.

The next release (1.9.4?) will have this fix. There is a .pkg of this version for those who wants to test it to make sure everything works. In this version, "ls -li" will show seriously massive numbers, which arethe 1-16 mapped to -1 to -16 (uint64_t).
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Use Trash with local raidz2?

Postby crayonshin » Tue Jan 21, 2020 11:39 pm

I poked around the openzfsonosx repo on GitHub but could not find a new .pkg. Where can I get it? I will test it, at least with my Trash problem. Thanks!
crayonshin
 
Posts: 11
Joined: Sat Oct 14, 2017 1:12 pm

Re: Use Trash with local raidz2?

Postby lundman » Wed Jan 22, 2020 3:58 pm

User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Use Trash with local raidz2?

Postby crayonshin » Wed Jan 22, 2020 10:05 pm

Thanks, that worked. I destroyed and recreated the pool with the same parameters I was using when I encountered the issue but this time the Trash worked as expected.

I want to put the data on my pool now but not sure if I should wait for the final 1.9.4 release. This Trash fix and the Finder sidebar issue mentioned (#748) don't have anything to do with the formatted pool right? I could start using the pool now and fixes in the new package would apply without having to recreate the pool right?

Thanks again, looking forward to the next release!
crayonshin
 
Posts: 11
Joined: Sat Oct 14, 2017 1:12 pm

Re: Use Trash with local raidz2?

Postby lundman » Thu Jan 23, 2020 12:58 am

No changes at all with the data on the pool, only how we represent it to OSX.
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Use Trash with local raidz2?

Postby crayonshin » Thu Jan 30, 2020 9:14 pm

lundman wrote:https://github.com/openzfsonosx/zfs/issues/747#issuecomment-575470319


Hi Lundman! Just an update to this. Didn't know whether to start a new thread in hackintosh section or just continue here because it has to do with the out-1015-signed.zip package that had the Trash fix for my earlier problem.

I did a fresh install of Catalina 10.15.3 and then installed that package and zfs_util kept crashing my system every 10 minutes or so until I removed it. It's the same exact hardware and Clover configuration I was using before on 10.15.2 so don't know what the problem is.

I have attached one of the crash logs I found but that's way over my head. I may try to go down to .2 this weekend if I have time. Thank you!
Attachments
zfs_util_2020-01-30-002015_hack1.txt
Crash log on hackintosh, fresh install of 10.15.3.
(23.36 KiB) Downloaded 370 times
crayonshin
 
Posts: 11
Joined: Sat Oct 14, 2017 1:12 pm

Next

Return to General Help

Who is online

Users browsing this forum: Google [Bot] and 28 guests

cron