Backtrack:  
 
by lunarg on August 29th 2019, at 11:29

There's an easy method for extracting hard disk S.M.A.R.T. testing logs using the CLI. This is useful if you require support on Synology and need an easier method to get the data (other than creating screenshots from your web-browser), and if more detailed data is needed.

Before getting the logs from the CLI, first run an extended SMART analysis from the DSM. This will take a while (usually several hours). Running the analysis on multiple disks is possible and can be done concurrently, but it needs to be initiated manually for each disk.

Once tests have completed, log onto the CLI (using your favourite SSH client, such as PuTTY) using the "admin" or "root" account.

As Synology is in fact a linux-based system, physical drives are identified as /dev/sdX, where X signifies the physical drive according to its bay: /dev/sda being the first, /dev/sdb the second, and so on.

To get to the analysis report, you need to run the command-line tool smartctl, which is the linux-based implementation for S.M.A.R.T. analysis and reporting. The command requires some parameters to work properly on the Synology platform. In essence, it is this:

sudo smartctl -a -d sat -T permissive /dev/sda

The command above will dump the report to the CLI. In the example, we reference the first disk (/dev/sda), so adjust the device node as necessary to get reports for other disks. Note that if you use the "admin", you need to use sudo (as indicated in the example). If you logged in as "root", sudo is not required.

You can also use standard redirection to dump the output to a file: sudo smartctl -a -d sat -T permissive /dev/sda > /tmp/sda.log. You can then copy the log as a file (using SCP, for instance).

 
 
« May 2024»
SunMonTueWedThuFriSat
   1234
567891011
12131415161718
19202122232425
262728293031
 
Links
 
Quote
« I needed a password with eight characters so I picked Snow White and the Seven Dwarves. »