Some of these values are critical that we pay close attention to, because they could give us “clues” that the disk is going to fail very soon: When we do a SMART test, a large number of attributes of our hard drive or SSD will appear. We recommend reading the man pages of smartctl where you will find all the commands that we are going to be able to execute to use the possibilities of SMART, however, the main commands are the ones that we have explained to you. Once we have performed the short or long test, we can execute the following command to see all the results: To perform a long test we execute the following: To perform a short test we execute the following: To see all the SMART attributes of the manufacturer of the disk in question, we can execute the following command: In the event that the disk supports SMART but is not activated, we can activate it by executing the following command: Once we know the two types of tests that we can use, the first thing we need to know is if the hard drive or SSD has SMART enabled: Read: How much strength does Boa Hancock really have in One Piece? It is recommended to do this test at a time when there is hardly any use of the disk, for example, at dawn, because otherwise the reading and writing performance as well as the data access latency will increase considerably. We can schedule this long test with cron to be done monthly, that is, once every month we will perform this test to check the health of the disk. By performing this comprehensive test, it will show us all the warnings or errors it finds on the entire disk. long test: This test can take a long time, depending on the drive and its capacity.It is advisable to do this test at a time when there is little or no use, it is not recommended to do it during working hours, better at dawn. We can schedule this short test through cron to be weekly, in this way, once every week it will perform this analysis and notify us if it has detected any errors. When performing this test, it will show us the most important errors and warnings, without the need to analyze the entire disk in detail. Short test: This test is most commonly used to detect disk problems.Once we know which drive we are going to analyze to check its health through SMART, we must know that there are a total of two different tests that we can perform: Generally in Linux systems we will find the disks in the /dev/sdX path. We have to use this program at the hard disk or SSD level, not at the partition level. These commands will show us a list of the units and also of the partitions. We could also use fdisk to get the list of disks that we have on our server: In order to know where the disks are, we must execute the following command: In order to use this program and check the health of our hard drive, the first thing we must do is know how many hard drives we have, and what is the path to examine those hard drives or SSDs in question. For example, on Debian operating systems with apt it would be as follows:ĭepending on the package manager of your distribution, you will have to use one command or another, the important thing is that this package is available for all Unix-based distributions and also Linux, so you could also install it on FreeBSD without problems. Installation of this program, if it is not installed by default on your Linux distribution, is by using your distribution’s package manager. Of course, this program is completely free. The smartmontools package is responsible for monitoring hard drives and SSD drives, regardless of whether they use SATA, SCSI, SAS or NVME interfaces, it supports any type of data interface. It is capable of registering any type of warning or disk error to the main syslog of the server, it also allows sending these same warnings and errors by email to the administrator so that he can verify that everything is correct. smartd: is a daemon or process that verifies that the hard drives or SSDs in a specific interval have not had any failures.smartctl: It is the command line program that allows us to verify the hard drives and SSD drives on demand, or we can program its operation through the typical cron in the operating system. Sometimes this package is pre-installed in our distribution, and other times we have to install it ourselves. In most Linux based distributions we have a package called smartmontools.
0 Comments
Leave a Reply. |