Skip to content

Instantly share code, notes, and snippets.

@dmitry-mightydevops
Last active March 3, 2023 04:54
Show Gist options
  • Save dmitry-mightydevops/3cd1b6a3bfa474e7db930dd231ef9356 to your computer and use it in GitHub Desktop.
Save dmitry-mightydevops/3cd1b6a3bfa474e7db930dd231ef9356 to your computer and use it in GitHub Desktop.
expected encryption
➜ lsblk --fs

NAME                                          FSTYPE      FSVER LABEL    UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
nvme0n1                                                                                                                      
├─nvme0n1p1                                   vfat        FAT16 EFI      51DA-BFD6                             443.9M     9% /boot/efi
├─nvme0n1p2                                   ext4        1.0   BOOT     52c4aca3-4024-47e4-aaec-83d11711bc7c  636.3M    28% /boot
└─nvme0n1p3                                   crypto_LUKS 2              5533a956-45af-4d8e-b903-fa6f2f0cf206                
  └─luks-5533a956-45af-4d8e-b903-fa6f2f0cf206 btrfs             fedora   e991a205-237f-4c74-b970-f80f359e92dc                /var/lib/docker/btrfs
                                                                                                                             /var
                                                                                                                             /
nvme1n1                                                                                                                      
└─nvme1n1p1                                   crypto_LUKS 2              faa4b2e4-8e0e-4ad0-bd8c-13a6bb1040b1                
  └─projects                                  btrfs             projects 0a751178-6420-4611-a178-0739f007834a  895.2G     6% /home/dmitry/Projects

mount encrypted partition

➜ sudo cryptsetup luksOpen /dev/nvme1n1p1 projects
➜ sudo mount /dev/mapper/projects ~/Projects

verify encryption

➜ sudo dmsetup ls --target crypt

luks-5533a956-45af-4d8e-b903-fa6f2f0cf206	(253, 0)
projects	(253, 1)

➜ sudo cryptsetup isLuks /dev/nvme0n1p3 && echo Success
Success

➜ sudo cryptsetup isLuks /dev/nvme1n1p1 && echo Success
Success
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment