Create a LUKS-encrypted block device.

Section: RAID and Encryption

Initialize a LUKS container

bash
bash
sudo cryptsetup luksFormat /dev/sdb1
Explanation

Create a LUKS-encrypted block device.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing RAID and Encryption
Open a LUKS device
Map an encrypted device to /dev/mapper/cryptdata.
OpenIn sheetbashsame section
Close a LUKS device
Lock and remove the decrypted device mapping.
OpenIn sheetbashsame section
Show decrypted mapper devices
Verify decrypted mapper devices and mountpoints.
OpenIn sheetbashsame section
Create a RAID1 array
Create a mirrored software RAID device.
OpenIn sheetbashsame section
Create a RAID5 array
Create a RAID5 array with striping and parity.
OpenIn sheetbashsame section
Show active MD arrays
Quick view of RAID sync, rebuild, and degraded state.
OpenIn sheetbashsame section