You are not logged in.

#1 2020-09-05 03:34:21

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,253

Recover data from irrepiarable partition

If this can't be done, it's not the end of the world, BUT:

I've moved house more than one in the past three months, and my desktop hasn't enjoyed the experience (I may have to buy a new MB, but that's an aside). I have the damned thing booting again, and with network connectivity. I also have a full system (excluding /home) backup on an external drive - so all good.

/home has always been on a separate drive (SSD), and unfortunately, I have no backup of this, and herein lies the problem. The drive is now erroring out. It seems to be an FS problem rather than H/W. ext4, and everything I try suggests a superblock problem.

Trying to restore the superblock from any backups manually suggests that they are all bad. xfs_repair is failing to find a usable superblock.

gparted does show that the partition is still populated, but gparted's check function also fails to repair the drive, as does fsck.ext4 in a terminal.

I've considered a dd clone, but I assume that this will just clone the FS errors and not be of any use.

So, is there a way to recover the data (that I know is still there). I have other drives and sufficient drive space to do a copy off/copy on if necessary.

Worst case scenario is I copy /home from my laptop back to this, which will get most stuff and customisation back, but not all, and we are talking about 160Gb (I have no idea what is using all that, since my personal data is all stored on NFS or other drives, but hey ho, until I recover it I'll never know), but I'd like to recover the system as was.

TIA.


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#2 2020-09-05 06:42:57

seth
Member
Registered: 2012-09-03
Posts: 51,143

Re: Recover data from irrepiarable partition

https://wiki.archlinux.org/index.php/Fi … d_PhotoRec

But:
SSD + house moving + FS error + every superblock copy damaged somehow doesn't add up.
Can you dd some 100 MBs from the disk w/o generating lots of (ie. "any") IO errors in dmesg?
If yes, have you tried to mount the drive from a different OS (eg. grml) to ensure it's not some SW remainder from "have the damned thing booting again"?
Did you by any chance mess w/ the drive (dd onto it or so) when trying to get "the damned thing booting again"?

Offline

#3 2020-09-05 09:02:27

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,253

Re: Recover data from irrepiarable partition

OK, first to clarify the issue. On setting up the PC after the second move I was getting BIOS beepcode errors and a failure to even post (No VGA adapter found). After (much) tinkering, this appears to have been a loose CPU power cable which, after re-seating got rid of the beepcode errors and allowed the system to start to boot (Arch is on the NvME drive). However, full boot failed on trying to mount /home (the SSD). I eventually simply removed the mount line from fstab which got me booting, but had no network (as though there was no LAN port at all), so assuming just that one component is damaged I ordered a PCI LAN card off Amazon, which has taken the best part of a week to get here (Amazon driver couldn't find my new address in deepest darkest Wales). During that period the PC has not been powered on, and no data recovery attempts have been made.

The network card arrived yesterday, and has indeed resolved that issue, so I've been trying to recover this drive. I've done nothing that I would consider to be destructive yet (and in fact can't because of the bad superblock issue).

Neither testdisk nor xfs_repair are able to assist with this (xfs_repair ends with "Sorry, could not find valid secondary superblock")

I had forgotten about photorec, and it may be my last hope if it can recover the files AND I can preserve filenames. If not, I may just re-prep the drive, copy off the laptop /home and work from there. The laptop is the closest thing to a backup of /home that I have.

The SSDs are not plugged into the MB directly, but via a 2 port SATA card, so shouldn't be affected by any possible damaged components on the MB (tried different PCI slots), thogu I may (depending on how things go) finish up have to buy a new MB. Obviously, something I'd rather avoid given that anything close to this is north of £100.

Last edited by Roken (2020-09-05 09:05:16)


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#4 2020-09-05 15:51:14

seth
Member
Registered: 2012-09-03
Posts: 51,143

Re: Recover data from irrepiarable partition

Did you test to dd *from* the disk (and whether it generates IO errors)?
(Every superblock "damaged" sounds like an issue w/ either the disks firmware or the connection - or all data is gone)

loose CPU power cable…
failed on trying to mount /home…
had no network…

Did you move yourself or did you hire Mario and Luigi to throw it around? ;-)
(If the TSA disassebled it and put everything into x-ray… NAND doesn't respond all that well but is usually sufficiently shielded)

Offline

#5 2020-09-05 19:19:42

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,253

Re: Recover data from irrepiarable partition

seth wrote:

Did you move yourself or did you hire Mario and Luigi to throw it around? ;-)
(If the TSA disassebled it and put everything into x-ray… NAND doesn't respond all that well but is usually sufficiently shielded)

If I'm honest, a bit of both. I'm going to try a dd and then mount the image. For now, I've temporarily copied /home from the laptop to my other SSD, which at least gets me something like, but still, if I can recover the original drive it will be so much better, and educational.


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

Board footer

Powered by FluxBB