Solved

Copy of corrupted home directory hdd

Posted on 2011-09-07
4
503 Views
Last Modified: 2012-05-12
Hi *,

In my box I have a separate hdd for /home however it is corrupted and I think it is failing. I have been running fsck on it for about a week now, and slowly there are fewer and fewer problems. I have another drive I am wanting to copy the data onto and use as my new /home partition. I just wanted to check whether my logic below is sound?

1. Rescue data from original /home to new hdd with ddrescue.
2. Change the UUID to the new partition in my fstab file (I previously used https://help.ubuntu.com/community/Partitioning/Home/Moving to setup up my current box).

Cheers,
James
0
Comment
Question by:James_h1023
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 40

Accepted Solution

by:
noci earned 125 total points
ID: 36496612
the logic is sound, for a failing drive.... except for one thing.
After ddrescue you are still left with a copy of a destructed file system.
If the filesystem

The first question is the filesystem corrept of the drive failing:
smartctl might answer here if the drive is smart enabled. You can then ask for the recent failure history of the disk & it's health state.
If the drive is healthy after initiating some testing using smartctl then you can ignore the ddrescue.

The filesystem[layers] still need to be cleaned & fixed.
fsck can be of help for ext2/3/4; xfs; reiser etc.

If LVM structures are damaged you have a different can of worms.
pvck -v -v
vgck -v -v can be your friend.

mdadm can help with raid sets. etc.
0
 
LVL 12

Assisted Solution

by:coredatarecovery
coredatarecovery earned 125 total points
ID: 36496824
You can map the affected sectors (done for you by the failed transfers, Identify where the Inode structure is hit and find the duplicate Inode areas and copy them in using a hex sector editor, It's time consuming but works.

Your last resort is scalpel, a data carving utility, there's a good size community out there for support on this tool and it works well on drives with no structure.

I recommend you image the entire drive, make a file out of the imaged drive so you can try several things without further damage, if you have to use forensic methods such as scalpel, you can do that on the image file.

fsck tends to be fairly destructive on a failing drive and, failing a mount at any time, I recommend using ddrescue to image where you are at that point, then try your fsck once you have a backup of the data secure.

The last drive I had was a 2TB striped array that someone at the university fsck'ed a couple of times and it took me about 2 weeks to map the data areas manually and restore the inodes with structure from the backup areas manually. It was a mess but it's possible.
0
 
LVL 14

Expert Comment

by:shahzoor
ID: 36518649
try cloning the harddive using acronis and in clone options define dont not copy bad sectors or errors
I guess it must work
0
 
LVL 4

Author Closing Comment

by:James_h1023
ID: 36541679
Many thanks for your comments.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Workplace bullying has increased with the use of email and social media. Retain evidence of this with email archiving to protect your employees.
The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
In this Micro Tutorial viewers will learn how to restore single file or folder from Bare Metal backup image of their system. Tutorial shows how to restore files and folders from system backup. Often it is not needed to restore entire system when onl…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question