LUKS disk encryption plugin

  • Alright..so for now i have to manually unlock disks from command line every time my server powers off :D but that is okay for now.

    OMV 3.x - Plex Media Server - Auto Shutdown - LUKS Disk Encryption


    Intel Core i3 4130 @ 3,4 Ghz, 12GB RAM, 3x WD RED 3TB in RAID5 fully encrypted

    • Offizieller Beitrag

    I plan to update the plugin when OMV 3 reaches beta/feature-stable status


    Volker has said that he considers the core feature-stable now.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    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!

  • How is it going? Any news regarding this uber-necessery plug-in?

    • Is it already compatible with omv 3?


    And this one is important too :P

    • "Create encryption" should offer partitions (/dev/sda1) not only the entire disk (/dev/sda) #12


    https://github.com/OpenMediaVa…-luksencryption/issues/12

  • No, it's not compatible with OMV 3 yet. I haven't the time to do it at the moment. Pull requests are welcome!


    Still not sure about the partition issue - data partitions on the OS drive is an unsupported feature in OMV anyway, so probably best left to the user to do via command line if they want to take this route.

  • No, it's not compatible with OMV 3 yet. I haven't the time to do it at the moment. Pull requests are welcome!


    Still not sure about the partition issue - data partitions on the OS drive is an unsupported feature in OMV anyway, so probably best left to…


    That's good to know! Thank you very much for the information!


    Take your time & enjoy! ;)


  • Still not sure about the partition issue - data partitions on the OS drive is an unsupported feature in OMV anyway, so probably best left to the user to do via command line if they want to take this route.


    I guess what @OpenMediaVault meant was we should be able to create luks volume on a partition basis, and not only on device basis (asuming this is already possible, I didn't check), if for whatever reason, you need several partions on a disk.

  • It isn't already possible via the plugin UI, it operates like the OMV filesystem page, it only lists whole block devices as candidate devices.


    What is possible is that, just like if you want to partition the OS drive, you must do this via the command line. If you create a LUKS device in this way, it should be usable perfectly fine in the plugin UI.


    I think that since there is no UI for managing partitions in OMV, that it is fine to expect users to have to resort to the command line if they want to do this.

  • It isn't already possible via the plugin UI, it operates like the OMV filesystem page, it only lists whole block devices as candidate devices.


    What is possible is that, just like if you want to partition the OS drive, you must do this via the command line. If you create a LUKS device in this way, it should be usable perfectly fine in the plugin UI.


    I think that since there is no UI for managing partitions in OMV, that it is fine to expect users to have to resort to the command line if they want to do this.


    I see it's gettin busy down here :D



    What I have:

    • one drive (sda)
    • several partitions on that drive (e.g. root) and one of them setup as LUKS+ext4 (sda4)

    I tried to unlock it via GUI which doesn't work as descbribed above (not a block device -> so it's not visible at all)


    I'm triying now to mount it via CLI:

    cryptsetup luksOpen /dev/sda4 sda4


    Code
    /dev/mapper/control: open failed: No such device
    Failure to communicate with kernel device-mapper driver.
    Check that device-mapper is available in the kernel.
    Cannot initialize device-mapper. Is dm_mod kernel module loaded?


    How can that be? How is the plugin handling the process without device-mapper? ?(

  • So this is the cause of your problem. Check 3. and 4. like it says. Then, what's your setup, version of OMV, etc?


    I just tested LUKS on partitions (OMV 2.1.29, LUKs plugin 2.1.2) and it works fine, as I described:

    • Create partitions with, e.g. fdisk on command line (/dev/sde1)
    • Install plugin, then create LUKS containers on command line, e.g. cryptsetup luksFormat /dev/sde1
    • Observe /dev/sde1 appears in Encryption plugin UI and can be unlocked, mounted, etc.

    So the reason your LUKS partition is not visible in the plugin is not because it is not a raw block device (that restriction is only for creating new LUKS devices via the web UI), it is because there is something missing from your OS so the plugin can't detect existing LUKS devices.

  • So this is the cause of your problem. Check 3. and 4. like it says. Then, what's your setup, version of OMV, etc?



    I just tested LUKS on partitions (OMV 2.1.29, LUKs plugin 2.1.2) and it works fine, as I described:

    • Create partitions with, e.g. fdisk on command line (/dev/sde1)
    • Install plugin, then create LUKS containers on command line, e.g. cryptsetup luksFormat /dev/sde1
    • Observe /dev/sde1 appears in Encryption plugin UI and can be unlocked, mounted, etc.

    So the reason your LUKS partition is not visible in the plugin is not because it is not a raw block device (that restriction is only for creating new LUKS devices via the web UI), it is because there is something missing from your OS so the plugin can't detect existing LUKS devices.


    Weird thing's happening. Thank's a lot for the information. I will investigate further.
    Important Information: Eventhough the LUKS-OMV-Plugin can just create encryptions on block-devices it should be able to open the encrypted one based on partition!

  • Important Information: Eventhough the LUKS-OMV-Plugin can just create encryptions on block-devices it should be able to open the encrypted one based on partition!


    Confirmed working!


    You can mount kind'a everything encrypted with LUKS! Just the creation in omv is limited to a block-device!

  • I'm sorry - I just can't seem to get this to work.


    I've tried this twice now:
    - encrypt raw disks (3 of them)
    - create RAID on top
    - add shared folders


    When I reboot I unlock the disks, but the RAID page is empty - how do I poke it to spot the now-available disks? Or should this happen automatically?


    Thanks in advance.
    Geoff

  • Detection of RAID arrays on top of encrypted disks is problematic. I think you could use mdadm --scan to detect the RAID array after unlocking the disks, but it is far better instead to create the encrypted disk on top of the RAID array. Automatic RAID detection and assembly will then work much smoother.


    Do this:

    • Wipe disks
    • Create RAID array from raw disks
    • Create encrypted volume using RAID array
    • Unlock encrypted volume, add shared folders

  • Since the plugin is not ready for use in 3.x I currently using a small script i made. Had no time to make it use the key input as a variable and unlock all disks, so i have to past the key 3 times with right click after copy from my keepass password manager.


    #!/bin/bash -e


    service plexmediaserver stop
    sudo cryptsetup luksOpen /dev/sda mnt
    sudo cryptsetup luksOpen /dev/sdb mnt2
    sudo cryptsetup luksOpen /dev/sdc mnt3
    sudo mdadm --assemble -scan
    service plexmediaserver restart
    service plexpy restart




    Works perfectly for me with plex and plexpy.

    OMV 3.x - Plex Media Server - Auto Shutdown - LUKS Disk Encryption


    Intel Core i3 4130 @ 3,4 Ghz, 12GB RAM, 3x WD RED 3TB in RAID5 fully encrypted

  • Do this:

    • Wipe disks
    • Create RAID array from raw disks
    • Create encrypted volume using RAID array
    • Unlock encrypted volume, add shared folders

    Thanks for the advice - much appreciated.


    So now I've deleted everything and started again, created a RAID array, and now there are no devices listed in the drop down when I do encryption/create.


    What am I missing?


    Cheers,
    Geoff

  • Hi Forum,


    Is the OMV3 LUKS plugin already in a usable state?


    Yesterday I have tried to install it with the steps in this forum, but all lead to popup errors on GUI. If it is already a working plugin then can someone write a step-by-step guide on how to install OMV3-LUKS to work?


    Thanks.
    Pery.

  • It isn't yet compatible with OMV3, still to do I'm afraid. I haven't tried it with OMV3 myself, perhaps others have managed to get it working.

    • Offizieller Beitrag

    Unless data models are implemented in the plugin, it has no chance of working with OMV 3.x. The unionfilesystems and zfs plugin code would be a good reference for porting it.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    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!

Jetzt mitmachen!

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