Encrypting the disks on OpenMediaVault

luks and omv

This post is assuming that every disk does not have any important data and/or no critical data on it. Encrypting disk(s) with data will cause data loss.

Why would we want to encrypt our disk(s)?

To prevent unauthorized users that have physical access to the disks and walk away with it.

To encrypt the disk drives, make sure to install the plugin called openmediavault-luksencryption. Once it is installed, a new tab named Encryption will be available.

  1. Navigate to Storage > Encryption then select Create
  2. In the new windows, select the disk you would like to encrypt from the Device drop-down menu
  3. Enter the encryption key in the Passphrase field (do NOT lose this Passphrase)
  4. Confirm the Passphrase then click on Create
  5. Then you will get a prompt if you are sure to encrypt the disk. Click Yes if you want to continue
  6. Once done, click Apply when the yellow banner appears
  7. Repeat steps 1 – 6 for each disk you would like to encrypt.
Figure 1

Now, we need to make a backup of the LUKS header.

  1. Navigate to Storage > Encryption then select the disk
  2. Click on Recovery
  3. Select the Backup-header
  4. Save this LUKS header because it may come in handy in the future
  5. Repeat steps 1 – 4 for each encrypted disk

When done, each disk needs to be unlocked for OMV to write and read data.

  1. Navigate to Storage > Encryption then select the disk
  2. Click Unlock
  3. Enter the passphrase in the Passphrase field
  4. Click on Unlock
  5. Repeat steps 1 – 4 for each encrypted disk. A blue dot should appear in the Unlock column once the disk has been unlocked
Figure 2

We need to format and set the file system to each disk and mount each disk to be usable

  1. Navigate to Storage > Files Systems
  2. Click on Create to add the newly encrypted disks
  3. Select the disk from the Device drop-down menu
  4. Enter a label that makes sense to you in the Label field
  5. Select the file system type from the File System drop-down menu
  6. Click Ok
  7. Click the newly formatted disk
  8. Click Mount
  9. Click on Apply
  10. Repeat steps 1 – 9 for each disk
Figure 3

That is pretty much it.

Cheers!

Subscribe
Notify of
guest

11 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Roger Miller
Roger Miller
4 years ago

Would there be any reason the device name does not show up on the dropdown list?

Eric
Eric
4 years ago

Great write up! I followed the steps and was able to access my encrypted drive on windows 10 but it says I don’t have permission when I try to add files. I have read/write access set up for the credentials I mapped with. Any ide why it seems write only? Thanks

MrPhil
MrPhil
3 years ago

With my mounted drive labeled “Data1”, it has about 1.5TB data. It does not show up in the Encryption device drop-down dialogue. Is it because it is not blank? Does the encryption need to be written to a blank driven In OMV?

Last edited 3 years ago by MrPhil
CeramicMonster
CeramicMonster
3 years ago

I’m getting an Error 0 when I try to create a File System after encrypting the disk. I’m using OMV5. Failed to execute command ‘export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; omv-salt deploy run –no-color quota 2>&1’ with exit code ‘1’: raspberrypi: ———- ID: quota_off_no_quotas_ Function: cmd.run Name: quotaoff –group –user /dev/disk/by-label/Backup || true Result: True Comment: Command “quotaoff –group –user /dev/disk/by-label/Backup || true” run Started: 21:42:15.466588 Duration: 27.029 ms Changes: ———- pid: 27986 retcode: 0 stderr: quotaoff: Cannot stat() given mountpoint /dev/disk/by-label/Backup: No such file or directory Skipping… quotaoff: No correct mountpoint specified. stdout: ———- ID: quota_check_no_quotas_ Function: cmd.run Name: quotacheck –user… Read more »

Axel
Axel
3 years ago

Hi, I followed these steps but retrieve this error message:
Error #0:
OMV\Exception: export LANG=C; partprobe ‘/dev/sda’ in /usr/share/openmediavault/engined/rpc/luks.inc:470
Stack trace:
#0 [internal function]: OMVRpcServiceLuksMgmt->createContainer(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(‘createContainer’, Array, Array)
#3 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call(‘LuksMgmt’, ‘createContainer’, Array, Array, 1)
#4 {main}

Can’t find the reason for this… thanks for your help.

Axel
Axel
Reply to  Karlo Abaga
3 years ago

Thanks anyways…

11
0
Would love your thoughts, please comment.x
()
x