Solved

Copy of corrupted home directory hdd

Posted on 2011-09-07
4
495 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
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

VM backups can be lost due to a number of reasons: accidental backup deletion, backup file corruption, disk failure, lost or stolen hardware, malicious attack, or due to some other undesired and unpredicted event. Thus, having more than one copy of …
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.
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
This tutorial will walk an individual through the process of configuring basic necessities in order to use the 2010 version of Data Protection Manager. These include storage, agents, and protection jobs. Launch Data Protection Manager from the deskt…

776 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