Mounting USB disk with LUKS encrypted partion fails with a cryptsetup "Device already exists" error

Yes, this happens when luks encrypted device was not cleanly deactivated with cryptsetup close.

You can try to remove the mapping using

dmsetup remove /dev/mapper/luks-... if you want to avoid rebooting.


From my side, when it happened the dmsetup remove /dev/mapper/luks- command didn't work due to the fact that the specified mapped disk is no more present under /dev/mapper ...

So I had to manually close the old mapping with:

cryptsetup luksClose /dev/sdxx /dev/mapper/luks-...

(where sdx correspond to the luks partition you have identified with fdisk -l