Jump to content

NEW VIDEO: The EASIEST Way to Stop Gaming

Hard Drive Error


giblets

Recommended Posts

One of my hard drives has an error and I am on the verge of taking it to a hard drive clinic/recovery service as I cannot recall the last time I backed it up (3months ish). Wondering if there is anything else I can try before I do this.

 

It is a SATA 2tb drive that was formatted to ext4. I connect it to my laptop via a dock, and one day it started refusing to mount and reporting a bad superblock error. I think I have a copy of the screenshot saved somewhere which I will try to find. I had a similar error to this a long time ago with a different drive and I knew I could repair it, so I ran testdisk.

 

Testdisk sound the partition and said it could repair it, so I selected it to restore, and rebooted. Now it still fails to mount but I don't get the error at all, now when I look at the drive (via gparted) it says the partition is unknown. I am hesitant to try anything else in case I make it unrecoverable.

 

Any tips on what I can try or should I take it straight to a recovery service?

Link to comment
Share on other sites

Since its ext4 format I guess you are still running a Linux system, so I am focusing on giving tips for that - Hint: For Windows you could basically use "CrystalDiskInfo", but it cant read the ext4 partition afaik.

Install smartmontools via:

sudo apt-get install smartmontools

And afterwards execute:
 

sudo smartctl -a /dev/sda > smart-results.txt

Post the content of the smart-results.txt here.

But my guess is: Its dead. At least for us humans, the magicians at a hard drive recovery center CAN restore/repair it most of the time.

From reading that gparted shows Unknown partition it seems inaccessible. I mean you could try via command line to mount it, but that wouldnt make much difference.

Basically:

 

sudo mkdir -p /mnt/ext_drive (Make folder)
sudo mount /dev/sdX /mnt/ext_drive (Mount the drive to created folder, where sdX, X = letter of that drive, lsblk should show that)
ls -lah /mnt/ext_drive (list content of that mounted folder)

If its still empty I guess you should send it to a repair center.

Also: Make frequent backups, create a small script which executes via cronjob on a dialy/weekly/whatever basis. If you cant do that I can help you with that, I just would need folder paths and such, but we can talk about that if you have your (working) drive back :)

  • Like 1
Link to comment
Share on other sites

I am running Ubuntu 16.04 LTS.

I have attached the smart-results.txt file to this post.

I was actually in the process of backing up this drive when it failed, which is disappointing! I'm not super upset that it might fail, but my other backup I think is about 3-4 months old as I didn't do it over the holiday break so I will lose some files at least, which if I could avoid that would be awesome.

The only thought about the cron job is that I don't always connect this drive, I try to only connect it when I need it to extend its life, so I would assume the cronjob would fail more often than not.

While you look at the smart-results file I will google what hard drive recovery services are nearby.

smart-results.txt

Link to comment
Share on other sites

Yeah, we have:

- Reallocated_Sector_Ct
- Spin_Up_Time
- Raw_Read_Error_Rate

Pre-Failing.

If Reallocated_Sector_Ct has errors the HDD is most likely done or will be very soon, you also should be able to hear some "clicking" sound soon, if not already. I wouldnt try to connect that thing.

For the cronjob: Yeah, could also write a script, put it into your /home folder and execute when needed or could go crazy and write something like "if drive with UUID connects then execute script and echo a message".

Link to comment
Share on other sites

Ok thanks @stablish.

 

I submitted a few quote requests to several data recovering companies, and they're all quoting around $250. I think that is worth it for what could possibly be up to 3 months of files. I will have to get a second drive for them to copy them onto first - the only other drive I have is the backup drive, so it will be a few weeks before I get this fixed.

 

The silver lining in the cloud here is it has encouraged me to replace my drives! They're the same age so they all will likely have these issues soon. I think they are roughly 5-6 years old each. I'll try to work out a reminder in 4 years to swap them out to save me $250 :3_grin:

 

If I can write the script to be executed whenever I need it, that would be super helpful. I manually run dd to backup my laptop and then drag and drop the files for the drive which has had permission errors a few times. If there was a script I could execute instead that would be awesome! This is the part of Linux I really like, how you can automate so much stuff, I just haven't got my hands dirty with it yet.

Link to comment
Share on other sites

Yes, shell scripting is awesome!
And since I use Windows as my main OS I also adapted a few scripts to Windows, so basically some backup scripts as batch which will backup pre-defined files and folders to another drive, I know on Windows you could use something like FreeFileSync, but why install a Program when you can write a script :D

dd is fine if you want to copy the whole drive, but sometimes you have super-duper-important files on a HDD which you definitely need to backup and therefore dd would take ages (depends on size) and lets say you have /dev/sdb2/important_files and only need these to backup on a daily basis and the whole /dev/sdb2 on a weekly basis, no problem with shell.

If you are low on space, you could also upload a encrypted container (for example with VeraCrypt) to a Cloud or get a Storage VPS (Virtual Private Server) and install your own Cloud, have a spare PC at you and dont know what to do with it? Install OpenMediaVault - Many possible ways.

Yeah permissions sometimes are a pain in the ass on Linux, but we can talk about all this when you have your working drive back, you can also PM me on Discord (stablish#4706) about the script and stuff.

Link to comment
Share on other sites

Excellent, thanks @stablish, I will definitely take you up on that. I have 4 drives that I basically clone once a month to an identical set of 4 drives, via either dd (a few times I haven't got this to work though) or copy and paste the entire drive. I used to have server/NAS running for all my files but found I barely used it and didn't want to have it using so much power or my drives spinning all the time and ultimately failing... and here we are!

I have ordered some new drives so I'll let you know when they arrive!

  • Like 1
Link to comment
Share on other sites

@stablish, what do you think of Deja Dup?

The podcast I was listening to today (Going Linux) mentioned it as an easy tool. A quick search found this link.

My distro doesn't have it for some reason (even though it's ubuntu) so after your advice before I install it on my machine.

I assume I'll still need to make an image of my install that I could restore if need be.

Similarly, I was listening to Security Now and one of the hosts is the writer of SpinRite. Is it worth giving that program a try with my hard drive before handing it over to a specialist? Still waiting for my drives to appear.

Link to comment
Share on other sites

Never used Deja Dup, and to be honest, never heard of it.

I either used the no-brainer "dd" or a bit more advanced clonezilla.

But that was years back, so I dont know whats the "go-to" tool nowadays, since I am on Windows mainly and I use VMware for Linux' with the snapshot feature from VMware.

On servers I only need to backup databases, configs or site directories, such as /var/www for example and for this I wrote some backup scripts.

I remember a tool from the Defensive Security podcast (Cant remember the episode), its called Backblaze. Wanted to look into it back then, but never did.. I guess because of "Cloud".

Another tip: The Arch Wiki. Most of these apply to other distros aswell, for example https://wiki.archlinux.org/index.php/disk_cloning.

I'd say, install Virtualbox, do a basic Ubuntu install within it and try different tools and see how they perform, especially on restoring.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...