Smartmontools: Difference between revisions
Appearance
adjust translate tag's placement Tags: Mobile edit Mobile web edit |
mNo edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{DISPLAYTITLE:smartmontools}} | {{DISPLAYTITLE:smartmontools}} | ||
<languages/> | |||
<translate> | <translate> | ||
<!--T:1--> | <!--T:1--> | ||
| Line 7: | Line 8: | ||
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 == | == Locating devices == <!--T:5--> | ||
<!--T:6--> | |||
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. | 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. | ||
</translate> | </translate> | ||
Latest revision as of 09:34, 8 October 2025
smartmontools is a package which provides tools for monitoring drives which support the 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 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.
ls /dev/disk/by-id/
Example
❄︎ /etc/nixos/configuration.nix
{
services.smartd = {
enable = true;
devices = [
{
device = "/dev/disk/by-id/ata-WDC-XXXXXX-XXXXXX"; # FIXME: Change this to your actual disk
}
];
};
}