smartmontools
Appearance
Outdated translations are marked like this.
smartmontools это пакет, который предоставляет инструменты для мониторинга дисков, поддерживающих систему S.M.A.R.T. для мониторинга состояни жёсткого диска.
Он включает в себя программы smartd и smartctl. Smartd может быть включён на системах NixOS с помощью модуля services.smartd
.
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/
Пример
❄︎ /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
}
];
};
}
❄︎ /etc/nixos/configuration.nix
{
services.smartd = {
enable = true;
devices = [
{
device = "/dev/sda"; # FIXME: Измените `/dev/sda` на настоящее имя вашего диска; используйте lsblk чтобы найти the правильное имя
}
];
};
}