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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-06-2007, 09:20 PM
|
#1
|
LQ Newbie
Registered: Jan 2007
Posts: 8
Rep:
|
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
|
|
|
01-06-2007, 10:13 PM
|
#2
|
Member
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938
Rep:
|
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.
|
|
|
01-08-2007, 12:57 PM
|
#3
|
LQ Newbie
Registered: Jan 2007
Posts: 8
Original Poster
Rep:
|
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?
|
|
|
01-09-2007, 09:02 AM
|
#4
|
Member
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938
Rep:
|
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?
|
|
|
01-11-2007, 02:55 PM
|
#5
|
LQ Newbie
Registered: Jan 2007
Posts: 8
Original Poster
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 12:44 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|