Big Sur: zfs kext not auto-loaded

All your general support questions for OpenZFS on OS X.

Big Sur: zfs kext not auto-loaded

Postby perry » Thu Apr 29, 2021 6:52 pm

I (sacrificed a chicken,) upgraded my zfs-bearing iMac to Big Sur, and installed 2.0.0-rc6 onto it.

It seems to all be working, except for one thing: the zfs.kext doesn't auto-load on boot. I need to (kmutil load ...) it manually and then import my pools.

The very same 2.0.0-rc6 works just fine on a MacBook sitting next to it, so it's not a generic problem. The only difference I can think of is that the (working) MacBook was natively installed to Big Sur (it's brand spanking new), while the iMac with problems has a long, storied history of OS upgrades.

Any ideas? I've already tried to induce kmutil to rebuild its caches (it says it did), with no improvement. MacOS 11.3, zfs 2.0.0-rc6.

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

Re: Big Sur: zfs kext not auto-loaded

Postby lundman » Thu Apr 29, 2021 7:01 pm

You perhaps had to do that the very first time, but future reboots should load fine?
User avatar
lundman
 
Posts: 1034
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Big Sur: zfs kext not auto-loaded

Postby perry » Sat May 01, 2021 8:50 am

lundman wrote:You perhaps had to do that the very first time, but future reboots should load fine?

That's the thing - they don't. It happens every time. I'm not that familiar with the kmutil universe, so I may just be making an obvious mistake, but how do I figure it out? I can limp along for now (this mac doesn't reboot very often, which sadly also makes experimentation a bit painful).

FWIW, kmutil dumpstate says
org.openzfsonosx.zfs v2.0.0 (3863C38F-C065-3184-BDA8-413843188568) in executable kext bundle org.openzfsonosx.zfs at /Library/StagedExtensions/Library/Extensions/zfs.kext signed @team(735AM5QEU3) (aca877323d51d6322a1ae93a09dbb278258836cc) flags [0, 1, 4, 5, 8, 9, 14]

I have no idea if that looks right (what are those flags?).

Anyway, relatively minor problem. Just annoying.

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

Re: Big Sur: zfs kext not auto-loaded

Postby lundman » Sat May 01, 2021 4:32 pm

Honestly that is a bit surprising.. you could put kextload into the autoimport script before the "zpool import" line - but honestly I thought the zfs binaries also loaded the kext automatically.

Let's see if others report the same issue
User avatar
lundman
 
Posts: 1034
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Big Sur: zfs kext not auto-loaded

Postby UnConundrum » Mon May 03, 2021 6:04 am

I'm not as able to track things down, but I can tell you that I have to do a sudo zpool import tank on every reboot.
UnConundrum
 
Posts: 13
Joined: Tue Dec 03, 2019 12:30 pm

Re: Big Sur: zfs kext not auto-loaded

Postby lundman » Tue May 04, 2021 3:43 pm

OK ilovezfs did a bunch of testing in this area, and it is a problem that happens with upgrading kext. It has to be Approved twice which is annoying as hell.
User avatar
lundman
 
Posts: 1034
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Big Sur: zfs kext not auto-loaded

Postby calbear88 » Wed Sep 08, 2021 7:56 pm

I upgraded my mac to Big Sur 11.5.2 and upgraded zfs 2.1.0 as well. The zfs kext does not load on reboot. I tried installing the zfs twice using the pkg installer. Everything works fine if I run the terminal command "sudo kmutil load -p /Library/Extensions/zfs.kext", and then import my pools after each reboot.

I also had the same issue with SoftRaid as well, so I have to manually load its kext on each reboot with the command "sudo kmutil load -p /Library/Extensions/SoftRAID.kext"

According to the softraid developers "There is a bug in Big Sur, where drivers designated as "auto-loading" is not loaded at startup. This affects multiple drivers, including the SoftRAID driver. SoftRAID 6.1 beta 7 adds a preference to work around this. If you are running Big Sur (only, this is not available for Monterey, as we anticipate a fix from Apple before Monterey is released), if you go to "Application" preferences, there is an option to "Manually load SoftRAID driver on restart. SoftRAID will run a script at the restart to manually load the SoftRAID driver."

https://forums.softraid.com/macos-issue ... -6-1-beta/

According to posts in the softraid forum, a clean install of Big Sur seems to fix the issue for many, so it may have to do some legacy kext in the operating system.

Just wondering if there is a script that could be created that loads the zfs kext on each reboot until this bug is fixed by Apple (assuming the bug described by SoftRaid developers is the same one affecting ZFS)

Thanks
calbear88
 
Posts: 25
Joined: Sun Mar 08, 2015 3:01 pm

Re: Big Sur: zfs kext not auto-loaded

Postby lundman » Sun Sep 12, 2021 5:14 pm

The new kext framework is frustrating to work with. Could you confirm that doing the trigger-panic-medic dance, then approving the kexts again, does not work? I've found the trigger-panic-medic process to be the best way to "reset" the kext subsystem. But if that doesn't work, it would be frustrating.
User avatar
lundman
 
Posts: 1034
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Big Sur: zfs kext not auto-loaded

Postby calbear88 » Fri Sep 17, 2021 10:44 pm

I updated my mac to Big Sur 11.6 and now the zfs kext loads at startup automatically. Sorry, I didn't get a chance to try the troubleshooting step you mentioned.
calbear88
 
Posts: 25
Joined: Sun Mar 08, 2015 3:01 pm


Return to General Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron