I have a Sandisk 1TB SDD that is in SMART Pre-fail as my boot disk on a machine running Ubuntu 22.04. Recently this disk failed to boot the machine, and is no longer mountable when removed and mounted in a USB enclosure. The filesystem is ext4 on top of an LVM VG. The disk is the only PV in the Volume group ubuntu-vg.
I was able to pull a full dd image of this drive after replacing it and installing the OS from scratch. The physical drive and the image both give me the same fsck errors when trying to repair the root partition. I am unable to mount this partition even though the system recognizes it as an ext4 filesystem. I have tried running fsck with multiple backup superblocks with no difference in the output, other than an extra "Filesystem was modified" line if I use a backup superblock. When trying to mount I get "can't read superblock" errors. If I hexedit the image I can data on the disk so it seems like there is just a problem with the superblock or the journal, but I'm not sure what to do at this point.
$ sudo mount /dev/mapper/ubuntu--vg-root /mnt/oldroot/ mount: /mnt/oldroot: can't read superblock on /dev/mapper/ubuntu--vg-root. $ sudo fsck -v /dev/mapper/ubuntu--vg-root fsck from util-linux 2.37.2 e2fsck 1.46.5 (30-Dec-2021) /dev/mapper/ubuntu--vg-root: recovering journal Superblock needs_recovery flag is clear, but journal has data. Run journal anyway<y>? yes fsck.ext4: Input/output error while recovering journal of /dev/mapper/ubuntu--vg-root fsck.ext4: unable to set superblock flags on /dev/mapper/ubuntu--vg-root /dev/mapper/ubuntu--vg-root: ********** WARNING: Filesystem still has errors **********