LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-06-2007, 09:20 PM   #1
quikphysik
LQ Newbie
 
Registered: Jan 2007
Posts: 8

Rep: Reputation: 0
raid corrupted files copy


Hi gang, I'm looking for a way to copy files off of a RAID5 that got sick and corrupted a bunch of files. Here's what I've tried so far:

(1) cp -r /raiddir /destdir

basically this works for a while, then hangs. I'm not sure, why, but my guess is there is a read error somewhere in the copying operation, and it just stops. So, can I copy and suppress the consequences of read errors at the same time?

(2) tar --ignore-failed-read /raiddir /destdir

basically, the same result as above. Eventually the tar process just hangs.

(3) find /raiddir -exec cp {} /destdir \;

This actually works, but it strips the path information from the copied file. Anyone know a work around?

(4) dd conv=noerror if=/dev/raiddevice of=/dev/destdevice

Here I've noticed two issues. (a) the partition table from the raid device gets written to the destination device, and the destination device gets all confused about its size and (b) sooner or later dd encounters faulty data and hangs.
'
(5) fsck -p /dev/raiddevice

Sooner or later there is an unanticipated error and I'm asked to run fsck manually. If I were a hardware guru I might know what to do next, but I'm baffled.

Any wisdom from the community will be much appreciated. I've a research group here crossing their fingers that I can recover their data...

Thanks,

Dave
 
Old 01-06-2007, 10:13 PM   #2
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
How about this? Step one:

find /raiddir > /tmp/x1

You'll now have the names of all the files to be copied.

Then write a Perl script to input that and produce individual cp commands. If you want, you can put stuff in the script to do special handling for things like directories and symbolic links.
 
Old 01-08-2007, 12:57 PM   #3
quikphysik
LQ Newbie
 
Registered: Jan 2007
Posts: 8

Original Poster
Rep: Reputation: 0
reply to find suggestion

Yeah... I tried that. Let me get a bit more technical. All of the drives in the computer are built from a hardware RAID 5 of ~700 GB. That hardware RAID has then been partitioned in a fairly typical unix manner - into /home, /usr, /tmp, etc, and, of course, /raid, which is our storage area and is the largest partition.

Now, the catch here, is that the entire RAID has been corrupted, not just the /raid directory. In fact, the operating system itself will not come up. So, I'm running of the installation CDs in "linux rescue" mode. There is no readily accessible perl executable, and I'm not real savvy with csh or bash scripting.

Leaving my scripting issues aside, if I take your suggestion, will this preserve the entire path?
 
Old 01-09-2007, 09:02 AM   #4
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
I'm not sure what you mean by "preserve the entire path", but it will show the full path of each source file name. For example,

find /raiddir

will output

/raiddir/a
/raiddir/a/alpha
/raiddir/a/beta
/raiddir/b

and so forth.

When you say "no readily accessible perl executable", what does "readily accessible" mean? Is it that you know for sure that Perl is not on the rescue disk?
 
Old 01-11-2007, 02:55 PM   #5
quikphysik
LQ Newbie
 
Registered: Jan 2007
Posts: 8

Original Poster
Rep: Reputation: 0
There is no perl executable on the rescue disk. However, I'll take care of that by burning a better rescue disk... like knoppix or something. Thanks for your input. BTW, if you have a suggestion for your favorite rescue disk...

Thanks

...dave
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Source files corrupted? Badut Linux From Scratch 7 05-12-2006 10:07 PM
package index files corrupted lil_becky Debian 1 02-16-2005 05:03 PM
Corrupted Files??? rm6990 Yoper 2 09-19-2004 02:29 AM
Corrupted Library Files Star Child Linux - General 1 04-07-2004 02:13 PM
HELP!!! Corrupted files!!! broxys Linux - General 7 08-18-2003 08:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration