Checking Filesystems
The Linux ext2 filesystem is fairly robust. However, if you try hard enough, you can corrupt it. The easiest way to do this is to simply turn the system off without performing a proper shutdown. (Kicking the plug out of the wall accomplishes the same goal if you don't have a UPS.)
Why is this bad? Because Linux, like most UNIX systems, maintains information about files it has accessed in memory (buffers). When these buffers change, they aren't immediately written to disk. These changed buffers are said to be dirty. The system occasionally flushes the buffers to the disk to bring the memory and disk into sync, which is called syncing the disk. You can do this manually by typing sync. Custom dictates doing this several (usually ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access