Executive Summary:
I want to auto-import ONE pool consisting of a pair of internal NVMe drives as quickly as possible, since it will contain my home directory, and auto-import nothing else.
More Detail:
Lundman's comment to another thread of mine made me go and look at zpool-import-all.sh for the first time. I've decided that I actually don't want ALL my pools auto-importing, due to the snafu that seems to have borked my backup pool, BUT, I actually DO want one pool to auto-import, and I want to do it as quickly as possible. Some (most?) of this may be based on some faulty assumptions so please tell me if so.
Basically the scenario is that I have a 2019 Mac Pro and it has, internally, a Sonnet board with two NVMe drives that are configured as a ZFS mirror. I would like to store my home folder on that device.
I am ASSUMING that the pool needs to be ready really quickly, because if I try to log on before it is ready, bad stuff will happen. (Correct me if I'm wrong.)
I am ASSUMING that this pool should be ready to import REALLY quickly since these are NVMe drives plugged straight into a PCIe slot inside the machine. Nothing to spin up, etc. (Correct me if I'm wrong.)
Many other disks are also connected to this Mac, externally, via Thunderbolt. These include 8 HDDs and 16 SSDs. I am ASSUMING that all that may take a while to become available, and thus may delay the appearance of the invariant.idle file. (Correct me if I'm wrong.)
Based on the above ASSUMPTIONS, what I would like to do is modify the script so that it no longer waits for the invariant.idle to become available and just imports the ONE pool I care about without further ado. The point of my post is to see what holes there are in my thinking and if there's a better way to accomplish what I want, namely importing ONE mirror pool consisting of a pair of internal NVMe drives as quickly as possible, and importing nothing else.
Specifically:
1. I plan to remove everything from the file except as noted below.
2. What about the /bin/sync line? Remove or modify, and if so, how?
3. Any problem with inserting /usr/sbin/sysctl -w kstat.zfs.darwin.tunable.zfs_arc_max=1000000000 since the conf file isn't getting read properly?
4. I plan to make the import line: "${ZPOOL}" import -d /var/run/disk/by-serial Data