How to mount LUKS encrypted disk in Raspbian

  1. Install cryptsetup: 
    sudo apt install cryptsetup
  2. Find the full path of your device (e.g. /dev/sda1): 
    sudo fdisk -l
  3. Unlock encrypted volume and create a mapper: 
    sudo cryptsetop luksOpen /dev/sda1 my_disk_mapper
  4. You can find the status of the mapper created in previous step using following command: 
    sudo cryptsetup -v my_disk_mapper
  5. Finally mount the mapper to gain access to your data: 
    sudo mount /dev/mapper/my_disk_mapper /your/mount_point

How to unmount and lock LUKS encrypted partition:

  1. First unmount the volume: 
    sudo umount /your/mount_point
  2. Lock the partition using cryptsetup: 
    sudo cryptsetup luksClose /dev/mapper/my_disk_mapper

This post was originally written on my blog at https://www.amritanshu.in/how-to-mount-luks-encrypted-disk-in-raspbian/