NVME SSD+AEAD: device-mapper: reload ioctl on failed: Invalid argument
Trying out the integrity setup and this was the result:
device-mapper: reload ioctl on failed: Invalid argument
Not sure what is/was/had gone wrong. User error?
If more information is needed apart from the debug log, just ask and I am happy to provide as much information as possible.
sudo cryptsetup luksFormat --type luks2 --cipher chacha20-random --integrity poly1305 -s 512 -h sha512 --use-random --iter-time 5000 --pbkdf argon2id /dev/nvme0n1p2 --debug
# cryptsetup 2.0.3 processing "cryptsetup luksFormat --type luks2 --cipher chacha20-random --integrity poly1305 -s 512 -h sha512 --use-random --iter-time 5000 --pbkdf argon2id /dev/nvme0n1p2 --debug"
# Running command luksFormat.
# Locking memory.
# Installing SIGINT/SIGTERM handler.
# Unblocking interruption on signal.
WARNING!
========
This will overwrite data on /dev/nvme0n1p2 irrevocably.
Are you sure? (Type uppercase yes): YES
# Allocating context for crypt device /dev/nvme0n1p2.
# Trying to open and read device /dev/nvme0n1p2 with direct-io.
# Initialising device-mapper backend library.
# RNG set to 1 (random).
# Interactive passphrase entry requested.
Enter passphrase for /dev/nvme0n1p2:
Verify passphrase:
# PBKDF argon2id, hash sha512, time_ms 5000 (iterations 0), max_memory_kb 1048576, parallel_threads 4.
# Formatting device /dev/nvme0n1p2 as type LUKS2.
# Crypto backend (gcrypt 1.8.2) initialized in cryptsetup library version 2.0.3.
# Detected kernel Linux 4.16.8-1-hardened x86_64.
# Topology: IO (512/0), offset = 0; Required alignment is 1048576 bytes.
# Creating new digest 0 (pbkdf2).
# Setting PBKDF2 type key digest 0.
# Running pbkdf2(sha256) benchmark.
# PBKDF benchmark: memory cost = 0, iterations = 404543, threads = 0 (took 81 ms)
# PBKDF benchmark: memory cost = 0, iterations = 471482, threads = 0 (took 556 ms)
# Benchmark returns pbkdf2(sha256) 471482 iterations, 0 memory, 0 threads (for 512-bits key).
# Digest JSON:
# {
"type":"pbkdf2",
"keyslots":[
],
"segments":[
],
"hash":"sha256",
"iterations":58935,
"salt":"85/Chn3Wimbmj0aUYJBAmE6ezxQiOSZLflNz2U9Ay9k=",
"digest":"s0rh0ouA3xy1hset+IJS1sm3b8tjFXJV3+kBUtwu+P8="
}
# Segment 0 assigned to digest 0.
# Header JSON:
# {
"keyslots":{
},
"tokens":{
},
"segments":{
"0":{
"type":"crypt",
"offset":"4194304",
"iv_tweak":"0",
"size":"dynamic",
"encryption":"chacha20-random",
"sector_size":512,
"integrity":{
"type":"poly1305",
"journal_encryption":"none",
"journal_integrity":"none"
}
}
},
"digests":{
"0":{
"type":"pbkdf2",
"keyslots":[
],
"segments":[
"0"
],
"hash":"sha256",
"iterations":58935,
"salt":"85/Chn3Wimbmj0aUYJBAmE6ezxQiOSZLflNz2U9Ay9k=",
"digest":"s0rh0ouA3xy1hset+IJS1sm3b8tjFXJV3+kBUtwu+P8="
}
},
"config":{
"json_size":"12288",
"keyslots_size":"4161536"
}
}
# Opening lock resource file /run/cryptsetup/L_259:2
# Acquiring write lock for device /dev/nvme0n1p2.
# Verifying write lock handle for device /dev/nvme0n1p2.
# Device /dev/nvme0n1p2 WRITE lock taken.
# Trying to format INTEGRITY device on top of /dev/nvme0n1p2, tmp name temporary-cryptsetup-40a8a499-7f53-4683-8654-a50319b51cc1, tag size 28.
# dm version [ opencount flush ] [16384] (*1)
# dm versions [ opencount flush ] [16384] (*1)
# Detected dm-ioctl version 4.37.0.
# Detected dm-integrity version 1.1.0.
# Detected dm-crypt version 1.18.1.
# Device-mapper backend running with UDEV support enabled.
# DM-UUID is CRYPT-INTEGRITY-temporary-cryptsetup-40a8a499-7f53-4683-8654-a50319b51cc1
# Udev cookie 0xd4db1a1 (semid 360448) created
# Udev cookie 0xd4db1a1 (semid 360448) incremented to 1
# Udev cookie 0xd4db1a1 (semid 360448) incremented to 2
# Udev cookie 0xd4db1a1 (semid 360448) assigned to CREATE task(0) with flags DISABLE_SUBSYSTEM_RULES DISABLE_DISK_RULES DISABLE_OTHER_RULES DISABLE_LIBRARY_FALLBACK (0x2e)
# dm create temporary-cryptsetup-40a8a499-7f53-4683-8654-a50319b51cc1 CRYPT-INTEGRITY-temporary-cryptsetup-40a8a499-7f53-4683-8654-a50319b51cc1 [ opencount flush ] [16384] (*1)
# dm reload temporary-cryptsetup-40a8a499-7f53-4683-8654-a50319b51cc1 [ opencount flush securedata ] [16384] (*1)
# dm resume temporary-cryptsetup-40a8a499-7f53-4683-8654-a50319b51cc1 [ opencount flush securedata ] [16384] (*1)
# temporary-cryptsetup-40a8a499-7f53-4683-8654-a50319b51cc1: Stacking NODE_ADD (254,1) 0:0 0600 [trust_udev]
# temporary-cryptsetup-40a8a499-7f53-4683-8654-a50319b51cc1: Stacking NODE_READ_AHEAD 256 (flags=1)
# Udev cookie 0xd4db1a1 (semid 360448) decremented to 1
# Udev cookie 0xd4db1a1 (semid 360448) waiting for zero
# Udev cookie 0xd4db1a1 (semid 360448) destroyed
# temporary-cryptsetup-40a8a499-7f53-4683-8654-a50319b51cc1: Skipping NODE_ADD (254,1) 0:0 0600 [trust_udev]
# temporary-cryptsetup-40a8a499-7f53-4683-8654-a50319b51cc1: Processing NODE_READ_AHEAD 256 (flags=1)
# temporary-cryptsetup-40a8a499-7f53-4683-8654-a50319b51cc1 (254:1): read ahead is 256
# temporary-cryptsetup-40a8a499-7f53-4683-8654-a50319b51cc1: retaining kernel read ahead of 256 (requested 256)
# dm versions [ opencount flush ] [16384] (*1)
# dm versions [ opencount flush ] [16384] (*1)
# Udev cookie 0xd4d9b8e (semid 393216) created
# Udev cookie 0xd4d9b8e (semid 393216) incremented to 1
# Udev cookie 0xd4d9b8e (semid 393216) incremented to 2
# Udev cookie 0xd4d9b8e (semid 393216) assigned to REMOVE task(2) with flags DISABLE_LIBRARY_FALLBACK (0x20)
# dm remove temporary-cryptsetup-40a8a499-7f53-4683-8654-a50319b51cc1 [ opencount flush retryremove ] [16384] (*1)
# Udev cookie 0xd4d9b8e (semid 393216) decremented to 0
# Udev cookie 0xd4d9b8e (semid 393216) waiting for zero
# Udev cookie 0xd4d9b8e (semid 393216) destroyed
# Device /dev/nvme0n1p2 WRITE lock released.
# Device size 1023671606784, header size 4194304.
# Opening lock resource file /run/cryptsetup/L_259:2
# Acquiring write lock for device /dev/nvme0n1p2.
# Verifying write lock handle for device /dev/nvme0n1p2.
# Device /dev/nvme0n1p2 WRITE lock taken.
# Trying to write LUKS2 header (16384 bytes) at offset 0.
# Opening locked device /dev/nvme0n1p2
# Veryfing locked device handle (bdev)
# Checksum:ee7346d5d3890e9859c764648aed077a79c98b595a651edc680d95bf61036aa8 (in-memory)
# Trying to write LUKS2 header (16384 bytes) at offset 16384.
# Opening locked device /dev/nvme0n1p2
# Veryfing locked device handle (bdev)
# Checksum:c48af79344435ad948b89ae8976f5d5b6f3fb0ce1319669f716a85c26a8d85e7 (in-memory)
# Device /dev/nvme0n1p2 WRITE lock released.
# Adding new keyslot -1 using volume key.
# Adding new keyslot -1 with volume key assigned to a crypt segment.
# Selected keyslot 0.
# Verifying key digest 0.
# Keyslot 0 assigned to digest 0.
# Trying to allocate LUKS2 keyslot 0.
# Found area 32768 -> 290816
# Running argon2id() benchmark.
# PBKDF benchmark: memory cost = 32, iterations = 4, threads = 4 (took 15 ms)
# PBKDF benchmark: memory cost = 533, iterations = 4, threads = 4 (took 3 ms)
# PBKDF benchmark: memory cost = 8528, iterations = 4, threads = 4 (took 30 ms)
# PBKDF benchmark: memory cost = 71066, iterations = 4, threads = 4 (took 175 ms)
# PBKDF benchmark: memory cost = 101522, iterations = 4, threads = 4 (took 256 ms)
# PBKDF benchmark: memory cost = 1048576, iterations = 7, threads = 4 (took 4047 ms)
# PBKDF benchmark: memory cost = 1048576, iterations = 8, threads = 4 (took 4375 ms)
# PBKDF benchmark: memory cost = 1048576, iterations = 9, threads = 4 (took 4937 ms)
# Benchmark returns argon2id() 9 iterations, 1048576 memory, 4 threads (for 256-bits key).
# Keyslot JSON:
# {
"type":"luks2",
"key_size":64,
"af":{
"type":"luks1",
"stripes":4000,
"hash":"sha512"
},
"area":{
"type":"raw",
"encryption":"aes-xts-plain64",
"key_size":32,
"offset":"32768",
"size":"258048"
},
"kdf":{
"type":"argon2id",
"time":9,
"memory":1048576,
"cpus":4,
"salt":"iIN+t5NEJacEeru8w1Yv6IpmARfZHNuhjdO0Vi5riKk="
}
}
# Calculating attributes for LUKS2 keyslot 0.
# Updating keyslot area [0x8000].
# Opening lock resource file /run/cryptsetup/L_259:2
# Acquiring write lock for device /dev/nvme0n1p2.
# Verifying write lock handle for device /dev/nvme0n1p2.
# Device /dev/nvme0n1p2 WRITE lock taken.
# Opening locked device /dev/nvme0n1p2
# Veryfing locked device handle (bdev)
# Device /dev/nvme0n1p2 WRITE lock released.
# Device size 1023671606784, header size 4194304.
# Opening lock resource file /run/cryptsetup/L_259:2
# Acquiring write lock for device /dev/nvme0n1p2.
# Verifying write lock handle for device /dev/nvme0n1p2.
# Device /dev/nvme0n1p2 WRITE lock taken.
# Trying to write LUKS2 header (16384 bytes) at offset 0.
# Opening locked device /dev/nvme0n1p2
# Veryfing locked device handle (bdev)
# Checksum:727792f4cd6dc1c5ac3721d9424076cf9d97f408a60094398f0e741295a491dc (in-memory)
# Trying to write LUKS2 header (16384 bytes) at offset 16384.
# Opening locked device /dev/nvme0n1p2
# Veryfing locked device handle (bdev)
# Checksum:d0d6e0ae276f682a28b143e65cb647020bcc1d1fc147945ed46ab46d3c0ab20a (in-memory)
# Device /dev/nvme0n1p2 WRITE lock released.
Wiping device to initialize integrity checksum.
You can interrupt this by pressing CTRL+c (rest of not wiped device will contain invalid checksum).
# Activating volume temporary-cryptsetup-4df479d4-0baa-4a42-96d4-1e21f964bef5 by volume key.
# dm versions [ opencount flush ] [16384] (*1)
# dm status temporary-cryptsetup-4df479d4-0baa-4a42-96d4-1e21f964bef5 [ opencount flush ] [16384] (*1)
# Verifying key digest 0.
# Loading key (64 bytes) in thread keyring.
# Trying to activate INTEGRITY device on top of /dev/nvme0n1p2, using name temporary-cryptsetup-4df479d4-0baa-4a42-96d4-1e21f964bef5_dif, tag size 28, provided sectors 1895555752.
# DM-UUID is CRYPT-INTEGRITY-temporary-cryptsetup-4df479d4-0baa-4a42-96d4-1e21f964bef5_dif
# Udev cookie 0xd4d2bc3 (semid 425984) created
# Udev cookie 0xd4d2bc3 (semid 425984) incremented to 1
# Udev cookie 0xd4d2bc3 (semid 425984) incremented to 2
# Udev cookie 0xd4d2bc3 (semid 425984) assigned to CREATE task(0) with flags DISABLE_SUBSYSTEM_RULES DISABLE_DISK_RULES DISABLE_OTHER_RULES DISABLE_LIBRARY_FALLBACK (0x2e)
# dm create temporary-cryptsetup-4df479d4-0baa-4a42-96d4-1e21f964bef5_dif CRYPT-INTEGRITY-temporary-cryptsetup-4df479d4-0baa-4a42-96d4-1e21f964bef5_dif [ opencount flush ] [16384] (*1)
# dm reload temporary-cryptsetup-4df479d4-0baa-4a42-96d4-1e21f964bef5_dif [ opencount flush securedata ] [16384] (*1)
# dm resume temporary-cryptsetup-4df479d4-0baa-4a42-96d4-1e21f964bef5_dif [ opencount flush securedata ] [16384] (*1)
# temporary-cryptsetup-4df479d4-0baa-4a42-96d4-1e21f964bef5_dif: Stacking NODE_ADD (254,1) 0:0 0600 [trust_udev]
# temporary-cryptsetup-4df479d4-0baa-4a42-96d4-1e21f964bef5_dif: Stacking NODE_READ_AHEAD 256 (flags=1)
# Udev cookie 0xd4d2bc3 (semid 425984) decremented to 1
# Udev cookie 0xd4d2bc3 (semid 425984) waiting for zero
# Udev cookie 0xd4d2bc3 (semid 425984) destroyed
# temporary-cryptsetup-4df479d4-0baa-4a42-96d4-1e21f964bef5_dif: Skipping NODE_ADD (254,1) 0:0 0600 [trust_udev]
# temporary-cryptsetup-4df479d4-0baa-4a42-96d4-1e21f964bef5_dif: Processing NODE_READ_AHEAD 256 (flags=1)
# temporary-cryptsetup-4df479d4-0baa-4a42-96d4-1e21f964bef5_dif (254:1): read ahead is 256
# temporary-cryptsetup-4df479d4-0baa-4a42-96d4-1e21f964bef5_dif: retaining kernel read ahead of 256 (requested 256)
# Trying to open and read device /dev/mapper/temporary-cryptsetup-4df479d4-0baa-4a42-96d4-1e21f964bef5_dif with direct-io.
# Calculated device size is 1895555752 sectors (RW), offset 0.
# DM-UUID is CRYPT-LUKS2-cbd55c5da7fc4feab9877a280c03b523-temporary-cryptsetup-4df479d4-0baa-4a42-96d4-1e21f964bef5
# Udev cookie 0xd4d2534 (semid 458752) created
# Udev cookie 0xd4d2534 (semid 458752) incremented to 1
# Udev cookie 0xd4d2534 (semid 458752) incremented to 2
# Udev cookie 0xd4d2534 (semid 458752) assigned to CREATE task(0) with flags DISABLE_SUBSYSTEM_RULES DISABLE_DISK_RULES DISABLE_OTHER_RULES DISABLE_LIBRARY_FALLBACK (0x2e)
# dm create temporary-cryptsetup-4df479d4-0baa-4a42-96d4-1e21f964bef5 CRYPT-LUKS2-cbd55c5da7fc4feab9877a280c03b523-temporary-cryptsetup-4df479d4-0baa-4a42-96d4-1e21f964bef5 [ opencount flush ] [16384] (*1)
# dm reload temporary-cryptsetup-4df479d4-0baa-4a42-96d4-1e21f964bef5 [ opencount flush securedata ] [16384] (*1)
device-mapper: reload ioctl on failed: Invalid argument
# Udev cookie 0xd4d2534 (semid 458752) decremented to 1
# Udev cookie 0xd4d2534 (semid 458752) incremented to 2
# Udev cookie 0xd4d2534 (semid 458752) assigned to REMOVE task(2) with flags DISABLE_SUBSYSTEM_RULES DISABLE_DISK_RULES DISABLE_OTHER_RULES DISABLE_LIBRARY_FALLBACK (0x2e)
# dm remove temporary-cryptsetup-4df479d4-0baa-4a42-96d4-1e21f964bef5 [ opencount flush securedata ] [16384] (*1)
# Udev cookie 0xd4d2534 (semid 458752) decremented to 1
# Udev cookie 0xd4d2534 (semid 458752) waiting for zero
# Udev cookie 0xd4d2534 (semid 458752) destroyed
# dm versions [ opencount flush ] [16384] (*1)
# dm versions [ opencount flush ] [16384] (*1)
# Udev cookie 0xd4d8274 (semid 491520) created
# Udev cookie 0xd4d8274 (semid 491520) incremented to 1
# Udev cookie 0xd4d8274 (semid 491520) incremented to 2
# Udev cookie 0xd4d8274 (semid 491520) assigned to REMOVE task(2) with flags DISABLE_LIBRARY_FALLBACK (0x20)
# dm remove temporary-cryptsetup-4df479d4-0baa-4a42-96d4-1e21f964bef5_dif [ opencount flush retryremove ] [16384] (*1)
# Udev cookie 0xd4d8274 (semid 491520) decremented to 0
# Udev cookie 0xd4d8274 (semid 491520) waiting for zero
# Udev cookie 0xd4d8274 (semid 491520) destroyed
# Requesting keyring key for revoke and unlink.
# Releasing crypt device /dev/nvme0n1p2 context.
# Releasing device-mapper backend.
# Unlocking memory.
Command failed with code -1 (wrong or missing parameters).
Edited by NoX