LUKS Automatic decrypt of hdd fails, but only for number of drives greater than 7

  • Hi,


    I'm using luks for drive encryption. I decrypt the drives at bootup via usb-stick, /etc/crypttab:


    Code
    sda-crypt UUID=fbc503de-a359-41e8-9f74-bd009a4ff5b6 /dev/disk/by-id/usb luks,tries=3,keyfile-size=8192,keyfile-offset=512
    sdb-crypt UUID=eea24687-f2f4-4738-b47d-a2b8840a815e /dev/disk/by-id/usb luks,tries=3,keyfile-size=8192,keyfile-offset=512
    sdc-crypt UUID=1d51afa7-6ee0-4a0d-b568-7f4b9e0f7ada /dev/disk/by-id/usb luks,tries=3,keyfile-size=8192,keyfile-offset=512
    sdd-crypt UUID=01139fc6-56bc-42b2-b863-199695d68d1e /dev/disk/by-id/usb luks,tries=3,keyfile-size=8192,keyfile-offset=512
    sde-crypt UUID=5826dfc3-bfe4-4f62-a266-f169870dec75 /dev/disk/by-id/usb luks,tries=3,keyfile-size=8192,keyfile-offset=512
    sdf-crypt UUID=3757d17b-a7e0-4bba-828d-53f87becafa5 /dev/disk/by-id/usb luks,tries=3,keyfile-size=8192,keyfile-offset=512
    sdi-crypt UUID=07d49183-b216-44fb-b016-88951c4a6036 /dev/disk/by-id/usb luks,tries=3,keyfile-size=8192,keyfile-offset=512
    sdj-crypt UUID=1b9f32c0-10f1-4cf3-84b1-b065d86aabfd /dev/disk/by-id/usb luks,tries=3,keyfile-size=8192,keyfile-offset=512

    as you can see, the number of drives are 8 and this doesn't work. If I reduce this number to 7 or lower, the bootup works as expected.


    Here are some log infos.

    Code
    root@omv:~# systemctl --state=failed
      UNIT                                    LOAD   ACTIVE SUB    DESCRIPTION
    ● systemd-cryptsetup@sda\x2dcrypt.service loaded failed failed Cryptography Setup for sda-crypt
    ● systemd-cryptsetup@sdf\x2dcrypt.service loaded failed failed Cryptography Setup for sdf-crypt


    The drives are different at every boot:

    Code
    root@omv:~# systemctl --state=failed
      UNIT                                    LOAD   ACTIVE SUB    DESCRIPTION
    ● systemd-cryptsetup@sda\x2dcrypt.service loaded failed failed Cryptography Setup for sda-crypt
    ● systemd-cryptsetup@sdb\x2dcrypt.service loaded failed failed Cryptography Setup for sdb-crypt
    ● systemd-cryptsetup@sdd\x2dcrypt.service loaded failed failed Cryptography Setup for sdd-crypt
    ● systemd-cryptsetup@sde\x2dcrypt.service loaded failed failed Cryptography Setup for sde-crypt
    ● systemd-cryptsetup@sdf\x2dcrypt.service loaded failed failed Cryptography Setup for sdf-crypt

    bootup:


    What's going on here?


    Are there some timing issues?

  • mcflym

    Changed the title of the thread from “LUKS Automatic decrypt of hdd fails, but only for number of drives greater then 7” to “LUKS Automatic decrypt of hdd fails, but only for number of drives greater than 7”.
  • I tried to boot with two usb-sticks and use one stick for four drives... Same issue.


    I think there is a "limit" of decrypting at bootup in luks?!


    Is there anyone who is decrypting more than 7 drives at bootup?


  • mcflym

    Added the Label OMV 5.x
  • There was an answer at the project-homepage


    Quote

    I'd need debug output to 100% sure but this is most probably caused by running out of system memory by running argon2 kdf in parallel (since systemd-cryptsetup processes are being killed by SIGKILL). It should be evident from syslog.

    There's patch for it in systemd v244+ already (and it requires upstream cryptsetup v2.2.0 or later). See https://github.com/systemd/sys…dfbff1c95ce3210d06f256e58.

    So it's related to the cryptsetup and systemd version (I'm using 2.2 and 241) and the memory-size I allocated to openmediavault. I have 8 GB of RAM, so I increase in the first step the allocated RAM to get the errors away and in future there will be a fix hopefully. :)

    • Official Post

    cryptsetup 2.3.5 and systemd 247 can be installed from backports on Debian 10.

    omv 8.0.6-1 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.2 | compose 8.1.2 | cterm 8.0 | borgbackup 8.0.2 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!