LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-08-2021, 07:34 AM   #1
TechnoJunky
Member
 
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 92

Rep: Reputation: 1
dying hard drive?


I have 2 hard drives in my system. 1 for OS and the second for home. It seems that I'm having some issues with the home hard drive. It crashed overnight and when I came to the comp, I had to reboot. On reboot it failed to complete and put me in emergency mode. I looked at the logs and saw that it seemed to be due to not being able to mount /home. I rem'd out /home in fstab and was able to boot up fine. I loaded KDE Partition Manager and checked out the SMART status and it says the status is good, but has 654 bad sectors. So is there anything I can do to save the disk or is it basically just trash now? I'm able to access the data on it, it seems, so I'm not too concerned at this point about losing info, but I'd like to keep the disk if there's some way to do some sort of repair to it.

And, if the answer is it's trash, what's the best way to clone the data from this disk to a new one? I use DD for burning images to USB drives but wonder if this would be cloning data I don't want onto the new drive, like data from the bad sectors.

Last edited by TechnoJunky; 05-08-2021 at 07:40 AM.
 
Old 05-08-2021, 07:47 AM   #2
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
Massive cloning from possibly damaged hard drive is very risky. Drive may die as well during cloning. My advice is to make backup copies of most important data. System in time can be restored to its present state on new drive. I would try to backup data in relatively small portions. Buy and install new drive, reinstall system and in time restore all missing applications. At the beginning some functionality will be missing.
 
1 members found this post helpful.
Old 05-08-2021, 07:50 AM   #3
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,828

Rep: Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243
With 654 bad sectors the drive is trash. SMART will not declare a drive "failing" until it has almost exhausted its suply of spare sectors, and that is long beyond the point that the drive should have been replaced.

If the drive has data that you need to recover, use ddrescue to copy as much as can be recovered to a new drive, then see if testdisk can recover files from that copy. I suggest not using fsck to try to "fix" the recovered filesystem, at least not as a first effort. That repair can sometimes cause loss of data that would otherwise be recoverable.
 
1 members found this post helpful.
Old 05-08-2021, 08:01 AM   #4
TechnoJunky
Member
 
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 92

Original Poster
Rep: Reputation: 1
I figured what you guys said would be said, just hoped for something else . None of the data is irreplaceable, just didn't want to have to go and redownload hundreds of gigs of games and videos and stuff. Thanks for the tips.
 
Old 05-08-2021, 11:14 AM   #5
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
Using ddrescue has almost the same failings as using dd with a failing drive.

If the drive can be mounted then simply copy off all the data needed as that does not require reading the entire drive as dd and ddrescue do. Copying the data only requires reading the data, not the whole drive.

I would unplug that drive until I had a replacement in hand, then plug it in, mount it, and do a one time copy of all readable files. Reading once and only those sectors that contain data has the least chance of further damage.

Copying could be as simple as using "rsync -av source-filesystem destination-filesystem" and would copy all the data while retaining permissions. It would clone the data like you asked about.

The only step required before doing the copy would be partitioning and formatting the file system on the new drive, as well as mounting it.

Last edited by computersavvy; 05-08-2021 at 11:15 AM.
 
  


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
My hard drive is dying... what to do? terence8888 Linux - Software 6 11-23-2006 03:58 PM
Is this hard drive dying? newmoon Linux - Hardware 5 11-14-2005 02:46 PM
Hard drive dying. Need to move Linux partition over. Fear58 Linux - General 3 01-29-2005 05:14 PM
Hard drive dying, good backup method cadj Linux - Software 3 12-14-2004 07:28 PM
URGENT: Hard drive is dying, need migration AngryLlama Linux - General 12 11-27-2004 10:31 AM

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

All times are GMT -5. The time now is 03:53 PM.

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