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/sdz
sudo cryptsetup --verbose --verify-passphrase luksFormat /dev/sdz
sudo cryptsetup open /dev/sdz sdz
sudo mkfs.ext4 -m 0 -L DiskLabel /dev/mapper/sdz
sudo mount /dev/mapper/sdz /mnt
sudo umount /mnt
sudo cryptsetup close sdz
Follow these steps to open the disk and mount the partition. They assume that the device name is /dev/sdz.
sudo cryptsetup open /dev/sdz sdz
sudo mount /dev/mapper/sdz /mnt
Follow these steps to unmount the partition and close the disk. They assume that the disk was mounted using the steps above.
sudo umount /mnt
sudo cryptsetup close sdz