Import requiring sudo

All your general support questions for OpenZFS on OS X.

Import requiring sudo

Postby RobRehnmark » Sat Nov 23, 2019 2:41 pm

Running 1.9.3 on Catalina 10.15.1.
An old pool that was created on another computer. SSD drives in an external enclosure. Slow but rock solid when it is imported.
It will not import unless I use sudo and so.. no auto import.
I usually don't mess around much with ZFS because it "just works" and I can't remember running into this problem before.
Super grateful to the people developing OpenZFS on OS X!
RaidZ2 working well for storing my data, OS X Server share for Time Machine, FCPX, iTunes, Photos, etc. on my Hackinstosh.
RobRehnmark
 
Posts: 59
Joined: Sat Oct 17, 2015 12:23 am

Re: Import requiring sudo

Postby Sharko » Mon Nov 25, 2019 9:48 am

Just want to clarify... are you saying that you used to boot up your computer with this external pool connected and powered on, and it would auto-import (let's call that scenario A)? Or are you saying that you have been used to connecting the external pool to an already running computer, and it would auto-import when connected (let's call that scenario B)?

For scenario A, in my experience, whether a pool auto-imports on power up is a hit or miss affair that depends on the timing of various things: how quickly the drive achieves a ready state, whether the OS has enumerated the bus it is on, if FileVault is in play, etc. It wouldn't be at all surprising if Catalina had different timing that "broke" auto-import.

For scenario B, I've never known that was even possible (to connect up and auto-import) without setting up an explicit script. I think it is theoretically possible to create such a script and set up launchd to run it, but I don't think it is a standard feature of OpenZFSonOSX.

As for sudo, in my experience all the zfs and zpool interaction requires you to be root, and thus sudo is required. The delegate feature is not implemented (last I checked) in OpenZFSonOSX, so you have to be root to execute the zfs and zpool commands. In some other ZFS implementations you can delegate the capability to run zfs import to a regular user account, but again, as far as I know we don't have that capability.
Sharko
 
Posts: 101
Joined: Thu May 12, 2016 12:19 pm

Re: Import requiring sudo

Postby RobRehnmark » Mon Nov 25, 2019 12:33 pm

Thanks for the reply.
The drives (5 SSD's) used to be connected on internal SATA ports and would always auto mount at boot. (Hackintosh)
They are now in an external USB enclosure. (Maybe this is the reason it's not auto mounting even when restarting the computer with the enclosure powered up?)
I was vary of trying the USB enclosure but it seems rock solid for weeks without any errors.

It's just been running smoothly for so long maybe I just forgot I need sudo.
I thought it was something wrong when it didn't auto mount.
Super grateful to the people developing OpenZFS on OS X!
RaidZ2 working well for storing my data, OS X Server share for Time Machine, FCPX, iTunes, Photos, etc. on my Hackinstosh.
RobRehnmark
 
Posts: 59
Joined: Sat Oct 17, 2015 12:23 am

Re: Import requiring sudo

Postby Sharko » Mon Nov 25, 2019 4:58 pm

Yes, I think it is not auto-importing because the USB bus doesn't get fully enumerated before the ZFS script runs to auto-import. On my Mac Pro 5,1 I still have to manually import pools, even those on the internal SATA bus. This reminds me that I've always meant to add a command to sleep for a few seconds to that auto-import script, and see if that makes it work for me. Before I was on Mojave I ran El Capitan, and I could use FileVault; the process of unlocking the disk with FileVault added enough delay that the pool would reliably import automatically.
Sharko
 
Posts: 101
Joined: Thu May 12, 2016 12:19 pm

Re: Import requiring sudo

Postby RobRehnmark » Mon Nov 25, 2019 11:40 pm

I checked the import script the other day and there is already a sleep of “10”.
I don’t know if that is seconds or something else?
I’ll try increasing it a bit.
Super grateful to the people developing OpenZFS on OS X!
RaidZ2 working well for storing my data, OS X Server share for Time Machine, FCPX, iTunes, Photos, etc. on my Hackinstosh.
RobRehnmark
 
Posts: 59
Joined: Sat Oct 17, 2015 12:23 am


Return to General Help

Who is online

Users browsing this forum: No registered users and 2 guests

cron