Middleware Error when importing encrypted ZFS Volume

Status
Not open for further replies.
Joined
Jun 20, 2017
Messages
2
Made a new install for FreeNas 11 on a new medium (old one is still there and working, so I can always access my data via booting it up, but I'd like to change to the new one).

I have three encrypted ZFS Volumes, when I try to import them I get a Middleware Error. It happens after Step 3 of 3, after selecting the volume in the dropdown menu.

Also it says Decrypt Disks in the tool, does it seriously decrypt my whole volume? Does that mean I have decrypted Data after it and have to re-encrypt it if I want it encrypted? Not to mention that in-place decryption would take several days, have about 15TB data on my NAS. If that's the case I'm seriously considering just not doing it.


Request Method: POST
Software Version: FreeNAS-11.0-RELEASE (a2dc21583)
Exception Type: MiddlewareError
Exception Value:
[MiddlewareError: b'The volume "freenas-boot" failed to import, for futher details check pool status']
Exception Location: ./freenasUI/middleware/notifier.py in volume_import, line 3116
Server time: Tue, 20 Jun 2017 01:58:17 -0700
Traceback



Environment:

Software Version: FreeNAS-11.0-RELEASE (a2dc21583)
Request Method: POST

Traceback:
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
39. response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _legacy_get_response
249. response = self._get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
178. response = middleware_method(request, callback, callback_args, callback_kwargs)
File "./freenasUI/freeadmin/middleware.py" in process_view
162. return login_required(view_func)(request, *view_args, **view_kwargs)
File "/usr/local/lib/python3.6/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
23. return view_func(request, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/django/views/generic/base.py" in view
68. return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/formtools/wizard/views.py" in dispatch
237. response = super(WizardView, self).dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/django/views/generic/base.py" in dispatch
88. return handler(request, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/formtools/wizard/views.py" in post
300. return self.render_done(form, **kwargs)
File "/usr/local/lib/python3.6/site-packages/formtools/wizard/views.py" in render_done
357. **kwargs)
File "./freenasUI/storage/forms.py" in done
877. self.volume = notifier().volume_import(vol['label'], vol['id'], key, passphrase, enc_disks)
File "./freenasUI/middleware/notifier.py" in volume_import
3116. 'for futher details check pool status') % volume_name)

Exception Type: MiddlewareError at /storage/auto-import/
Exception Value: [MiddlewareError: b'The volume "freenas-boot" failed to import, for futher details check pool status']
 
Joined
Jun 20, 2017
Messages
2
Hello hugovsky,

yes, was my fault. I didn't realize you could select several disks in that interface, makes sense though. I just selected one disk of the volume and tried it with everyone of the volume. After selecting all three of them it worked. Thanks!
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
That needs some more user-friendly messaging, though, so please file a bug report.
 

agartha79

Cadet
Joined
Aug 23, 2017
Messages
8
I've encountered the same issue on FreeNAS-11.0-U2 (e417d8aa5) where I detached an encrypted volume (a single usb backup hdd). When I try to import the volume via the GUI, it responds with the middleware error as above at step 3 of 3. The volume is getting unlocked and mounted correctly in the background and I can use it, but it doesn't show up in the GUI. Tried that export > restart > import methot, but nothing works.

Here's what it shows as a response:
Code:
Environment:

Software Version: FreeNAS-11.0-U2 (e417d8aa5)
Request Method: POST
Request URL: http://192.168.1.20/storage/auto-import/

Traceback:
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  39.			 response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _legacy_get_response
  249.			 response = self._get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  178.			 response = middleware_method(request, callback, callback_args, callback_kwargs)
File "./freenasUI/freeadmin/middleware.py" in process_view
  162.		 return login_required(view_func)(request, *view_args, **view_kwargs)
File "/usr/local/lib/python3.6/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  23.				 return view_func(request, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/django/views/generic/base.py" in view
  68.			 return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/formtools/wizard/views.py" in dispatch
  237.		 response = super(WizardView, self).dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/django/views/generic/base.py" in dispatch
  88.		 return handler(request, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/formtools/wizard/views.py" in post
  300.				 return self.render_done(form, **kwargs)
File "/usr/local/lib/python3.6/site-packages/formtools/wizard/views.py" in render_done
  357.								   **kwargs)
File "./freenasUI/storage/forms.py" in done
  877.		 self.volume = notifier().volume_import(vol['label'], vol['id'], key, passphrase, enc_disks)
File "./freenasUI/middleware/notifier.py" in volume_import
  3116.						 'for futher details check pool status') % volume_name)

Exception Type: MiddlewareError at /storage/auto-import/
Exception Value: [MiddlewareError: b'The volume "ext-backup1" failed to import, for futher details check pool status']


The pool status is ok, nothing problematic there.

What gives?
 
Last edited:

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
is that "b" meant to be there? Is it a typo in the code?

Exception Value: [MiddlewareError: b'The volume "ext-backup1" failed to import, for futher details check pool status']
 

agartha79

Cadet
Joined
Aug 23, 2017
Messages
8
is that "b" meant to be there? Is it a typo in the code?

Exception Value: [MiddlewareError: b'The volume "ext-backup1" failed to import, for futher details check pool status']
Good question. It seems to affect my second encrypted pool (ext-backup1) and not my first encrypted pool. Here's the process after restarting my server:
- Login to the web GUI and choose Storage->Volumes.
- Only the "storage1" encrypted pool is showing and is marked as LOCKED. "ext-backup1" is NOT showing.
- I click on the Unlock button and is asked for Passphrase and a recovery key file. I only supply the passphrase and hit OK.
- The pool is successfully unlocked and everything is fine there.
- Then, when I click on the Import Volume button, a similar dialog box like the Unlock one, only a bit different layout, I have to supply ONLY the recovery key to be able to proceed. If I supply both passphrase and recovery key, I get "The following disks failed to attach: gptid/9966263e-..."
- Supplied only the recovery key and the volume is showing up. I then hit OK.
- Then what happens, is that Middleware error as described above. The GUI is not updated to reflect the changes. If I open a shell and type 'zpool list' it shows up. Everything is, like said, absolutely fine in the background.

Could it be that the GUI simply doesn't cope with the presence of multiple encrypted pools?
 
Last edited:
Status
Not open for further replies.
Top