Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm working with a large (8TB) EXT4 filesystem in linux. After a power outage, the filesystem wouldn't mount. fsck is taking weeks to complete, but i ran testdisk and i'm able to see my partition and the files and directories of the root. the problem is the directory that contains most of the data on the disk is in a certain folder that when listed in testdisk lists as a directory. The "D" at the beginning of the file permissions is not set. Is there any way to fix this or browse to the directory? Can i search for the directories that sit below this unusable directory? thanks for your help!

share|improve this question
add comment

1 Answer

Try running debugfs on the filesystem. Navigate to the parent directory, then use stat to view the inode content and modify_inode to modify it.

Note that this may or may not help — if the mode bit has changed, there's a chance that other bytes in the inode are corrupt, including the location of the directory data.

Otherwise, fsck may (or may not, recovery is always highly chancy) find the lost directory data and file it under /lost+found.

share|improve this answer
    
Thanks for this information. I get the concept of using debugfs and mi, but i guess i'm at a loss on what i'm modifying and how. In the tutorials, i didn't see anything specific on a directory flag. –  acidd22 Jul 22 '12 at 15:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.