Using this as reference :
To create and mount a LUKS FS on disk :
https://github.com/couchbase/perfrunner/blob/master/scripts/create_luks_fs.sh
/dev/sdb1 - Is the partition on which you want LUKS format to be installed/encrypted
luks_keyfile.key is file containing the key to unlocking/decrypting the LUKS partition
cbefs is the name of the new filesystem (cb encrypted fs)
Steps:
- LUKS format the partition : sudo cryptsetup luksFormat -d luks_keyfile.key --batch-mode /dev/sdb1
- Open the LUKS formatted partition : sudo cryptsetup luksOpen -d luks_keyfile.key /dev/sdb1 cbefs
- Create a new File System : mkfs.xfs /dev/mapper/cbefs
- Mount /data to the FS : mount /dev/mapper/cbefs /data
- Give couchbase user the permissions to /data: chown couchbase:couchbase /data
- Add entries to fstab : sed -i '/data/c\/dev/mapper/cbefs /data xfs defaults 0 2' /etc/fstab
- Add entries to crypttab: echo "cbefs /dev/sdb1 /root/luks_keyfile.key luks" > /etc/crypttab
Using this as reference :
To create and mount a LUKS FS on disk :
https://github.com/couchbase/perfrunner/blob/master/scripts/create_luks_fs.sh
/dev/sdb1 - Is the partition on which you want LUKS format to be installed/encrypted
luks_keyfile.key is file containing the key to unlocking/decrypting the LUKS partition
cbefs is the name of the new filesystem (cb encrypted fs)
Steps: