Solved

Copy of corrupted home directory hdd

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

Accepted Solution

by:
noci earned 125 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Many thanks for your comments.
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Suggested Solutions

How to fix error ""Failed to validate the vCentre certificate. Either install or verify the certificate by using the vSphere Data Protection Configuration utility" when you are trying to connect to VDP instance from Vcenter.
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.
This tutorial will walk an individual through the process of installing of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

728 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now