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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
02-13-2023, 08:37 AM
|
#1
|
Member
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 92
Rep:
|
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.
|
|
|
02-13-2023, 08:43 AM
|
#2
|
LQ Guru
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: One main distro, & some smaller ones casually.
Posts: 5,823
Rep: 
|
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.
|
|
|
02-13-2023, 08:59 AM
|
#3
|
Member
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 92
Original Poster
Rep:
|
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?
|
|
|
02-13-2023, 09:10 AM
|
#4
|
Senior Member
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: KDE Neon
Posts: 1,259
|
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.
|
|
|
02-13-2023, 09:18 AM
|
#5
|
Member
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 92
Original Poster
Rep:
|
Quote:
Originally Posted by uteck
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.
|
|
|
02-13-2023, 10:41 AM
|
#6
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,422
|
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.
|
|
|
02-13-2023, 11:14 AM
|
#7
|
Member
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 92
Original Poster
Rep:
|
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>
|
|
|
02-13-2023, 12:19 PM
|
#8
|
LQ Guru
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: One main distro, & some smaller ones casually.
Posts: 5,823
Rep: 
|
Quote:
Originally Posted by TechnoJunky
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
|
|
|
02-13-2023, 06:50 PM
|
#9
|
Member
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 92
Original Poster
Rep:
|
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.
|
|
|
02-14-2023, 08:30 AM
|
#11
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,991
|
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.
|
|
|
02-15-2023, 06:17 PM
|
#12
|
Senior Member
Registered: Jan 2012
Distribution: Slackware
Posts: 3,348
Rep: 
|
Quote:
Originally Posted by pan64
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.
|
|
|
02-16-2023, 01:07 PM
|
#13
|
Member
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 92
Original Poster
Rep:
|
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.
|
|
|
02-16-2023, 04:00 PM
|
#14
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,991
|
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.
|
|
|
02-17-2023, 08:13 AM
|
#15
|
Member
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 92
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 04:48 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|