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

If a computer crashes then the filesystem is an inconsistent state. What exactly is fsck(8) doing to restore to a usable filesystem? Is there a backup table? Is it cross-checking metadata?

According to the man page it is able to fix:

 Unreferenced inodes
 Link counts in inodes too large
 Missing blocks in the free map
 Blocks in the free map also in files
 Counts in the super-block wrong

but how can this happen?

share|improve this question
    
lwn.net/Articles/248180 –  Iain May 20 at 5:57

1 Answer 1

Unix stores file metadata in data files called directories,and it contains filename, owner,creation date etc.

And Unix file system uses a basic storage called inodes.Note that creating a new file actually changing the state of an inodes from free to allocated, writing metadata to a directory file,and writing data to the new file.

while file system corrupted,fsck check consists of reading all the inodes and attempting to resolve as many corruption issues as possible.

share|improve this answer

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.