

I was under the impression that the sync command makes device removal safer somehow. Even though the device was unmounted, there may be cached data that wasn’t written yet. Could be wrong about that, but it seems harmless to include.
Edit: looked it up, and umount calls sync, so there’s no need to include it. And if you do include it, sync before umount, like you said.
TrueNAS is pretty cool, and it uses ZFS by default. Should work for your use case. I couldn’t get into it, though. I have to manage every detail, absolutely no exceptions.