Running a file system check automatically
There is an option in FortiOS to enable automatic file system checks if the FortiGate shuts down ungracefully.
By default, the automatic file system check is disabled. When an administrator logs in after an ungraceful shutdown, a warning message appears advising them to manually run a file system check.
WARNING: File System Check Recommended! Unsafe reboot may have caused inconsistency in disk drive. It is strongly recommended that you check file system consistency before proceeding. Please run 'execute disk scan 17' Note: The device will reboot and scan during startup. This may take up to an hour
Enabling automatic file system checks
You can enable automatic file system checks in both the GUI and CLI.
To enable automatic file system checks in the GUI:
- Go to System > Settings.
- In the Start Up Settings section, enable Auto file system check.
- Click Apply.
To enable automatic file system checks using the CLI:
config system global set autorun-log-fsck enable end