Hi,
I have created an encrypted zfs volume with FreeNAS 8.3.1. As intended, each time after reboot the volume needs to be unlocked manually with a passphrase. Via GUI it works just fine.
Now I would like to setup a kind of replication script on another (remote) NAS which would do the following:
(1) wake-on-lan the FreeNAS according to a specified time schedule (with crontab and ipkg wakelan),
(2) unlock the encrypted volume on FreeNAS (via SSH),
(3) rsync certain folder on NAS to FreeNAS rsync module, and
(4) shutdown the FreeNAS remotely.
I've already made steps (1),(3),(4) working, and the question is how to cope with number (2)?
My guess is that it might be done with some command(s) like this:
geli attach -j [passphrase_file] -k [geli_key_file] [dev_to_unlock]
and then probably doing something with zfs pool.
If so, it would be possible to unlock from a remote machine via SSH:
ssh root@freenas geli attach -j [passphrase_file] -k [geli_key_file] [dev_to_unlock]
Thanks!
I have created an encrypted zfs volume with FreeNAS 8.3.1. As intended, each time after reboot the volume needs to be unlocked manually with a passphrase. Via GUI it works just fine.
Now I would like to setup a kind of replication script on another (remote) NAS which would do the following:
(1) wake-on-lan the FreeNAS according to a specified time schedule (with crontab and ipkg wakelan),
(2) unlock the encrypted volume on FreeNAS (via SSH),
(3) rsync certain folder on NAS to FreeNAS rsync module, and
(4) shutdown the FreeNAS remotely.
I've already made steps (1),(3),(4) working, and the question is how to cope with number (2)?
My guess is that it might be done with some command(s) like this:
geli attach -j [passphrase_file] -k [geli_key_file] [dev_to_unlock]
and then probably doing something with zfs pool.
If so, it would be possible to unlock from a remote machine via SSH:
ssh root@freenas geli attach -j [passphrase_file] -k [geli_key_file] [dev_to_unlock]
Thanks!