Smartmontools/en: Difference between revisions

FuzzyBot (talk | contribs)
Updating to match new version of source page
Tags: Mobile edit Mobile web edit
FuzzyBot (talk | contribs)
Updating to match new version of source page
Line 1: Line 1:
{{DISPLAYTITLE:smartmontools}}
{{DISPLAYTITLE:smartmontools}}
'''smartmontools''' is a package which provides tools for monitoring drives which support the [[wikipedia:Self-Monitoring, Analysis and Reporting Technology|S.M.A.R.T.]] system for monitoring hard drive health.
'''smartmontools''' is a package which provides tools for monitoring drives which support the [[wikipedia:Self-Monitoring, Analysis and Reporting Technology|S.M.A.R.T.]] system for monitoring hard drive health.
It includes the '''smartd''' and '''smartctl''' programs. smartd can be enabled on NixOS systems with the {{Nixos:option|services.smartd}} module.
It includes the '''smartd''' and '''smartctl''' programs. smartd can be enabled on NixOS systems with the {{Nixos:option|services.smartd}} module.
== Locating devices ==
It is important to use persistent methods of identification for disks, as device nodes are arbitrary and subject to change. The following command will print a list of storage devices, as well as partitions contained on them. When configuring smartd, you should use entries that are '''not''' suffixed with "-partX", as they refer to whole disks.
<syntaxhighlight lang="bash">
ls /dev/disk/by-id/
</syntaxhighlight>
== Example ==
== Example ==
{{Template:file:nixos|<nowiki>{
 
{{file|/etc/nixos/configuration.nix|nix|<nowiki>{
   services.smartd = {
   services.smartd = {
     enable = true;
     enable = true;
     devices = [
     devices = [
       {
       {
         device = "/dev/sda"; # FIXME: Change this to your actual disk; use lsblk to find the appropriate value
         device = "/dev/disk/by-id/ata-WDC-XXXXXX-XXXXXX"; # FIXME: Change this to your actual disk
       }
       }
     ];
     ];
Line 16: Line 27:


[[Category:Hardware]]
[[Category:Hardware]]
[[Category:Software]]
[[Category:Applications]]