I have a LUKS/LVM volume that was unfortunately removed without being correctly unmounted.
I made a dd
backup of my entire encrypted Ubuntu 16.04 installation. Then fresh installation of different Ubuntu version with a live USB inside the LUKS volume on the computer, booted into it, and plugged in the drive with the dd backup to copy data over manually.
It couldn't unlock another drive with the same UUID and encryption key (being a dd
backup) and spat the dummy. The drive neither unlocked nor ejected. The drive was then mistakenly cold-yanked while I was trying to find out how to safely remove it.
Now whenever I mount this drive on a different computer, I can unlock without any problem, but when I try to mount the partition inside it says
Error mounting /dev/dm-4 at /media/user/57960113-31ce-4ced-8654-1fadf6012947:
Command-line 'mount -t "ext4" -o "uhelper=udisks2,nodev,nosuid" "/dev/dm-4" "/media/user/57960113-31ce-4ced-8654-1fadf6012947" ' exited with non-zero exit status 32:
mount: mount /dev/mapper/ubuntu1604-ubuntu1604root on /media/user/57960113-31ce-4ced-8654-1fadf6012947 failed:
Structure needs cleaning
This backup is now the only copy of my data. I have dd
'd it to another drive so I can experiment without making things worse.
How do I fix this?
sudo fsck.ext4 -y /dev/sdaX
– Ahmad Ismail Mar 14 '19 at 01:35-y
otherwise it will ask you to confirm repairing every single inode :-) – SeanFromIT Sep 23 '19 at 00:50