1. Goal
Protect a data volume with block encryption and explicit mount through device mapper.
2. Files and components involved
cryptsetup
/dev/sdXN
/etc/crypttab
/etc/fstab
3. Operational flow
cryptsetup luksFormat /dev/sdXN
cryptsetup luksOpen /dev/sdXN dati_crypt
mkfs.ext4 /dev/mapper/dati_crypt
mount mapper on /srv/dati
4. Operational verification
cryptsetup luksDump /dev/sdXN
lsblk -f
mount
grep dati_crypt
5. Practical notes
Before touching disks, mounts, and filesystems, note the UUIDs, current outputs, and the latest valid backup available.
When you work on storage and filesystems, the rule stays the same: first identify the right device, then modify, and finally verify.
Quick checklist
[ ] Backup or copy of the existing configuration completed
[ ] Files and commands updated as expected
[ ] Local test completed successfully
[ ] Logs or final output verified
[ ] Rollback procedure documented