Verified with systemd/237-3ubuntu10.31:
ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ sudo vi /etc/crypttab ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ sudo systemctl daemon-reload ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ sudo service systemd-cryptsetup@vdb_crypt start Please enter passphrase for disk vdb_crypt! **** ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ cat /etc/crypttab vdb_crypt /dev/vdb none luks,sector-size=4096
ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ sudo service systemd-cryptsetup@vdb_crypt status ● systemd-cryptsetup@vdb_crypt.service - Cryptography Setup for vdb_crypt Loaded: loaded (/etc/crypttab; generated) Active: active (exited) since Tue 2019-10-08 21:05:11 CEST; 13s ago Docs: man:crypttab(5) man:systemd-cryptsetup-generator(8) man:systemd-cryptsetup@.service(8) Process: 1999 ExecStart=/lib/systemd/systemd-cryptsetup attach vdb_crypt /dev/vdb none luks,sector-size=4096 (cod Main PID: 1999 (code=exited, status=0/SUCCESS)
okt 08 21:05:06 ubuntu-Standard-PC-i440FX-PIIX-1996 systemd[1]: Starting Cryptography Setup for vdb_crypt... okt 08 21:05:09 ubuntu-Standard-PC-i440FX-PIIX-1996 systemd-cryptsetup[1999]: Set cipher aes, mode xts-plain64, key okt 08 21:05:11 ubuntu-Standard-PC-i440FX-PIIX-1996 systemd[1]: Started Cryptography Setup for vdb_crypt. ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ sudo fdisk /dev/mapper/vdb_crypt
Welcome to fdisk (util-linux 2.31.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command.
Device does not contain a recognized partition table. Created a new DOS disklabel with disk identifier 0x313e0336.
Command (m for help): p Disk /dev/mapper/vdb_crypt: 5 GiB, 5366611968 bytes, 1310208 sectors Units: sectors of 1 * 4096 = 4096 bytes Sector size (logical/physical): 4096 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: dos Disk identifier: 0x313e0336
Command (m for help): q
ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$
Verified with systemd/ 237-3ubuntu10. 31:
ubuntu@ ubuntu- Standard- PC-i440FX- PIIX-1996: ~$ sudo vi /etc/crypttab ubuntu- Standard- PC-i440FX- PIIX-1996: ~$ sudo systemctl daemon-reload ubuntu- Standard- PC-i440FX- PIIX-1996: ~$ sudo service systemd- cryptsetup@ vdb_crypt start ubuntu- Standard- PC-i440FX- PIIX-1996: ~$ cat /etc/crypttab size=4096
ubuntu@
ubuntu@
Please enter passphrase for disk vdb_crypt! ****
ubuntu@
vdb_crypt /dev/vdb none luks,sector-
ubuntu@ ubuntu- Standard- PC-i440FX- PIIX-1996: ~$ sudo service systemd- cryptsetup@ vdb_crypt status cryptsetup@ vdb_crypt. service - Cryptography Setup for vdb_crypt
man: systemd- cryptsetup- generator( 8)
man: systemd- cryptsetup@ .service( 8) /lib/systemd/ systemd- cryptsetup attach vdb_crypt /dev/vdb none luks,sector- size=4096 (cod
● systemd-
Loaded: loaded (/etc/crypttab; generated)
Active: active (exited) since Tue 2019-10-08 21:05:11 CEST; 13s ago
Docs: man:crypttab(5)
Process: 1999 ExecStart=
Main PID: 1999 (code=exited, status=0/SUCCESS)
okt 08 21:05:06 ubuntu- Standard- PC-i440FX- PIIX-1996 systemd[1]: Starting Cryptography Setup for vdb_crypt... Standard- PC-i440FX- PIIX-1996 systemd- cryptsetup[ 1999]: Set cipher aes, mode xts-plain64, key Standard- PC-i440FX- PIIX-1996 systemd[1]: Started Cryptography Setup for vdb_crypt. ubuntu- Standard- PC-i440FX- PIIX-1996: ~$ sudo fdisk /dev/mapper/ vdb_crypt
okt 08 21:05:09 ubuntu-
okt 08 21:05:11 ubuntu-
ubuntu@
Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x313e0336.
Command (m for help): p vdb_crypt: 5 GiB, 5366611968 bytes, 1310208 sectors
Disk /dev/mapper/
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x313e0336
Command (m for help): q
ubuntu@ ubuntu- Standard- PC-i440FX- PIIX-1996: ~$