ZPool Export/Import Encryption with Passphrase Fails

Status
Not open for further replies.

Atlantus

Cadet
Joined
Mar 11, 2014
Messages
2
Hi All,

First, thank you everyone for the great documentation and How-To guides to get noobs up and running! I'm new to FreeNAS and still experimenting.

I was attempting to rename my volume based on this thread:
http://forums.freenas.org/index.php?threads/renaming-volume-with-data-already-in-it.13061/

Note: I had to use -f since I couldn't figure out what was keeping the device busy and lsof wasn't available.

When I ran the import:
http://forums.freenas.org/index.php?threads/renaming-volume-with-data-already-in-it.13061/

Command Results:
[root@freenas] ~# zpool export -f NAS
[root@freenas] ~# zpool import NAS NAS2
cannot mount '/NAS2': failed to create mountpoint
cannot mount '/NAS2/.system': failed to create mountpoint
cannot mount '/NAS2/.system/cores': failed to create mountpoint
cannot mount '/NAS2/.system/samba4': failed to create mountpoint

cannot mount '/NAS2/.system/syslog': failed to create mountpoint

I wasn't able to get the import to mount correctly. Any advice on this would be great.
I've also tried specifying the directory via '-o'.

After importing the volume, I also detached the old volume via the web-ui, rebooted, and auto-import.

Mar 11 13:29:28 freenas manage.py: [middleware.notifier:1320] Failed to geli detach gptid/ea3af0f4-a95a-11e3-badc-0cc47a012859: geli: No such device: gptid/ea3af0f4-a95a-11e3-badc-0cc47a012859.
Mar 11 13:29:28 freenas manage.py: [middleware.notifier:1320] Failed to geli detach gptid/ea8efaa0-a95a-11e3-badc-0cc47a012859: geli: No such device: gptid/ea8efaa0-a95a-11e3-badc-0cc47a012859.
Mar 11 13:29:28 freenas manage.py: [middleware.notifier:1320] Failed to geli detach gptid/eae053df-a95a-11e3-badc-0cc47a012859: geli: No such device: gptid/eae053df-a95a-11e3-badc-0cc47a012859.
Mar 11 13:29:28 freenas manage.py: [middleware.notifier:1320] Failed to geli detach gptid/eb38c3a9-a95a-11e3-badc-0cc47a012859: geli: No such device: gptid/eb38c3a9-a95a-11e3-badc-0cc47a012859.

Mar 11 13:29:28 freenas manage.py: [middleware.notifier:1320] Failed to geli detach gptid/eb919848-a95a-11e3-badc-0cc47a012859: geli: No such device: gptid/eb919848-a95a-11e3-badc-0cc47a012859.

The keys are obtained prior to export.

Please note: The operation only fails if I am using an encrypted key with a password (in this simple example the password was just simple letters). An encrypted volume without a password works fine.

Please let me know if I'm missing anything!

Thanks!
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I'm confused... you renamed a pool, then exported it from the GUI, then tried to mount it, and it didn't mount? I'm really not understanding this at all because you should be exporting the pool from the GUI.

It's extremely dangerous to do whatever the heck you are trying to do(and most things from the CLI carry some amount of risk) because whatever you do from the CLI you are doing behind FreeNAS' back. It's quite possible you are doing things that are simply not recommended/supported and you are seeing the consequences of that.

Unless you can explain a little better my advice is to not go doing things from the CLI. Note that this is good advice PERIOD because so many people don't know what you should and shouldn't do from the CLI, and blindly doing things because someone else on the forum was told to can be a recipe for disaster.
 

Atlantus

Cadet
Joined
Mar 11, 2014
Messages
2
I'm confused... you renamed a pool, then exported it from the GUI, then tried to mount it, and it didn't mount? I'm really not understanding this at all because you should be exporting the pool from the GUI.

