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.
|
 |
05-08-2021, 07:34 AM
|
#1
|
Member
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 92
Rep:
|
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.
|
|
|
05-08-2021, 07:47 AM
|
#2
|
Senior Member
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
|
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.
|
05-08-2021, 07:50 AM
|
#3
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,828
|
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.
|
05-08-2021, 08:01 AM
|
#4
|
Member
Registered: Aug 2007
Location: Illinois (NW Chicago burbs)
Distribution: Fedora
Posts: 92
Original Poster
Rep:
|
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.
|
|
|
05-08-2021, 11:14 AM
|
#5
|
Senior Member
Registered: Aug 2016
Posts: 3,345
|
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.
|
|
|
All times are GMT -5. The time now is 03:53 PM.
|
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
|
|