18 lines
573 B
Text
18 lines
573 B
Text
|
|
||
|
Notes...
|
||
|
|
||
|
```
|
||
|
# dd if=/dev/zero of=/var.img bs=1M count=36000
|
||
|
# losetup /dev/loop0 /var.img
|
||
|
# cryptsetup luksFormat --hash sha256 --key-size=512 /dev/loop0
|
||
|
# cryptsetup luksOpen /dev/loop0 crypted-var
|
||
|
# mkfs.ext4 -LVAR /dev/mapper/crypted-var
|
||
|
# mount /dev/mapper/crypted-var /mnt/
|
||
|
# ### stop your service using /var, rsyslog, etc.
|
||
|
# rsync -avh --progress /var/ /mnt/
|
||
|
# umount /mnt
|
||
|
# echo "crypted-var /var.img none luks" >> /etc/crypttab
|
||
|
# echo "/dev/mapper/crypted-var /var ext4 defaults 0 2" >> /etc/fstab
|
||
|
# reboot
|
||
|
# go to scaleway console, and type your passphrase!
|
||
|
```
|