How to get an encrypted dataset to automatically load-key and mount at boot?

ajgnet

Explorer
Joined
Jun 16, 2020
Messages
65
I have an encrypted dataset but every time I reboot my TrueNAS server I have to ssh into the machine and zfs load-key followed by zfs mount. Is there a way this can be done automatically on boot? I'm only worried about security in the event I forget to wipe a drive when disposing or selling after use -- not really concerned about someone accessing my documents on-premise, if that makes sense!
 
Joined
Oct 22, 2019
Messages
3,641
Is this a child dataset underneath another encrypted dataset that is unlocked with a passphrase?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
I'm only worried about security in the event I forget to wipe a drive when disposing or selling after use
So use encryption without a passphrase... TrueNAS handles the keys (and stores them in the system config), so there's no need to do anything to mount them automatically. The disks can be safely disposed without wiping.
 

ajgnet

Explorer
Joined
Jun 16, 2020
Messages
65
So use encryption without a passphrase... TrueNAS handles the keys (and stores them in the system config), so there's no need to do anything to mount them automatically. The disks can be safely disposed without wiping.
That's great. Thank you
 
Top