How does the operating system (Linux) while rebooting checks whether abnormal termination happened during last shutdown and then does the file system consistent checks etc if required ?
1 Answer
Filesystems write a mark before mounting a volume read-write and reset this mark after successfully closing all write operations and unmounting (or mounting read-only). See https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout#The_Super_Block
-
what other checks are performed while the system reboots after abnormal termination ?– SanketCommented Mar 11, 2013 at 6:40
-
1@Sanket File system check is about it. If you need to check something else (application-level data consistency) you have to explicitly put it into the start-up scripts.– peterphCommented Mar 11, 2013 at 9:07
-
Similar to the journal run of a FS is (or may be in a good configuration) the sync run of a RAID. That is even before the FS is seen, of course. In contrast to a file system check or journal run the RAID sync doe not block the system, though (unless you prefer it) because this can be done in the background. Commented Mar 11, 2013 at 13:16