Running a script after zpool-import-all?

All your general support questions for OpenZFS on OS X.

Running a script after zpool-import-all?

Postby Haravikk » Wed Apr 07, 2021 11:56 pm

I'm using an encrypted dataset on ZFS on macOS, so need to unlock it before it can be used; currently I'm using a launchd task to grab the password from security (Keychain) and pass into a zfs mount command as recommended on the wiki, but to make this work reliably I've slapped a delay in front to give zpool-import-all.sh a chance to run first.

While this works, it doesn't seem like the most "correct" way to do it; so what I'm wondering is, is there a better way to detect once my zpool is ready, or better yet, have one of the OpenZFS scripts trigger a script of my own? I know I could edit one of the provided scripts but I'd prefer to leave them as-is so they don't get overwritten by an update, or forgotten in an upgrade.

Also, on an unrelated note, is there a new location for /etc/zfs/zsysctl.conf? Several of the wiki articles reference settings to be placed here, but I don't see /etc/zfs/zsysctl.conf or /etc/zfs/zsysctl.conf.example in my installation (2.0), has the location for this changed or is the example just missing for me for some reason? Not that I need to change anything, ARC size seems fine for the moment, but it seemed worth checking.
Haravikk
 
Posts: 16
Joined: Tue Mar 17, 2015 4:52 am

Return to General Help

Who is online

Users browsing this forum: No registered users and 1 guest