Migrating encripted LUKS disk to new server

  • Hi all.


    I'm changing 3 disks from an OMV old installation to a new server.
    The 3 disks are recognized without problems in storage - disks and in Smart - devices.
    The first two disks are not encrypted and I have mounted them and created their corresponding shared folders and everything is fine.
    The third disk was created and encrypted with the LUKS plugin on the old system. When I go to Storage - Encryption in the new installation, this third disk does not appear and therefore I cannot proceed to unlock it and then mount the unlocked partition.


    Any suggestions?

    What is the config file of this plugin to copy/adapt from old system?


    Thanks a lot

    • Official Post

    What is the output of: sudo blkid -t TYPE=crypto_LUKS -o device

    omv 7.7.10-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.2 | kvm 7.1.8 | compose 7.6.10 | cterm 7.8.7 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.3.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!

  • root@openmediavault:~# sudo blkid /dev/sdc
    /dev/sdc: UUID="e6a123b0-51f1-49c1-a79e-50365535afc4" LABEL="admin" TYPE="crypto_LUKS"

    • Official Post

    The plugin should show your device since it is using the exact command I gave to populate the datatable.


    Are you able to unlock the disk from the command line?

    sudo cryptsetup luksOpen /dev/sdc sdc-crypt

    omv 7.7.10-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.2 | kvm 7.1.8 | compose 7.6.10 | cterm 7.8.7 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.3.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!

  • Yes, in CLI, with cryptsetup, the partition is unlocked, and in file systems section, the device /dev/dm-0 is showed and I mount without problems.


    One apreciation,


    Your command, sudo blkid -t TYPE=crypto_LUKS -o device has no exit.

    Code
    root@openmediavault:~# sudo blkid -t TYPE=crypto_LUKS -o device
    root@openmediavault:~# 

    That's why in my previous message I put the output of a different command sudo blkid /dev/sdc. Sorry if I confused you.

    Code
    root@openmediavault:~# sudo blkid /dev/sdc
    /dev/sdc: UUID="e6a123b0-51f1-49c1-a79e-50365535afc4" LABEL="admin" TYPE="crypto_LUKS"


    If your command is the one used to populate the list, then I understand why it is empty.


    Sorry for my english.

    • Official Post

    Post the output of:


    sudo blkid -g

    sudo blkid -t TYPE=crypto_LUKS -o device

    dpkg -l | grep -E "util-linux|openme"

    omv 7.7.10-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.2 | kvm 7.1.8 | compose 7.6.10 | cterm 7.8.7 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.3.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!


  • blkid -g and blkid -t empty output

    May be the problem is with blkid?


    More info: ----------------------------------


    Before unlock disk, I run this commands


    This command not show the luks disk (/dev/sdc)

    Code
    root@openmediavault:~# sudo blkid 
    /dev/sdd5: UUID="dc780b99-06f6-40a2-b144-1318b3cc88c7" TYPE="swap" PARTUUID="714f2d80-05"
    /dev/sdd1: UUID="94770a7e-14fa-4f46-bfbf-e809b5b0647c" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="714f2d80-01"
    /dev/sdb1: LABEL="HD2" UUID="7d93aaf9-de93-4367-a3bc-92a3d3d55eaa" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="bddd5aa9-8d65-49be-858a-ce849fe0bd65"
    /dev/sda1: LABEL="HD1" UUID="c5479f92-d588-4600-9295-83ec6e64bd2b" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="2435db2d-be1b-4c02-82d1-8b5d775a1b4a"


    But this command, yes



    My system is HP G8 Microserver

    If it can't be resolved, in the future, I will unlock the disk with CLI :(

    Edited once, last by JR967: More info ().

    • Official Post

    blkid has worked fine for years and does on all of the systems I manage at work. I'm not sure why it isn't working on your system. I have never moved a LUKS disk to another machine though. I need to try it.

    omv 7.7.10-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.2 | kvm 7.1.8 | compose 7.6.10 | cterm 7.8.7 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.3.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!

  • Finally, I proceeded to erase the entire disk (omv - disk - wipe) and recreated the LUKS partition and the file system and now everything works fine. The blkid command works and therefore the plugin now shows the LUKS partition and allow to unlock it.


    I have read a lot about blkid and undisplayed devices and I think it could be something irregular in the disk partition. I don't remember how I did it at the time (I think with the plugin) but it could also be with Ubuntu.


    We close the topic assuming that the best solution is to recreate the entire disk.


    Thanks a lot, ryecoaaron, for your interest.


    PD: I read messages in this forum about luks partitions missing and I think is the same case.

    • Official Post

    The plugin doesn't use partitions. I would have to say you created the luks device outside of the plugin. I don't remember reading this elsewhere but about the only thing I can suggest is filing a bug report with Debian on blkid. I don't have a system where this happens making it hard to be the one to file a bug report.

    omv 7.7.10-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.2 | kvm 7.1.8 | compose 7.6.10 | cterm 7.8.7 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.3.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!