LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-05-2007, 08:25 PM   #1
quikphysik
LQ Newbie
 
Registered: Jan 2007
Posts: 8

Rep: Reputation: 0
force copy through read errors


Hi Gang,

I've a hardware RAID5 that is pretty sick. I've gotten it up and mounted again, and I'm attempting to make a backup before proceeding with further fixing. The problem is clearly some of the data are corrupted. An example: in my home directory, a subdirectory "sequences" is listed in the tree. However, cd sequences, vi sequences, cat sequences, less sequences (you name it) gives "no such file or directory"

Is there a switch to cp (or some similar program) that will allow me to copy through read errors? I'm aware of the usefulness of the noerror option to dd in this regard, but I'm backing up on a volume of a different size than the RAID and I'm not sure how to handle that situation without having detailed knowledge of the usage pattern of the RAID itself.

Any insights would be greatly appreciated.

Thanks

Dave Morgan
Biochemistry Department
UTSW Medical Center at Dallas
david.morgan@utsouthwestern.edu
 
Old 01-06-2007, 05:37 AM   #2
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
The "find" command might be what you want.

To get an idea of what the find command does, log in as root and then do this command:

find /

(Instead of /, use the mount point for your problematic RAID setup.)

I'm hoping that it continues all the way to the end for you. If it doesn't, my answer won't help you at all. If it does, you can use the find command in one of two ways.

The more straightforward way is to use the -exec option of the find command. Be sure to place

\;

as a separate item at the end of the -exec option. The backslash is necessary so that the shell will pass the ; to the find command, instead of interpreting the ; itself.

The trick is to create an -exec option to the find command that does the copying of each file or directory properly.

But if the -exec option doesn't give you what you need, try this:

find / > somefilename

Then use Perl or something to read that output file and create a (very long) shell script which does exactly what you want.

Hope this helps.
 
  


Reply

Tags
error, read



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Read-Only Filesysystem errors kyletriggs Linux - General 4 03-04-2006 02:11 AM
copy from cd-rom just read-only Boby Linux - Software 1 09-07-2005 07:04 PM
cdparanoia and --force-read-speed drisay Linux - Software 1 12-19-2004 08:58 AM
k3b cd copy, can't read multiple track datas, if it's normal ailinzhe Linux - Software 2 12-01-2004 03:51 PM
Force to copy files ust Linux - Software 2 03-08-2004 08:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:53 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