File System Consistency
Lots of effort goes into these disks, that are, after all, just large data structures.
In most operating systems, the file system on the disk can be in inconsistent state as a result of a power failure or system crash.
Many time, this can be resolved (maybe for a price).
FSCK procedure in Unix:
- Compare Blocks in files and in the free list. Every block has to be accounted for exactly once. If not:
- Does not appear even once - link to free list.
- Appears in the free list and in a file - extract from free list.
- Appears more than once in files - very bad - replace one of them with a copy and notify.