device-mapper: reload ioctl on failed: Invalid argument
Been using this for several years. Last time being about a month or 2 ago. All of a sudden, I get this:
user@laptop:/media/user/drive/data$ sudo cryptsetup --debug open "XXXX" vault
# cryptsetup 2.2.0 processing "cryptsetup --debug open XXXX vault"
# Running command open.
# Locking memory.
# Installing SIGINT/SIGTERM handler.
# Unblocking interruption on signal.
# Allocating context for crypt device XXXX.
# Trying to open and read device XXXX with direct-io.
# Initialising device-mapper backend library.
# Trying to load any crypt type from device XXXX.
# Crypto backend (OpenSSL 1.1.1c 28 May 2019) initialized in cryptsetup library version 2.2.0.
# Detected kernel Linux 5.0.0-1030-oem-osp1 x86_64.
# PBKDF pbkdf2-sha256, time_ms 2000 (iterations 0).
# Reading LUKS header of size 1024 from device XXXX
# Key length 32, device size 2097152 sectors, header size 2050 sectors.
# Activating volume vault using token -1.
# Interactive passphrase entry requested.
Enter passphrase for XXXX:
# Activating volume vault [keyslot -1] using passphrase.
# dm version [ opencount flush ] [16384] (*1)
# dm versions [ opencount flush ] [16384] (*1)
# Detected dm-ioctl version 4.39.0.
# Device-mapper backend running with UDEV support enabled.
# dm status vault [ opencount noflush ] [16384] (*1)
# Trying to open key slot 0 [INACTIVE].
# Trying to open key slot 1 [ACTIVE].
# Reading key slot 1 area.
# Using userspace crypto wrapper to access keyslot area.
# Reusing open ro fd on device XXXX
# Trying to open key slot 2 [ACTIVE].
# Reading key slot 2 area.
# Using userspace crypto wrapper to access keyslot area.
# Reusing open ro fd on device XXXX
# dm versions [ opencount flush ] [16384] (*1)
# dm status vault [ opencount noflush ] [16384] (*1)
# Allocating a free loop device.
# Trying to open and read device /dev/loop0 with direct-io.
# Calculated device size is 2093056 sectors (RW), offset 4096.
# dm versions [ opencount flush ] [16384] (*1)
# DM-UUID is CRYPT-LUKS1-939b242599a04a79840a4bf2f73f4cd0-vault
# Udev cookie 0xd4de3e7 (semid 262144) created
# Udev cookie 0xd4de3e7 (semid 262144) incremented to 1
# Udev cookie 0xd4de3e7 (semid 262144) incremented to 2
# Udev cookie 0xd4de3e7 (semid 262144) assigned to CREATE task(0) with flags DISABLE_LIBRARY_FALLBACK (0x20)
# dm create vault CRYPT-LUKS1-939b242599a04a79840a4bf2f73f4cd0-vault [ opencount flush ] [16384] (*1)
# dm reload vault [ opencount flush securedata ] [16384] (*1)
device-mapper: reload ioctl on failed: Invalid argument
# Udev cookie 0xd4de3e7 (semid 262144) decremented to 1
# Udev cookie 0xd4de3e7 (semid 262144) incremented to 2
# Udev cookie 0xd4de3e7 (semid 262144) assigned to REMOVE task(2) with flags DISABLE_LIBRARY_FALLBACK (0x20)
# dm remove vault [ opencount flush securedata ] [16384] (*1)
# Udev cookie 0xd4de3e7 (semid 262144) decremented to 1
# Udev cookie 0xd4de3e7 (semid 262144) waiting for zero
# Udev cookie 0xd4de3e7 (semid 262144) destroyed
# dm versions [ opencount flush ] [16384] (*1)
# dm versions [ opencount flush ] [16384] (*1)
# Releasing crypt device XXXX context.
# Releasing device-mapper backend.
# Closing read only fd for XXXX.
# Closed loop /dev/loop0 (XXXX).
# Unlocking memory.
Command failed with code -1 (wrong or missing parameters).
Edited by Dimitry Ishenko