I originally set up a 12Tb external hard drive making it encrypted with luks2. I used it fine for a couple years. For whatever reason I wanted to decrypt it the other week so I got the latest cryptsetup and ran the following to decrypt in place
./cryptsetup reencrypt --decrypt --header ~/important/seagate-12tb-exported-header.bin /dev/sdb3 That header file wasn't detached so I believed it was going to decrypt the data in line according to the man pages. (Note the cryptsetup I had was v2.7.5)
Somewhere in the middle of that decryption I decided that decrypting wasn't the right solution to my problem so I hit ctrl+c and stopped decrypting (or so I thought?).
Anyways today I checked the device and it wasn't a luks device. (My server was on the whole time). However the data was still showing at the mount point. I got confused, assumed the decryption had continued (it was started in a tmux session), and so I decided, I guess its fine that it got decrypted. I removed my /etc/cryptab and /etc/fstab entries and rebooted my computer. After rebooting, the data wasn't at the mount point as expected since removing from /etc/fstab. I tried mounting and got an error as listed below. Have I lost my data? How can I recover it if I can? The filesystem was supposed to be ext4 and the device was /dev/sdb3. I do have exported luksHeaders but I'm not sure if this is a luks encrypted anymore?
$ sudo mount /dev/sdb3 /mnt/storage mount: /mnt/storage: wrong fs type, bad option, bad superblock on /dev/sdb3, missing codepage or helper program, or other error. $ lsblk -f NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS <truncated> sdb |-sdb1 vfat FAT32 EFI 67E3-17ED |-sdb2 apfs 91c4ccef-ebf2-4976-8c93-93d48340022b `-sdb3 $ fdisk -l <truncated> Disk /dev/sdb: 10.91 TiB, 12000138624512 bytes, 23437770751 sectors Disk model: Expansion Desk Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: gpt Disk identifier: FBCE93CD-E379-437C-9E78-20049E50D514 Device Start End Sectors Size Type /dev/sdb1 40 409639 409600 200M EFI System /dev/sdb2 409640 976972135 976562496 465.7G Apple APFS /dev/sdb3 976972136 23437770711 22460798576 10.5T Linux filesystem