Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Recovering data/drivers/config from dying HDD with a CentOS installation using ddrescue
Post Body

(This is a crosspost from the CentOS forums)

I work in a lab with a microscope whose workstation computer runs CentOS 5.10 in order to run the acquisition software (Softworx). We do not have a service contract because we have an older setup and they want us to purchase a whole new one so that it can be serviceable. This means that whenever we run into trouble, they refuse to give us any help whatsoever and I have learned a lot of linux in the process of fixing the various problems we've had.

Anyway, a few days ago the system could no longer boot and was indicating filesystem corruption, asking me to run fsck manually. This is where you cringe, because I did just that, on the original drive, and of course it made the problem worse. I later found out that you should never fsck the original drive, and should instead image the drive and work on the image. FWIW, the fsck process ended up marking a bunch of bad sectors and shoveling some files into /lost found. It is still not bootable though and although our actual image data is backed up, the OS is not and we will have to pay to purchase a whole new workstation computer to recover it unless I can somehow rebuild it myself. They will not even give us a driver disk so I will have to pull any drivers I can from the dying drive. At least Softworx is available for download.

I am now trying to image the drive. My strategy is booting up a CentOS 6.5 Live USB, installing ddrescue, and trying to rescue the main / partition of the dying drive to a disk image on an external USB drive. This should contain any drivers, configuration, and data (not my main concern as I said). I will then install a fresh HDD, install CentOS 5.10, copy over any drivers and config files I can, install Softworx, and hopefully have a working system. Do you think this is likely to work? I have run the following commands, as root, with the source drive unmounted, and the live USB booted with write access:

  • First run: ddrescue -n -N -v <source> <destination.img> <logfile>

This ran for ~9 hours and the system was frozen when I came back to it, the target HDD was not being accessed. It seemed to have rescued about 150 GB of the maximum ~490 GB (that's the size of the partition, actual data is probably around 340 GB) before stopping. I mounted the image and saw that there were a couple of accessible folders, 5-6 present but inaccessible folders, and a whole lot of stuff that should have been there but wasn't.

  • Second run: ddrescue -v <source> <destination.img> <logfile>

This ran for a total of 1m30s before the whole system froze, did not respond to any X or shutdown commands. I waited until the external HDD's access light turned off and I hard-rebooted.

  • Third run: ddrescue -R -r 1 -f -vv <source> <destination.img> <logfile>

This ran for 2h, the system was frozen when I came back but the target HDD was not being accessed, so I rebooted. It looks like a couple of those "dead" folders are now accessible, great! Most folders are still missing. I then ran the same command again, which froze after 30 mins, and now I am running the same command without the -R option, it has been going strong for about 20 min.

There is one other possible saving grace: There is a neighboring lab which has an almost identical microscope, running the same version of CentOS and Softworx. My other plan was to go to their computer and copy over crucial folders that likely contain drivers and config files, and use those to rebuild on a fresh CentOS installation. Can you suggest which folders I should go into, other than the ones obviously named Softworx or similarly? e.g. is /etc/ a good folder to grab? Would it be safe to just wholesale-copy over the whole folder onto mine without replacing existing files? Then, for config files, to just go through them one by one and see whether they make sense for my system?

I know I'm not posting any logfiles here but I'm not really asking anything specific, more so whether this strategy overall is likely to work, or whether I should give up while I'm ahead and just fork over the money for a new computer?

Edit: One more question - although Softworx is "supposed" to run on CentOS 5.10, what are the odds that I could get away with running it on CentOS 6.5? It's just that now I've tried it out on the live USB, it is SO much smoother than 5.10. Again, I'm not going to get any information from the microscope manufacturer on this, they just want to sell me another computer for $5k, so I'm just wondering whether there is some fundamental difference between the two versions that could preclude the software/driverset from functioning properly.

UPDATE: I have had decent success. For the procedure I followed, check out my CentOS forum thread.

Author
Account Strength
100%
Account Age
13 years
Verified Email
Yes
Verified Flair
No
Total Karma
17,996
Link Karma
2,189
Comment Karma
15,807
Profile updated: 6 days ago
Posts updated: 9 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
10 years ago