Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

Your Answer


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.