Uploaded image for project: 'TrueNAS'
  1. TrueNAS
  2. NAS-105605

Unique constraint failed - encrypted pool

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Unscreened (View Workflow)
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: 11.3-U1
    • Fix Version/s: Backlog
    • Component/s: Middleware
    • Labels:
      None

      Description

      Hello together,

      this week failed one of my drives of my encrypted FreeNAS Pool. So i replaced it with a new one and got following failure messages:
      "UNIQUE constraint failed: storage_encrypteddisk.encrypted_provider"

      In the end resilvering started anyway and everything worked properly to the end.


      Next problem:

      When i choose the lock-symbol and do "Encryption key / Passphrase", i need to enter the admin password and the current password for the pool.
      But then comes the failure "[EFAULT] Unable to delete key 1 on gptid/e152c418-8cbe-11e9-952b-000c298f5f15: geli: Cannot open gptid/e152c418-8cbe-11e9-952b-000c298f5f15: No such file or directory. "

      And additionally that error appeared:

      Error: Traceback (most recent call last):
        File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 130, in call_method
          io_thread=False)
        File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1077, in _call
          return await methodobj(*args)
        File "/usr/local/lib/python3.7/site-packages/middlewared/schema.py", line 961, in nf
          return await f(*args, **kwargs)
        File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/pool.py", line 1412, in passphrase
          await self.middleware.call('disk.geli_passphrase', pool, options['passphrase'], True)
        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 1091, in _call
          return await run_method(methodobj, *args)
        File "/usr/local/lib/python3.7/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.7/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.7/site-packages/middlewared/plugins/disk.py", line 458, in geli_passphrase
          self.geli_delkey(dev, GELI_RECOVERY_SLOT, force=True)
        File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/disk.py", line 430, in geli_delkey
          raise CallError(f'Unable to delete key {slot} on {dev}: {cp.stderr.decode()}')
      middlewared.service_exception.CallError: [EFAULT] Unable to delete key 1 on gptid/e152c418-8cbe-11e9-952b-000c298f5f15: geli: Cannot open gptid/e152c418-8cbe-11e9-952b-000c298f5f15: No such file or directory

       

      After the finish of resilvering i could set the password again, download the encryption key, add a recovery key without any problems and failure messages.

      I think the problem is following:

      The failed drive is being removed and replaced by another drive (i didn't set it offline this time, just unplugged it). The resilvering starts, but the old, failed drive, still exists in one database (?). Consequently the old key can't be removed from one drive: the failed and removed drive (because it just doesn't exist physically anymore in the machine). That is causing the error. FreeNAS wants to remove the recovery key from the failed drive, can't find it and shows the user this error.

       

        Attachments

          Attachments

            JEditor

              Activity

                People

                Assignee:
                william William Grzybowski
                Reporter:
                Gen8 Runner Martin
                Watchers:
                Joe Maloney, Martin, Nick Sivo, Rick Mesta, William Grzybowski
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                  Dates

                  Due:
                  Created:
                  Updated: