Technical Tip: 'File System Check Recommended!' Monitoring
When a FortiGate with a hard disk is not gracefully shutdown/rebooted (power outage for example), a message stating 'File System Check Recommended!' will appear when connecting to CLI or GUI.
It can be useful to monitor this message for multiple reasons.
This can be done using the following methods:
- FortiGate CLI output of command ' fnsysctl ls -l /etc/reboot_safe.chk' . If the file exists then a file system check is recommended.
- FortiGate API call ' https:///api/v2/monitor/web-ui/state/?access_token='. Check for 'need_fs_check' field, values can be 'true' (File System Check Recommended) or 'false' (No File System Check Recommended).
- FortiManager CLI output of command ' diag fwmanager show-dev-disk-check-status ' .
- Starting FortiGate version 6.2, auto file system check is supported though not default enabled. For more details, follow this document: Run a File System Check Automatically.