What if I need to move and mount an encrypted HDD elsewhere?

serverkim

New Member
Mar 12, 2022
2
0
1
Hi everyone,

I installed OMV5 as a Virtual Machine in Proxmox 7. I also passthrough a HDD to it. I then in OMV5 webgui I encrypted the disk following this tutorial:
Easy peasy, I'd say.

This encrypted hard disk is just for data storage, no OS installed on it.
So, I moved some data inside it via SMB from my pc. Every time I reboot OMV5 I have to unlock it with a password. Everything works as expected now fortunately.
Proxmox sees it this way now:
liks.jpg

Anyway, I was wondering what would happen if I need to move that HDD (for any reason) from my Proxmox machine to another physical linux machine.
After I've plugged it to the new machine and run the linux OS, what should I do to get access to my data again, say, using only command via any shell.
What would be the right steps in order to do it the right way without any risk to lose data?
Thanks
 
Last edited:

gb00s

Active Member
Jul 25, 2018
702
248
43
Poland
Code:
lsblk
cryptsetup luksOpen /dev/sdx somenamehere
mount /dev/sdx /mountitsomewhere
The How-To doesn't mention any LVM setup etc so no activation of partitions etc needed.
 

serverkim

New Member
Mar 12, 2022
2
0
1
Code:
lsblk
cryptsetup luksOpen /dev/sdx somenamehere
mount /dev/sdx /mountitsomewhere
The How-To doesn't mention any LVM setup etc so no activation of partitions etc needed.
Meaning that I would just need to mount the HDD (mount /dev/sdx /mountitsomewhere) and use the same password to unlock?
By the way, I saved the header. When should I use it?
Thanks