It's extremely dangerous to do whatever the heck you are trying to do(and most things from the CLI carry some amount of risk) because whatever you do from the CLI you are doing behind FreeNAS' back. It's quite possible you are doing things that are simply not recommended/supported and you are seeing the consequences of that.

Unless you can explain a little better my advice is to not go doing things from the CLI. Note that this is good advice PERIOD because so many people don't know what you should and shouldn't do from the CLI, and blindly doing things because someone else on the forum was told to can be a recipe for disaster.


Sorry for the confusion. The steps above were an attempt to use the command line to do an export and import.

When I executed the zpool import command, it failed to mount (I'm not sure if this is indicative of an issue or not - however, on an encrypted volume without a passkey, I didn't have a problem importing).

Forgive me, but I was not able to find references to importing/exporting zpools from the WebUI.

Again, I was only experimenting to learn the differences between zpools and mdadm on linux.

The goal was to learn how to effectively rename a volume, import/export a zpool with encryption. If what I'm doing is not supported, please enlightened me on what is the recommended approach and I'll go with that.

Thanks again!
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
For starters.. you shouldn't be looking to rename a volume later. It works right now if you know what you are doing from the CLI. But, that's no guarantee it'll work later.

Importing and exporting of pools should be done from the GUI for the stuff I said above. Do stuff behind the GUI's back and you'll have a sad face.

The only approaches that are recommended are in the manual.. doc.freenas.org. That's it. You'll find very little CLI stuff there because as a general rule, you shouldn't be doing stuff from the CLI aside from observing parameters.
 

razorkni

Cadet
Joined
May 9, 2014
Messages
1
Hi All,

*snip*

After importing the volume, I also detached the old volume via the web-ui, rebooted, and auto-import.

Mar 11 13:29:28 freenas manage.py: [middleware.notifier:1320] Failed to geli detach gptid/ea3af0f4-a95a-11e3-badc-0cc47a012859: geli: No such device: gptid/ea3af0f4-a95a-11e3-badc-0cc47a012859.
Mar 11 13:29:28 freenas manage.py: [middleware.notifier:1320] Failed to geli detach gptid/ea8efaa0-a95a-11e3-badc-0cc47a012859: geli: No such device: gptid/ea8efaa0-a95a-11e3-badc-0cc47a012859.
Mar 11 13:29:28 freenas manage.py: [middleware.notifier:1320] Failed to geli detach gptid/eae053df-a95a-11e3-badc-0cc47a012859: geli: No such device: gptid/eae053df-a95a-11e3-badc-0cc47a012859.
Mar 11 13:29:28 freenas manage.py: [middleware.notifier:1320] Failed to geli detach gptid/eb38c3a9-a95a-11e3-badc-0cc47a012859: geli: No such device: gptid/eb38c3a9-a95a-11e3-badc-0cc47a012859.

Mar 11 13:29:28 freenas manage.py: [middleware.notifier:1320] Failed to geli detach gptid/eb919848-a95a-11e3-badc-0cc47a012859: geli: No such device: gptid/eb919848-a95a-11e3-badc-0cc47a012859.

The keys are obtained prior to export.

Please note: The operation only fails if I am using an encrypted key with a password (in this simple example the password was just simple letters). An encrypted volume without a password works fine.

Please let me know if I'm missing anything!

Thanks!

Sorry if this is reviving an older thread but I found a solution that worked for me:

I had a similar issue where the encrypted pool did not have a passphrase and I ended up following http://doc.freenas.org/index.php/Volumes#Replacing_a_Failed_Drive_in_an_Encrypted_Pool to properly re-create it (Following steps 1-4 for the encryption re-keying). Afterwards, as a test, I exported the pool and when importing FreeNAS accepted the new passphrase. It seems when you use the CLI to mess with the pools weird things happen and you want to always use the GUI when possible.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Thanks for the feedback razorkni!

CLI is never the way to go unless you have no choice whatsoever.
 
Status
Not open for further replies.
Top