Using the smartmontools tool, it is possible to periodically check the disk status by querying the SATA or SCSI controller and asking them to perform a low-level audit.
Build information
Ensure the following options:
1 | |
Disk status
The installation and configuration is as follows to check the
/dev/ada0 hard drive with a short test around 2AM every day and a long
test every Saturday around 4AM.
1 | |
1 | |
The command smartctl can be used to get a result “immediately”:
| Option | Description |
|---|---|
| -t short | performs a short test (about a few minutes) |
| -t long | performs a long test (about an hour) |
| -a | displays all information, including the outcome or the status of current tests |
| -X | abort the test |
According to the firmware on the hard drives, making a request to monitor the progress of the test can stop it. It is however possible to check beforehand the behaviour of the disk when using the command:
1 | |
and check the following capabilities:
| Message | Test aborted |
|---|---|
| Abort Offline collection upon new command | Yes |
| Suspend Offline collection upon new command | No |