[Ocfs2-tools-users] Recovering corrupted files

Sunil Mushran Sunil.Mushran at oracle.com
Tue Sep 12 16:58:12 PDT 2006


Remember the path is relative to the device. Remove the "mount location".

Do:
# debugfs.ocfs2 /dev/etherd/e1.0p5
And then do "ls". It will list the root of the device. You can then
use cd to change dir, etc.

Chris Poupart wrote:
> Sunil Mushran wrote:
>> # echo "stat /path/to/file" | debugfs.ocfs2 -n /dev/etherd/e1.0p5
>>
>> Do you see any extent records? If so, then you should be able to dd 
>> the data out.
>>
> Actually, this returns an error, even on files that I know are good 
> (on both mounted and unmounted drives).
>
> In this case, this is the error:
>
> stat: File not found by ocfs2_lookup '/u02/oradata/data/OCRFile'
>> If not, then the search the journals. If you are lucky you could find an
>> older image of the inode which has the extent records.
>>
>> # echo "logdump 0" | debugfs.ocfs2 -n /dev/sdX >log0
>> Do it for all the slots and search for the inode number.
> This looks promising.  I need to sort through the logs now, but there 
> are several entries for files that belong to "oracle", and since there 
> were only 3 files on the partition in question...
>> http://oss.oracle.com/projects/ocfs2/dist/documentation/03-disk_format.pdf 
>>
>> You may find this doc relevant.
>>
> Thanks!  I will have a read through that.
>
> -- Chris
>
> _______________________________________________
> Ocfs2-tools-users mailing list
> Ocfs2-tools-users at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-tools-users



More information about the Ocfs2-tools-users mailing list