Guide 9.1.1 possible change on Auto Import Volume

Status
Not open for further replies.

Paul5

Contributor
Joined
Jun 17, 2013
Messages
117
After a re-install of a corrupted FreeNas, On importing the volumes on the same system and reloading my configuration file learned that I first have to detach the volumes ensuring that the check box's are unchecked then auto import the volumes. (if I don't detach the volumes FreeNas complains of the volumes existing when I try to auto import. Note: you can still import and mount them but no /data/geli folder or key files are created. I need these key files for an auto decryption script) By detaching first and then auto importing, It then decrypts and mounts the volumes also creating the /data/geli folder and keys. On rebooting the /data/geli/ folder and key files are there which in my case are used for auto decrypting.

So:

freenas9.1.1_guide.pdf section 6.3 Auto importing a volume page 107

Quote: If you plan to physically install ZFS formatted disks from another system, be sure to export the drives on that system to prevent an "in use by another machine" error during the import.

It should read something like this: If you plan to physically install ZFS formatted disks from another system or a new install on an existing system with an old configuration file,be sure to export/detach the drives on that system to prevent an "in use by another machine" error or "you have an existing volume" error (I can't remember the actual message)during the import.

This could have saved me a few hours.
 

Paul5

Contributor
Joined
Jun 17, 2013
Messages
117
Sorry, I should have said that I placed here for I don't quite know where to place the thread.
 
D

dlavigne

Guest
Note that anyone can create a wiki account and make an edit to the docs as the editors see all changes and can contact you if there is a question about the edit.

Your edit request is a bit unclear, though. I'm assuming that the problem only occurs when the disks are encrypted? In that case, it sounds more like a bug, and depending upon the FreeNAS version, that bug may already be fixed. Please describe all of the original steps you did, when the error occurred, and what steps you did afterwards which fixed the issue.
 

Paul5

Contributor
Joined
Jun 17, 2013
Messages
117
Note that anyone can create a wiki account and make an edit to the docs as the editors see all changes and can contact you if there is a question about the edit.

Your edit request is a bit unclear, though. I'm assuming that the problem only occurs when the disks are encrypted? In that case, it sounds more like a bug, and depending upon the FreeNAS version, that bug may already be fixed. Please describe all of the original steps you did, when the error occurred, and what steps you did afterwards which fixed the issue.

Thanks for the reply.

For wiki, unless I can prove without question, I don't want change things. I was kind of hoping it was known yet not documented.

As for the rest, I'll tell you what I remember, for I will break the system again so I'm in no rush to do it again.

FreeNas 9.1.1

purpose - learn as I go, break things as I go.

1 -ZFS volume mirrored 1GB with 4 datasets - auto decrypted and mounted on post boot-

2 - 3 usb drives - 1 Freenas, 2 UFS to initiate decryption of usb3 and 3 ZFS usb which decrypts the volume. USB 2 & 3, are remotely connected to computer and both have to be in for decryption - this works without issue, except for a new one with CIF's and datasets on another post.

What happened, from memory:

1 - Trying to get an ancient UPS to work using the Freenas drivers. Freenas USB became corrupted. Would no longer boot.

2 - Re-installed complete 9.1.1 not an upgrade. Didn't check to see if the drives where in the 'Storage' tab on boot.

3 - loaded 3 day old fully working configuration file, system rebooted as normal

4- Checked disk and storage, all there. However the auto decrypt didn't work - from past experience the /data/geli file needs to be created by freenas (my auto decrypt file uses the keys for decryption.) not an issue, other than having to edit the keys in the scripts.

5 - manually mounted all the ZFS paraphrases and geli keys as requested. All good.

6 - Rebooted - Auto decrypt didn't work - all zfs locked

7- checked /data/geli - no geli folder or key files.

8 - Decided to auto import volume - All well until it displayed the volume to select and pressed 'Ok' at which point it complained that I already have a volume by that name. Cancelled that. Checked /data/geli - still no folder or file - did a search, nothing. I assume that the geli backup key is used, for it asks me for it on manual mounting. At some point I also created a new pass phrase and recovery key. It also didn't create the /data/geli folder or keys.

9 - Detached the encrypted usb and then auto imported it. - /data/geli and key was created. placed the new key in UFS usb 2, booted and it mounted.

10- Detached the encrypted volume and and again new keys generated in /data/geli. used that new key in the encrypted usb. booted and it mounted.

11 - All's well.

Note: I may have missed a step or two. for example I don't remember if I had to detach and import the UFS usb.

At the end of the day, it seemed that even though the configuration file was loaded on the same machine with no changes, hardware or otherwise. A fresh install of Freenas required detaching and importing all the volumes to create the /data/geli folder and keys. A headache if you have lots of drives. for you also have to use the backup geli key as well, there being no /data/geli file created.

I hope this is a bit more enlightening for I was always under the impression that on loading a configuration file everything went back to normal. But it seems that the configuration file doesn't preserve the /data/geli folder and keys.
 
Status
Not open for further replies.
Top