Trouble with import-at-boot

All your general support questions for OpenZFS on OS X.

Trouble with import-at-boot

Postby perry » Tue Jul 28, 2020 11:25 pm

I have a system where the automatic import-on-boot simply doesn't work. I dug into it a bit, and at the time the zpool-import-all.sh script runs, the daemons are active, the /var/run/disk files are populated, and everything looks normal... except that the import -a command imports nothing. I stuck a bunch of prints into that script, and the /var/run/disk files exist, the /dev/disk* files are fine, the daemons are running. If I explicitly put "import <poolname>" into the script, it complains that it can't find the pool. The logs contain nothing interesting.

When I run the pool-import-all.sh script from Terminal (as root), it works (finds and imports the pool). Yet the startup script is stuck - if I unload it and re-load it, it still can't find the pool. So it looks like it's something about the launchd environment that's messing things up. This is completely reproducible (I've bounced that system a dozen times by now).

On another, very similar system (same zfs and OS versions), the magic import-on-boot trick works just fine. (That pool has some patina on it.)

Any idea how to debug this?

zfs-1.9.4-0 on Catalina 10.15.6 (also happened on 10.15.5). SIP enabled. The pool is only a week old and was made here (on 10.15.5).

Cheers
-- perry
perry
 
Posts: 8
Joined: Mon Mar 09, 2015 7:27 am

Re: Trouble with import-at-boot

Postby perry » Thu Jul 30, 2020 5:36 pm

Disabling SIP makes the import script work.

So is there an incantation somewhere for saying, "Dear SIP, I really want zpool to see the disks even in startup scripts/system context/whatever, please?" Giving zpool full-disk access as the user doesn't help.

Cheers
-- perry
perry
 
Posts: 8
Joined: Mon Mar 09, 2015 7:27 am

Re: Trouble with import-at-boot

Postby FadingIntoBlue » Fri Jul 31, 2020 1:06 am

I seem to remember giving bash (sh, zsh) full disk access was necessary at some point with auto mount, might be wrong but it is quickly tried.
FadingIntoBlue
 
Posts: 49
Joined: Tue May 27, 2014 12:25 am


Return to General Help

Who is online

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