Zpool Import Issues

Status
Not open for further replies.

George51

Contributor
Joined
Feb 4, 2014
Messages
126
Okay - so I did a fresh install today - imported my configuration, everything appeared - happy.
Under the storage tab, my (encrypted) volume appeared, locked as expected.
Tried to unlock it using just the passphrase, as I normally do when I've had to reboot, no luck - it failed
"failed with: cannot import ....., no such pool available"

Okay - so I go onto Import Volume -> encrypted yes->add all 6 (and the only 6) drives, add the geli.key file, input the correct passphrase. get to step 3, and next to volume there is a drop down menu with nothing in it....This causes the import to fail as it won't let me progress unless I click cancel

At this point I get an email telling me my pool is critical alert, state unknown....

The first time I did this, I began to panic... I tried just unlocking the pool again (with only the passphrase) and like magic it unlocks this time! And the critical alert goes away and everything is fine and dandy.

This is very repeatable, and I can get to the same state just by locking the volume, trying to unlock it - it won't, I try to import it wont, I try to unlock it and it works.

What is occurring? How do I get it back so I don't have to do this each time I reboot?

Cheers
 

ToBeFrank

Dabbler
Joined
Feb 20, 2015
Messages
41
Okay - so I did a fresh install today - imported my configuration, everything appeared - happy.
Under the storage tab, my (encrypted) volume appeared, locked as expected.
Tried to unlock it using just the passphrase, as I normally do when I've had to reboot, no luck - it failed
"failed with: cannot import ....., no such pool available"

The key is not saved as part of the configuration so I'm not surprised this failed.

Okay - so I go onto Import Volume -> encrypted yes->add all 6 (and the only 6) drives, add the geli.key file, input the correct passphrase. get to step 3, and next to volume there is a drop down menu with nothing in it....This causes the import to fail as it won't let me progress unless I click cancel

The GUI is confused because it thinks your volume is already imported.

The first time I did this, I began to panic... I tried just unlocking the pool again (with only the passphrase) and like magic it unlocks this time! And the critical alert goes away and everything is fine and dandy.

My guess is the key you put in when trying to do the import got saved to disk such that now normal unlocking works.

This is very repeatable, and I can get to the same state just by locking the volume, trying to unlock it - it won't, I try to import it wont, I try to unlock it and it works.

This is curious as I wouldn't expect it to go back to failing.

What is occurring? How do I get it back so I don't have to do this each time I reboot?

I'm unsure, but I just put in a pull request to vastly improve the debug logging so that figuring out problems like this should be much simpler. Whether ixsystems merges it or not is another question.
 

ToBeFrank

Dabbler
Joined
Feb 20, 2015
Messages
41
Try this... detach your volume (make sure NOT to select to destroy your data), then do the import.
 

ToBeFrank

Dabbler
Joined
Feb 20, 2015
Messages
41
After doing this in my test VM, I was pretty close in my initial diagnosis. When you do the import, it is decrypting and attaching your drives, but it is not saving the key to disk. The GUI then fails because it thinks the volume is already mounted. The unlock after that succeeds because your disks are already decrypted and mounted. It goes back to failing when locked again because the key is not saved to disk.

The correct fix here is as I already stated: detach the volume and import it again. It will be fine after that.
 

George51

Contributor
Joined
Feb 4, 2014
Messages
126
After doing this in my test VM, I was pretty close in my initial diagnosis. When you do the import, it is decrypting and attaching your drives, but it is not saving the key to disk. The GUI then fails because it thinks the volume is already mounted. The unlock after that succeeds because your disks are already decrypted and mounted. It goes back to failing when locked again because the key is not saved to disk.

The correct fix here is as I already stated: detach the volume and import it again. It will be fine after that.
Okay - I did contemplate trying that myself - however I didn't trust myself enough to be confident I wasn't going to cause more problems. Will give that a try now and let you know.
 

George51

Contributor
Joined
Feb 4, 2014
Messages
126
And to keep you updated - that worked. Thank you, is that a bug? Or expected behaviour?
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Status
Not open for further replies.
Top