Running badblocks : stuck at 50%

Hi,

I’m currently working on a client’s PC with OpenSUSE Leap on it. I’d like to replace it with Rocky Linux 9. I’m having some weird hardware-related problems. Here goes.

First I attempted a remote backup using scp -r to a local server. After a few files, things got stuck and the system froze. Hard reboot.

Then I tried to copy things to a locally mounted external hard disk (formatted using ext4). Same thing, the transfer got stuck at around the same place.

In Rescue Mode I ran the following command:

# badblocks -svn /dev/sda

It’s been running for more than three hours now. I’ve been stuck for about 20 minutes at 49.58%… and now it just switched to 49.59%. Doesn’t display any errors though.

Curious detail: I tried to run a memory test from the installation media. Memtest86 shows up briefly, but as soon as it starts, the system reboots.

Any idea what’s going on here?

If the system reboots during memtest that would suggest some sort of hardware problem. As for the badblocks, if you can switch to another console window and check dmesg to see extra info, since if there are bad blocks then it will show seek errors in dmesg and potentially other things too.

I experimented some more with this. I removed the SSD from the PC and installed it on a spare sandbox PC I keep in my office.

Started OpenSUSE Leap, mounted an external hard disk, tried to copy /home to the external hard disk… and the copy operation stops short after 4 gigabytes of transfer, with what looks like a hard freeze. So I guess at least the SSD is a faulty component here.

Now I wonder: is there some sort of safe way to extract data from a faulty SSD ?

You can try installing ddrescue from EPEL and try using that to recover data but that’s probably more for normal disks than SSD but worth a try. But if it’s hardware failure, then you’re looking at professional data recovery services which are expensive.

If you have backups of the disk, that would be the best bet and live with whatever has been lost if it’s minimal. But see how you go with ddrescue.

1 Like

Thanks very much, Ian ! Your advice was a lifesaver. I could retrieve all the data using ddrescue. This was not exactly a trivial operation, as I had to make a series of attempts using various options. I documented everything in a little blog article:

Cheers,

Niki

2 Likes