1

i have a raidz2 zpool across 6 disks. i am using ubuntu server 16.04 LTS and i want to encrypt those disks with luks and have the system decrypt them on startup, so that zfs can use them.

how exactly do i configure luks so that upon startup it automatically decrypts those drives using a keyfile (generated with dd if=/dev/urandom...) stored on the root of the boot drive.

i'd also like for each drive to have a different key file. preferribly sha-512 or, heck, even something higher would be nice.

1 Answer 1

0

This is done in /etc/crypttab, something very similar to /etc/fstab

Just have a look at the man page.

So a line like that would do it.

myzfs UUID=e758456d-eb80-4eea-947c-9ac914643b61 /root/mykeyfile luks

where the UUID is the uuid of your LUKS volume, that you can find with blkid.

The unencrypted LUKS volume is available at /dev/mapper/myzfs. The name you gave to it above, in crypttab

Don't forget to add a line in /etc/fstab

/dev/mapper/myzfs /where/to/mount/it  fstype defaults  0 2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .