- Distribution & Version Linux Mint 20. Cinnamon and POP_OS 20.10
- Kernel information 5.4 and 5.8
I have set up a mirrored pair of 4tb drives with ZFS to store data. I run LM 20 Cinnamon and dual boot POP_OS which my daughter uses. ZFS works fine for one or the other but requires commands to import the pool and mount to data sets if you boot into the other OS.
I’m trying to figure out how to make the process of unmounting/exporting and importing/mounting automatic. I have scripts to do these things but they required sudo. I assume that means they would would need to be run in the root part of the boot/shutdown processes to be automatic.
Am I missing something? I would have thought this use case would be addressed in ZFS but I can’t find it explained anywhere. Is it so blindingly obvious that nobody ever had to ask the question? (This possibility seems likely to me.)
If my assumptions are correct about having to add the commands (or my scripts) to the startup/shutdown routines, where do I insert the zpool import and zfs mount / zfs unmount and zpool export commands so they are run with proper privileges?
Thank you for any thoughts or advice.