Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

It's strange but after filesystem damage some folders/directories are now shown as files instead of directories ?

I would be very grateful if someone was able to help me to correct the filesystem and/or try to find where the files are, now ?

Thanks a lot in advance for your help !

share|improve this question

1 Answer 1

You fsck the thing, and then restore from backup if that doesn't fix things. You could use debugfs to modify the filesystem to make things directories again, but quite honestly you'll spend far longer hunting down every problem and fixing it (and how will you get an exhaustive list of everything that's actually broken?) than you will just restoring from backup. That's assuming that the damage is limited to flipping mode bits; if there's actual file corruption, all bets are off.

share|improve this answer
    
In fact I restored everything from backups to a new server, but backups were one day old. The two folder that now look like files are the two database (mysql & postgresql) folder and I would be happy to find out what was inside just in case, but if I understand correctly, you think that the chances to find something useful are low ? –  db_ch Aug 29 '11 at 21:22
    
It depends on the exact nature of the corruption, but mode bits don't normally get flipped without something else going on. –  womble Aug 30 '11 at 5:46

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.