raid + crypto: note about using --key-file with refresh authored by lelutin's avatar lelutin
without the argument, cryptsetup asks us to provide a password, but when
a key file is the only passphrase it's not very helpful
...@@ -85,9 +85,11 @@ Assume our new drives are `/dev/sdc` and `/dev/sdd`, and the highest array we ha ...@@ -85,9 +85,11 @@ Assume our new drives are `/dev/sdc` and `/dev/sdd`, and the highest array we ha
echo crypt_dev_md2 UUID=$(lsblk -n -o UUID /dev/md2 | head -1) /etc/luks/crypt_dev_md2 luks,discard | tee -a /etc/crypttab && echo crypt_dev_md2 UUID=$(lsblk -n -o UUID /dev/md2 | head -1) /etc/luks/crypt_dev_md2 luks,discard | tee -a /etc/crypttab &&
update-initramfs -u update-initramfs -u
4. Disable dm-crypt work queues (solid state devices only) 4. Disable dm-crypt work queues (solid state devices only). If you've setup
with an on-disk secret key you'll want to add `--key-file
/etc/luks/crypt_dev_md2` to the options:
cryptsetup --perf-no_read_workqueue --perf-no_write_workqueue --persistent refresh crypt_dev_md2 cryptsetup refresh --perf-no_read_workqueue --perf-no_write_workqueue --persistent crypt_dev_md2
From here, the array is ready for use in From here, the array is ready for use in
`/dev/mapper/crypt_dev_md2`. It will be resyncing for a while, you can `/dev/mapper/crypt_dev_md2`. It will be resyncing for a while, you can
... ...
......