Solved

Copy of corrupted home directory hdd

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

This article is an update and follow-up of my previous article:   Storage 101: common concepts in the IT enterprise storage This time, I expand on more frequently used storage concepts.
If you ever consider purchasing any Daossoft Software Products, DON'T expect any meaningful support - This article should convince you why!
In this Micro Tutorial viewers will learn how to restore their server from Bare Metal Backup image created with Windows Server Backup feature. As an example Windows 2012R2 is used.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

829 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