Recovering encrypted zpool after previous TrueNas usb device failed.

darkcloud784

Dabbler
Joined
Feb 28, 2019
Messages
25
I posted this in TrueNas General forum but realized it may fit here better.

So my USB drives (mirrored) both died within the past 24 hours (unsure how they both died at the same time but they did). I have one zpool that is unencrypted and another that is encrypted. I have re-installed truenas core 12 on another media and imported the zpool that is unencrypted but I am unable to import the encrypted one. I have tried uploading the .tar config to system->general but it says "
Error:[/B] [EFAULT] The uploaded file is not valid: local variable 'numsouth' referenced before assignment".

I've also tried using the pwenc_secret provided to import the zpool but it fails to attach.

Code:
Error: Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/middlewared/job.py", line 361, in run
    await self.future
  File "/usr/local/lib/python3.8/site-packages/middlewared/job.py", line 399, in __run_body
    rv = await self.middleware.run_in_thread(self.method, *([self] + args))
  File "/usr/local/lib/python3.8/site-packages/middlewared/utils/run_in_thread.py", line 10, in run_in_thread
    return await self.loop.run_in_executor(self.run_in_thread_executor, functools.partial(method, *args, **kwargs))
  File "/usr/local/lib/python3.8/site-packages/middlewared/utils/io_thread_pool_executor.py", line 25, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/site-packages/middlewared/schema.py", line 977, in nf
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/disk_/encryption_freebsd.py", line 49, in decrypt
    raise CallError(f'The following devices failed to attach: {", ".join(failed)}')
middlewared.service_exception.CallError: [EFAULT] The following devices failed to attach: gptid/6701f550-9c63-11ea-909f-9c5c8e54ad71, gptid/6659781f-9c63-11ea-909f-9c5c8e54ad71, gptid/66f529cc-9c63-11ea-909f-9c5c8e54ad71, gptid/66d62e51-9c63-11ea-909f-9c5c8e54ad71, gptid/44ff316f-0bda-11ea-ab98-9c5c8e54ad71, gptid/42f4e17a-0bda-11ea-ab98-9c5c8e54ad71, gptid/4195e4e2-0bda-11ea-ab98-9c5c8e54ad71, gptid/402e68d2-0bda-11ea-ab98-9c5c8e54ad71, gptid/3e6f5d8f-0bda-11ea-ab98-9c5c8e54ad71, gptid/3c15fe91-0bda-11ea-ab98-9c5c8e54ad71, gptid/39321760-0bda-11ea-ab98-9c5c8e54ad71, gptid/a3b79919-9dec-11ea-8f4f-9c5c8e54ad71


What am I doing wrong here? Is there a way for me to recover my encrypted pool?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
To unlock the encrypted pool (if it was encrypted with OpenZFS 2.0 style encryption) you need the key file you were prompted to save when you created it, not the config file you saved.

If it's encrypted with the FreeNAS geli method, I hope one of the other forum members with more experience can assist (but normally you would see ".eli" at the end of the GPTids, so perhaps it's what I suggested).
 

darkcloud784

Dabbler
Joined
Feb 28, 2019
Messages
25
To unlock the encrypted pool (if it was encrypted with OpenZFS 2.0 style encryption) you need the key file you were prompted to save when you created it, not the config file you saved.

If it's encrypted with the FreeNAS geli method, I hope one of the other forum members with more experience can assist (but normally you would see ".eli" at the end of the GPTids, so perhaps it's what I suggested).

The zpool was created prior to 11.3, but I updated to truenas and imported and upgraded the pools just before I had the device failures. Unsure if this changes anything.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
The new encryption system is different... you can search the FreeNAS forums for importing a geli encrypted pool as it's the legacy method that you need to use.

Maybe this one will get you to an answer somehow... take care before doing anything you may later regret.

 
Last edited:
Top