L'Antre du Tryphon
This post give the main steps to achieve full data disk encryption. The disk password will be required during boot time. You will need the device name of the disk to perform this procedure. MAKE SURE YOU HAVE THE RIGHT DEVICE NAME. OTHERWISE, YOU WILL LOSE DATA!!! We will use the device /dev/sdz below. This procedure is valid only for data disk.
sudo wipefs -a /dev/sdzsudo cryptsetup --verbose --verify-passphrase luksFormat /dev/sdzsudo cryptsetup open /dev/sdz sdzsudo mkfs.ext4 -m 0 -L DiskLabel /dev/mapper/sdzsudo mount /dev/mapper/sdz /mntsudo umount /mntsudo cryptsetup close sdzFollow these steps to open the disk and mount the partition. They assume that the device name is /dev/sdz.
sudo cryptsetup open /dev/sdz sdzsudo mount /dev/mapper/sdz /mntFollow these steps to unmount the partition and close the disk. They assume that the disk was mounted using the steps above.
sudo umount /mntsudo cryptsetup close sdz