Auto detach ZFS Volume at shutdown

Status
Not open for further replies.

CrazyKay

Cadet
Joined
Nov 3, 2013
Messages
8
Hi everybody,

currently I'm testing FreeNAS 9.1.1 inside a virtual machine with five virtual hdd's. Three of them are configured as an encrypted RAIDZ. I've set a passphrase, a recovery key and an encryption key. I've also downloaded the keys to a client.

Now the question.
Is it possible to detach the volume at every shutdown as if i clickt at storage -> volumes -> view volumes select the volume and click at the detach button? By using the console i can only detach hard drives from a volume. Or do i have to write a script which will be launched at shutdown which detach every drive from that volume?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
On shutdown the zpool is unmounted and the geli devices are detached.

If the pool is auto-mounting on boot up you didn't setup the keys properly per the manual. If this is your situation you are lucky because if you had done this on 8.x you'd have rebooted and lost all of the data in your pool forever. Of course, since you appear to be experimenting with FreeNAS you wouldn't have really lost anything. Starting with 9.1.1 if you don't put in a passphrase then the key is kept on the USB stick. I don't think this is your situation though.

When encryption is properly setup per the manual, on reboot the pool does not mount automatically. It can't. You are required to log into the WebGUI and provide the key+passphrase or recovery key to mount the pool. This can be inconvenient if you aren't around to provide the key, but FreeNAS can't decrypt the drives and access the pool if you don't provide the necessary decryption information.

I'm not sure if I answered your question or not. I'm really confused as to why you are asking this question....
 

CrazyKay

Cadet
Joined
Nov 3, 2013
Messages
8
Hello cyberjock,

thanks for your reply. I've tried it again. I've deleted the the volume and setup a new one and kept myself exact to the manual and now the volume is locked after a reboot. :thumbup:

That is what i was looking for.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Ah, so you didn't setup the passphrase and keys as required. I was confused because you said you set it up properly, but I knew if you had you wouldn't be asking the question...
 

CrazyKay

Cadet
Joined
Nov 3, 2013
Messages
8
I did set a passphrase i thought or I did it but not correct. After doing it a second time the drive was locked after starting the virtual pc.
 
Status
Not open for further replies.
Top