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!


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.

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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