1

I have created a replicated drbd device.

On top, I have create an encrypted volume with cryptsetup and finally formatted with ext4. Additionally, I am using a keyfile to be able to automount the crypted device. (Please do insist this being unsecure. The keyfile is stored on an encrypted device itself, accessible only after giving the passphrase)

I want the device being automounted on boot so I added the entries in /etc/crypttab as well as /etc/fstab:

backuppc /dev/drbd1 /root/luks_key/backuppc.key luks

/dev/mapper/backuppc /mnt ext4 defaults 1 2

Unfortunately the device does not open during boot. Once booted I can activate the device and mount it without giving a passphrase.

I assume this is because the crypto setup tries to access the underlying /dev/drbd1 during boot while drbd is not up at this stage.

Question is:

How can I either -postpone cryptsetup until drbd is up and running or -force drbd to start earlier so cryptsetup will find the device?

Any clues? And yes, if there is no other solution I will do with rc.local file...

Thanks!

/K

Christian
  • 11
  • 1

0 Answers0