LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-26-2006, 09:42 AM   #1
Wocky
Member
 
Registered: Oct 2004
Location: Australia
Posts: 37

Rep: Reputation: 3
Recovering lost files?


(I'm not sure whether this should be here, in the Linux general forum, or one of the software forums, but this seems closest to what I want.) I had a disk (200GB Seagate with a single ext3 partition on it) fail. I don't know why it failed, but I don't think it was a hardware problem. I ran fsck on it; it found a lot of orphan files and dirs (about 9000 total, 6800 dirs.) I'm working my way through these to find out what they were and where to put them. I have established that a number of files and directories have been lost. I'm copying files and data to a new HDD, so any data on the old disk won't be lost (in theory.)

I've run debugfs to try to find the missing data; the names of the objects are in the appropriate place in the appropriate directory, but the inode reference is 0. (A sub-question: between the inode and the filename is a number in parenthesis. What is this number? eg:
11338089 (28) picture.jpg
^inode.......^??? ^filename
It doesn't seem to correspond to anything I can find. stat <11338089> doesn't mention it at all.)

Does anyone know of a way I can recover the inodes of the missing files and dirs? I suspect that some of it is irrecoverable, because I now have a lot of block and character devices and pipes with random numbers for owner and group, Jan. 1 1970 creation/modification dates, and random permissions, which implies that the filetype marker in the inode has been changed. I would like to try to recover this stuff, though (or at least as much as I can.)

I'm running kernel version 2.4.20 with xfs patches; it was originally a redhat 7.2 system, but I've changed almost everything. It's on a dual-processor 500MHz celeron box.

Thanks in advance
Wocky
 
Old 11-26-2006, 04:46 PM   #2
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
Have you looked into [url=http://foremost.sourceforge.net/]foremost[/url}. It may be helpful in recovering your files. Good luck with it
 
Old 01-02-2007, 01:45 PM   #3
Wocky
Member
 
Registered: Oct 2004
Location: Australia
Posts: 37

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by J.W.
Have you looked into [url=http://foremost.sourceforge.net/]foremost[/url}. It may be helpful in recovering your files. Good luck with it
Thanks, J.W. I was able to recover some files (including some I didn't know I had, oddly enough) but some seem to have gone forever.

Quote:
Originally Posted by Wocky
... between the inode and the filename is a number in parenthesis. What is this number? eg:
11338089 (28) picture.jpg
^inode.......^??? ^filename
It doesn't seem to correspond to anything I can find. stat <11338089> doesn't mention it at all.)
...
If anyone else is interested, I went through the source for debugfs to find out what this number is. It appears to be the length of this directory entry: dirent->rec_len. In any directory, the number is about 16-32 for all but the last entry, which is always large, often several hundred.
 
  


Reply



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
recovering lost data???? tnelson42345 Linux - Software 3 08-25-2006 11:27 AM
Recovering lost code/program The MCP Programming 3 03-09-2006 03:26 AM
Recovering Lost Data lawrencegoodman Linux - General 1 04-04-2004 12:57 PM
Recovering Lost Files gonus Linux - Software 1 08-08-2003 02:14 PM
Recovering Lost Admin. Password Mr Neroazzurri Linux - Security 4 03-14-2003 05:26 PM

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

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