LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-13-2023, 08:37 AM   #1
TechnoJunky
Member
 
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 92

Rep: Reputation: 1
SSD corruption


Don't know what happened. I've had this disk for almost 2 years and have a lot of data on it. I don't think there's anything on it that I can't live without, but it has a LOT of data that I'd rather not re-download/recreate.
This SSD is my /home drive, I have a 2 disk setup.
The other day everything was fine, left the computer running and when I came back, had a non-responsive session. Moving the mouse did nothing, esc did nothing, so I rebooted. After booting, the GUI wouldn't come up, something about emergency mode or something similar. Rebooted to a Live USB and found that the /home drive was corrupt, or something. Rem'd out the mount and now can boot to the / drive just fine. When I do, I see the 2 partitions for /sdb show up in Dolphin. When I click on them it gives an error and then the next time I open Dolphin they are gone. On a fresh boot, they reappear in Dolphin. Same issue when using KDE Partition Manager, the drive shows up with the partitions and sizes, but errors whenever I try any function on them and then disappears till reboot.

I tried using TestDisk and it took 2 days to Analyse but errored when attempting to repair. I tried to recreate the GTP Disk Label, but it too errored when attempting to write. I tried to restore the superblocks but each backup seemed to be corrupted as well, and couldn't restore any.

It would seem that the data is there but something's corrupted and just needs to be fixed.

Any ideas on what to do next?

Last edited by TechnoJunky; 02-13-2023 at 08:40 AM.
 
Old 02-13-2023, 08:43 AM   #2
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: One main distro, & some smaller ones casually.
Posts: 5,823

Rep: Reputation: Disabled
With situations like this, it is best to do a disk dump to a file; mount & work on the file, not the original disk.

Having said that, I learned the hard way about always having a back up of your personal files; which I'm guessing you haven't got.
 
Old 02-13-2023, 08:59 AM   #3
TechnoJunky
Member
 
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 92

Original Poster
Rep: Reputation: 1
The majority of data (500 gigs?) is from Steam games. Like I said don't want to have to redownload, if I can get away without doing so. The other data, I don't believe is too important and I did do a backup a year ago. I have a Linux NAS server that I keep the importants stuff on and it does a weekly backup to an external disk. So I'm not losing any sleep over this issue, just hoping I can retrieve it rather than the alternative.

How do you suggest I do "disk dump to a file; mount & work on the file, not the original disk."? Every time I try to access the disk it errors and disappears till I reboot?
 
Old 02-13-2023, 09:10 AM   #4
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: KDE Neon
Posts: 1,259

Rep: Reputation: 522Reputation: 522Reputation: 522Reputation: 522Reputation: 522Reputation: 522
SpinRight has lots of reports of success fixing errors on SSDs and improving performance. A level 2 scan will read only, but drop into more advanced recovery when it can't read bits to recover them.
Verson 6.1 is due for release any day now, but if you buy 6.0 you can upgrade to 6.1 for free.
 
Old 02-13-2023, 09:18 AM   #5
TechnoJunky
Member
 
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 92

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by uteck View Post
SpinRight has lots of reports of success fixing errors on SSDs and improving performance. A level 2 scan will read only, but drop into more advanced recovery when it can't read bits to recover them.
Verson 6.1 is due for release any day now, but if you buy 6.0 you can upgrade to 6.1 for free.
$90? Holy Cow. I don't mind buying software (sometimes) but that's pretty steep for something that I hope to only use once, and there's no guarantee that it's going to work.
 
Old 02-13-2023, 10:41 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,422

Rep: Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590
From post #1:

Usually the early superblocks go awol. I have had good results using
Code:
e2fsck -fv -b 98304
It's free and probably worth a shot.
 
Old 02-13-2023, 11:14 AM   #7
TechnoJunky
Member
 
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 92

Original Poster
Rep: Reputation: 1
Same error as when I tried it with just the -b. I ran this for all the superblocks, each one gave the same error.

e2fsck 1.46.5 (30-Dec-2021)
e2fsck: Invalid argument while trying to open /dev/sdb

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
 
Old 02-13-2023, 12:19 PM   #8
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: One main distro, & some smaller ones casually.
Posts: 5,823

Rep: Reputation: Disabled
Quote:
Originally Posted by TechnoJunky View Post
How do you suggest I do "disk dump to a file; mount & work on the file, not the original disk."? Every time I try to access the disk it errors and disappears till I reboot?
Something like..

On an unmounted disk...
Code:
(sudo) ddrescue if=/dev/sd? of=diskdump bs=1G
Then...
Code:
(sudo) mount -o loop diskdump /mnt
If you use ddrescue, you can also tell it what sectors you want try & get.
https://linux.die.net/man/1/ddrescue
https://www.gnu.org/software/ddrescu...ue_manual.html
 
