What smartctl command to use to verify if disk is okay or failing ?

Polytropon freebsd at edvax.de
Sun Jan 6 23:27:18 UTC 2019


On Mon, 07 Jan 2019 04:37:29 +0530, Manish Jain wrote:
> Yesterday I saw an AHCI/CAM error on my SATA SSD on the console, and I
> am a bit worried whether the disk (ada0) is failing.

AHCI/CAM could also indicate a problem with the controller
the disk is attached to.



> I installed smartmontools and enabled smartd in rc.conf. But I am
> unable to figure out the command to utilise for reliably testing the
> state of /dev/ada0 (Samsung EVO 850; SMART enabled).
> 
> If anyone could tell me the right command to go through a good test
> (preferably with a log file generated), it would be much appreciated.

You can initiate such a test with the smartctl command. There
are many examples in the EXAMPLES section of "man smartctl".

For example, to read current information, use:

	# smartctl -a /dev/ada0

To start a unit self-test ("long test"), use:

	# smartctl -t long /dev/ada0

There are various other kinds of tests smartctl can inititate.

It's also possible to automate such tasks for the continuous
surveillance of a drive; see "man smartd" for details.

On Linux, there's also a GUI tool for interacting with smartctl,
it's called GSmartCtl, if I remember correctly. Maybe this tool
is also available in FreeBSD ports?


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list