Hi
Thanks for the detailed response
ZFS volumes appear as mounted volumes in the side bar, and they have the "eject" icon on them. Macintosh HD also appears, but without the "eject" button.
Agree, we don't know how to prevent the ZFS datasets from being ejectable at this point. There appears to be no harm in them being ejectable, unless of course you eject one accidentally.
The first and easiest way to see that ZFS doesn't mount quickly enough is to set some app to "Open at Login" and have it immediately try to access some file in the ZFS volume. For example, I tried making VMWare Fusion open a particular VM at login, but it would pop up an error message saying machine could not be found, or something like that. To workaround that issue, I actually (sadly) use this crontab:
@reboot while [ ! -f '/Volumes/Virtual_Machines/Windows_10.vmwarevm/Virtual Disk.vmdk' ] ; do sleep 1 ; done ; sleep 5 ; open '/Applications/VMware Fusion.app'
Ah yes, its certainly true that there is no coordination as to when ZFS volumes become available verses when a user can login to a machine. It is because once the ZFS drivers are loaded it takes some time for the drives to be ready for use, and there is nothing in OSX that will cause it to wait for "all drives" to be available. The only way we can see of doing this is to modify the launchd item that starts the login screen to wait for ZFS. This has been discussed and rejected because it requires modifications to files that we feel could ultimately cause other problems for users.
The same issue applies if you use ZFS has your home directory, you have to wait after boot for the drives to mount before attempting to login.
When I close the lid of the computer, the computer sleeps. If I open it up again a little while later, everything is fine, which shows you that ZFS doesn't unmount for sleeps, and sleeps are no problem. But if you leave the lid closed for a long time (overnight) then the computer hibernates. In this case, OSX dumps all of its ram to disk, and unmounts everything, including Macintosh HD, and powers off. When you power on again, it remounts Macintosh HD, and loads all the RAM back from disk, before waking up any of the apps. It's *supposed* to be just like waking up from sleep, except it doesn't work that way in reality. For whatever reason, Macintosh HD obviously comes back before any of the apps, but the ZFS volumes don't mount quickly enough, so apps come back at the same time as ZFS, or earlier. I don't know if apps consistently come back faster than ZFS, or if there's a race, but I know I've never seen ZFS win the race. Every time I've done this so far, VMware gives me a message about virtual machine unavailable (or something like that) and the only option is to close vmware. This is not a problem if the guest VM is housed on Macintosh HD; only when the VM is housed on a "removable" volume such as ZFS.
I understand your description and will try to replicate. As stated yesterday ZFS does not unmount drives during hibernate. However this does not preclude your symptoms being caused by some similar effect.
Thanks
Brendon