Old 02-13-2023, 06:50 PM   #9
TechnoJunky
Member
 
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 92

Original Poster
Rep: Reputation: 1
ddrescue couldn't recognize the drive.
ddrescue: if=/dev/sdb: Can't open input file: No such file or directory
I tried both sdb and sdb1, same result.

I played around with Testdisk some more and found a feature I wasn't aware it had. I was able to use it to copy files from the bad drive to my good drive. Unfortunately my good drive, root, is only a 256 gig drive, that shares space with Windows, so very limited space available for this procedure. I retrieved all "important" docs but when I tried to copy the games directory to my NFS server, it failed, not sure why. I created a directory for the files to be placed in and of course are using sudo to run TestDisk, so rights shouldn't be an issue. The only thing I can figure is it doesn't like NFS. But this goes to show you that the data and drive itself are in good shape, just some low level pointer or something is bad.
 
Old 02-14-2023, 08:18 AM   #10
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 22 MATE, Peppermint OS-Devuan, EndeavourOS
Posts: 4,317
Blog Entries: 48

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
TechnoJunky,

I have successfully used diskdigger on Linux and Windows to recover lost files.

https://diskdigger.org/

https://diskdigger.org/linux

The free version will take lightyears to recover anything, since it has to be done one file at a time.

I advise paying the reasonable $14.99 to enable multiple file recovery:
https://diskdigger.org/purchase

Tutorials:
https://diskdigger.org/tutorials
 
Old 02-14-2023, 08:30 AM   #11
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,991

Rep: Reputation: 7889Reputation: 7889Reputation: 7889Reputation: 7889Reputation: 7889Reputation: 7889Reputation: 7889Reputation: 7889Reputation: 7889Reputation: 7889Reputation: 7889
if /dev/sdb is really unreadable no tool will be able to recover anything. But anyway, do not try to modify the content of that drive (or fix anything on it), just read and save on another disk (if possible)

try to remove that ssd from the box and put back again.
 
Old 02-15-2023, 06:17 PM   #12
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,348

Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
if /dev/sdb is really unreadable no tool will be able to recover anything. But anyway, do not try to modify the content of that drive (or fix anything on it), just read and save on another disk (if possible)
This.

Do not under any circumstances try to write data back to a (suspected) bad hard drive, as you'll probably cause more data loss. For that reason, stay as far away from tools like SpinRite as humanly possible.
 
Old 02-16-2023, 01:07 PM   #13
TechnoJunky
Member
 
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 92

Original Poster
Rep: Reputation: 1
Thanks guys. I've retrieved most of the data using TestDisk to copy to another drive. It's weird how I can use TestDisk to access it all day, but the second I try to access it in Dolphin, it disappears and requires me to reboot for it to re-show up.
 
Old 02-16-2023, 04:00 PM   #14
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,991

Rep: Reputation: 7889Reputation: 7889Reputation: 7889Reputation: 7889Reputation: 7889Reputation: 7889Reputation: 7889Reputation: 7889Reputation: 7889Reputation: 7889Reputation: 7889
testdisk is a very special tool, it is tuned to work on drives like this. Dolphin works on "normal" disks, it cannot really handle those kind of errors.
 
Old 02-17-2023, 08:13 AM   #15
TechnoJunky
Member
 
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 92

Original Poster
Rep: Reputation: 1
I'm giving up on copying my Games directory. Maybe someone can explain why this is happening. The 'bad' disk is a 1TB drive. It had 2 partitions, 1 for Windows games (just can't run under Linux), and my Linux Homedrive, which contained my home drive plus my Linux (Steam) games directory. The Linux partition was, if I recall correctly, about 750 Gigs. It was about 70% full, but for the sake of argument, lets say it was under 700 Gigs. I don't recall how big the Games directory was but on the rest of Home, I had a lot of big files, I had a few VMs and Linux Distro downloads. So the Games directory was big but couldn't have been bigger than, lets say, 650 gigs. I've tried copying this 650 Gigs to a couple different drives. One was a 930 gig drive and most recently, I attached it to my server which had 1.4 Gig of free space. Every time I try to copy the Games directory, it eats ALL the free space on these destination drives. How is that possible? It makes no sense to me.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Raspberry Pi And The Story Of SSD Card Corruption LXer Syndicated Linux News 0 03-09-2022 06:06 PM
[SOLVED] I have a SSD a 500GB drive and a 2TB drive and want to move Ubuntu from 500GB to SSD greatormesby Linux - Newbie 12 07-06-2015 09:58 AM
To SSD or not to SSD jlinkels Linux - Hardware 14 10-02-2012 07:36 AM
SSD raid1 vs SSD raid10 advice ? wonker Linux - Hardware 8 05-23-2012 01:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration