Help please! Error decrypting pool Freenas 11_3 beta

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
@PhiloEpisteme, I reset Freenas settings and tried to import the pool via the GUI.

Follows is the error message upon importing it:


Error: concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/lib/python3.7/concurrent/futures/process.py", line 239, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/usr/local/lib/python3.7/site-packages/middlewared/worker.py", line 95, in main_worker
res = loop.run_until_complete(coro)
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 579, in run_until_complete
return future.result()
File "/usr/local/lib/python3.7/site-packages/middlewared/worker.py", line 51, in _run
return await self._call(name, serviceobj, methodobj, params=args, job=job)
File "/usr/local/lib/python3.7/site-packages/middlewared/worker.py", line 43, in _call
return methodobj(*params)
File "/usr/local/lib/python3.7/site-packages/middlewared/worker.py", line 43, in _call
return methodobj(*params)
File "/usr/local/lib/python3.7/site-packages/middlewared/schema.py", line 964, in nf
return f(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/zfs.py", line 382, in import_pool
zfs.import_pool(found, found.name, options, any_host=any_host)
File "libzfs.pyx", line 369, in libzfs.ZFS.__exit__
File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/zfs.py", line 382, in import_pool
zfs.import_pool(found, found.name, options, any_host=any_host)
File "libzfs.pyx", line 878, in libzfs.ZFS.import_pool
libzfs.ZFSException: failed to create mountpoint
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/middlewared/job.py", line 349, in run
await self.future
File "/usr/local/lib/python3.7/site-packages/middlewared/job.py", line 386, in __run_body
rv = await self.method(*([self] + args))
File "/usr/local/lib/python3.7/site-packages/middlewared/schema.py", line 960, in nf
return await f(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/pool.py", line 1921, in import_pool
'cachefile': ZPOOL_CACHE_FILE,
File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1127, in call
app=app, pipes=pipes, job_on_progress_cb=job_on_progress_cb, io_thread=True,
File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1074, in _call
return await self._call_worker(name, *args)
File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1094, in _call_worker
return await self.run_in_proc(main_worker, name, args, job)
File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1029, in run_in_proc
return await self.run_in_executor(self.__procpool, method, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1003, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
libzfs.ZFSException: ('failed to create mountpoint',)


The pool was created some time ago and was last used on 11.3 Release but was never upgraded to ZFS tag under 11.3
The pool I am having trouble is WD-RAIDZ2.
 
Joined
Oct 18, 2018
Messages
969
The pool was created some time ago and was last used on 11.3 Release but was never upgraded to ZFS tag under 11.3
The pool I am having trouble is WD-RAIDZ2.
I wonder if it is an issue with zfs versions?
 

theyost

Dabbler
Joined
Feb 24, 2019
Messages
30
@PhiloEpisteme

Disregard my long message about issue with the FreeNAS new install. Turns out it was because the drives were locked by ZFS.

I started up the old FreeNAS and:
Code:
sqlite3 /data/feenas-v1.db 'select * from storage_volume;'


root@freenas[~]# sqlite3 /data/feenas-v1.db 'select * from storage_volume;'
Error: no such table: storage_volume

This despite this tenTB.spinners still shows up in the WebUI:
2020.02.09.at.20.43.07.ScreenShot.from.RYZEN-2700X.png


Right now I plan on learning more about FreeNAS on the new box. Test, test & test some more there before digging too deep in the old box.

-Dave
 
Joined
Oct 18, 2018
Messages
969
root@freenas[~]# sqlite3 /data/feenas-v1.db 'select * from storage_volume;'
Error: no such table: storage_volume
gah, I may have typoed again. I've got a bit of a sticky key? The db file is freenas-v1.db not feenas . . .
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
I think I got it resolved.
When WD-RAIDZ2 was available only under CLI, I looked at the volume and dataset readonly status. While I set my backups replication volume to readonly, I decided to make it non readonly.
I reset Freenas config to default and on reboot I imported the volume as I have done before. This time I got a different error message involving Jason and some error messages about unexpected end of file. I have more datasets set as readonly and I suspect they are causing Freenas from not being happy.

Now WD-RAIDZ2 shows up under the GUI.
I think I had similar issues a few years ago, but I don't recall being that bad back then.
 

theyost

Dabbler
Joined
Feb 24, 2019
Messages
30
You were right @PhiloEpisteme

Go ahead and check the output of sqlite3 /data/freenas-v1.db 'select * from storage_volume;'. I expect that you'll see only one for tenTB.spinners. Compare that against the files you

Here are my results... note the 'tenTB.spinners' drive is there
root@freenas[~]# sqlite3 /data/freenas-v1.db 'select * from storage_volume;'
6|tenTB.spinners|15172541474628519820|2|0c611a6c-00b0-4aff-a50e-7185382754ad

Here is what is in my /dev/gptid directory:
root@freenas[/dev/gptid]# ls -al
total 1
dr-xr-xr-x 2 root wheel 512 Feb 9 23:54 .
dr-xr-xr-x 11 root wheel 512 Feb 9 23:54 ..
crw-r----- 1 root operator 0xc5 Feb 9 23:54 0d47ded6-fe94-11e9-9e4a-ecf4bbe54910
crw-r----- 1 root operator 0xc3 Feb 9 23:54 d9ced662-ebc6-11e9-8136-ecf4bbe54910
I don't see any matches

So... now... hopefully tomorrow evening I will be able to come back and work on this more.

Mostly notes to myself for tomorrow here:
# compare output from sqlite3 command above with what is in /data/geli
# rename whichever file is NOT in [/icode]/data/geli[/icode]... (but I don't see any matches)
# then try to create the pool

$ geli attach -k <key> /dev/gptid/<device>
... study geli command (link)
... especially how to use key + password
... was told non-destructive
 

theyost

Dabbler
Joined
Feb 24, 2019
Messages
30
@PhiloEpisteme I do have one follow-up question maybe you can help with.

I think I mentioned before my preference would be to move the disks/pools to new hardware.

As a test on the new FreeNAS build:
1. figured how how to clear out the drives... sorry for that 'when it rains it pours post
2. create a new encrypted+password pool
3. disconnect the pool
4. >>> then successfully add it back (by selecting disks, key file + password) <<<
The key is when I click "Add" it has disks to choose in the drop-down:
ss.with.fourTB.spinners.select.drive.png

Unfortunately when I brought the three disks that make up the 'eightTB.spinners' pool it shows NO drives to select:
ss.with.eightTB.spinners.drives.nodrives.png


Do you have any idea why the drives are not showing up in the drop-down??

-Dave
 
Joined
Oct 18, 2018
Messages
969
# rename whichever file is NOT in [/icode]/data/geli[/icode]... (but I don't see any matches)
You're not going to have luck by just renaming a file. The file must have the correct name and the correct contents.
Here are my results... note the 'tenTB.spinners' drive is there
Code:
root@freenas[~]# sqlite3 /data/freenas-v1.db 'select * from storage_volume;'
6|tenTB.spinners|15172541474628519820|2|0c611a6c-00b0-4aff-a50e-7185382754ad
Here is what is in my /dev/gptid directory:
Code:
root@freenas[/dev/gptid]# ls -al
total 1
dr-xr-xr-x 2 root wheel 512 Feb 9 23:54 .
dr-xr-xr-x 11 root wheel 512 Feb 9 23:54 ..
crw-r----- 1 root operator 0xc5 Feb 9 23:54 0d47ded6-fe94-11e9-9e4a-ecf4bbe54910
crw-r----- 1 root operator 0xc3 Feb 9 23:54 d9ced662-ebc6-11e9-8136-ecf4bbe54910
I don't see any matches
This says to me that at least for your tenTB.spinners pool your system does not have the appropriate key to unlock it. It is looking for a key /datea/geli/0c611a6c-00b0-4aff-a50e-7185382754ad.key but no such key exists.

Do you have any idea why the drives are not showing up in the drop-down??
Based on the fact that you said that your disks were in the list when you did camcontrol devlist I suggest you try 1 of 2 things. First, make sure your disks are actually encrypted disks as you expect. If they are, search the forums and bug reports for similar issues. If you cannot find solutions that way consider filing a bug. Whatever you do, in order to not harm your data, do not format, erase, rekey, etc any of the disks in the affected pool.

As an aside, are you able to unlock the tenTB.spinners pool?
 
Top