Smartmontools/ru: Difference between revisions
Appearance
No edit summary |
Updating to match new version of source page |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:smartmontools}} | {{DISPLAYTITLE:smartmontools}} | ||
<languages/> | |||
'''smartmontools''' это пакет, который предоставляет инструменты для мониторинга дисков, поддерживающих систему [[wikipedia:Self-Monitoring, Analysis and Reporting Technology|S.M.A.R.T.]] для мониторинга состояни жёсткого диска. | '''smartmontools''' это пакет, который предоставляет инструменты для мониторинга дисков, поддерживающих систему [[wikipedia:Self-Monitoring, Analysis and Reporting Technology|S.M.A.R.T.]] для мониторинга состояни жёсткого диска. | ||
Он включает в себя программы '''smartd''' и '''smartctl'''. Smartd может быть включён на системах NixOS с помощью модуля {{Nixos:option|services.smartd}}. | Он включает в себя программы '''smartd''' и '''smartctl'''. Smartd может быть включён на системах NixOS с помощью модуля {{Nixos:option|services.smartd}}. | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
== Locating devices == | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
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. | |||
</div> | |||
<syntaxhighlight lang="bash"> | |||
ls /dev/disk/by-id/ | |||
</syntaxhighlight> | |||
<span id="Example"></span> | <span id="Example"></span> | ||
== Пример == | == Пример == | ||
{{file|/etc/nixos/configuration.nix|nix|<nowiki>{ | |||
services.smartd = { | |||
enable = true; | |||
devices = [ | |||
{ | |||
device = "/dev/disk/by-id/ata-WDC-XXXXXX-XXXXXX"; # FIXME: Change this to your actual disk | |||
} | |||
]; | |||
}; | |||
} | |||
</nowiki>}} | |||
<div class="mw-translate-fuzzy"> | |||
{{Template:file:nixos|<nowiki>{ | {{Template:file:nixos|<nowiki>{ | ||
services.smartd = { | services.smartd = { | ||
Line 15: | Line 44: | ||
} | } | ||
</nowiki>}} | </nowiki>}} | ||
</div> | |||
Latest revision as of 09:34, 8 October 2025
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 правильное имя
}
];
};
}