Adding new encrypted device went partly wrong - unable to mount, unable to save

  • Hello,

    I have two raspberrpi4 with omv running. Now I wanted to add a external 18TB HDD on each omvpi. On the one setup it worked properly but on the other setup something went wrong with password etc (not sure at all) so I deleted the encrypted device again restboot an created a new encrypted device. But i cant mount with omv.

    When I type in the password to mount it, i get the following error:

    Code
    Fehler #0:
    OMV\Exception: Unable to unlock encrypted device: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; echo -n 'mypersonalpasswdisnotfortheinternet' | cryptsetup luksOpen '/dev/sda' 'sda'-crypt --key-file=- 2>&1' with exit code '5': Device sda-crypt already exists. in /usr/share/openmediavault/engined/rpc/luks.inc:243
    Stack trace:
    #0 [internal function]: OMVRpcServiceLuksMgmt->openContainer(Array, Array)
    #1 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
    #2 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('openContainer', Array, Array)
    #3 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('LuksMgmt', 'openContainer', Array, Array, 1)
    #4 {main}

    So i did some research und found i way to mount the volume by putty commans line:

    sudo cryptsetup luksOpen /dev/sda lukslvm

    ->

    After this the volume is mounted an I could create a new file system BTFRS in the OMV webinterface and it even shows up.

    Then OMV Interface forces me to save this changes but it does not succeed with the following error:

    This is how it looks without the chance applying changes:


    Look a little like chaos with outher device. This might be caused by remote mount what I needed to save files from my old synology nas.

    But I dont understand how to clean up the setup that I am able to mount the new device by OMV and even save the changes.

    Thanks in advance for your help!

    BR pinky

  • I can only try to give a hint where to look. The essence is this:

    Code
    echo -n 'mypersonalpasswdisnotfortheinternet' | cryptsetup luksOpen '/dev/sda' 'sda'-crypt --key-file=- 2>&1' with exit code '5': Device sda-crypt already exists


    OMV is trying to mount a device, which already exists, sda-crypt is /dev/sdb.


    Maybe the controller changed the numbering of drives.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • As you can see I am really new to it. So thank yoo in advance!

    I assume you could be right. Can you tell me what you would do next? Where to look, which commands to fix it then?

  • I have no idea, as I am not using LUKS. Possibly I would try to unmount everything and mount it again. I wonder why this happenes, as votdev changed to UUIDs some time ago.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!