ubuntuusers.de

smartd.conf etc - Festplatte von Überprüfung ausschliessen

Status: Ungelöst | Ubuntu-Version: Xubuntu 19.10 (Eoan Ermine)
Antworten |

glaskugel

Anmeldungsdatum:
8. Juli 2010

Beiträge: 3771

/etc/smartd.conf
DEVICESCAN -d removable -n standby -m root -M exec /usr/share/smartmontools/smartd-runner

Wie kann ich eine Festplatte / SSD / SSM mit einer bestimmten Seriennummer testweise von der Prüfung durch smartd ausschliessen? Notfalls könnte ich auch /dev/sdX bzw. /dev/nvme angeben und als Bedingung den Rechnernamen verwenden.

Allerdings möchte ich weiterhin per eigenem Script diese Platte per cromjob prüfen. Da könnte ich dann mit "smartctl -s off" und "-s on" arbeiten.

Moderiert von rklm:

Ins passende Forum verschoben. Bitte beachte die Foren-Stickies!

dingsbums

Anmeldungsdatum:
13. November 2010

Beiträge: 3790

glaskugel

(Themenstarter)

Anmeldungsdatum:
8. Juli 2010

Beiträge: 3771

https://unix.stackexchange.com/questions/80894/how-to-get-smartd-to-ignore-an-hdd -d ignore is a new directive which allows ignoring a device from DEVICESCAN.

Danke, das liest sich ja schon sehr interessant, ich habe nur keine Ahnung für eine Syntax wie ich einen NVME-SSD ausschliesse.

https://linux.die.net/man/5/smartd.conf Self-Tests can be run automatically by smartd: please see the '-s' Directive below. Self-Tests can also be run manually by using the '-t short' and '-t long' options of smartctl and the results of the testing can be observed using the smartctl '-l selftest' command-line option.

Eventuell würde es mir schon helfen den automatischen Selftest für die NVME auszuschliessen.

~# parted -l | grep /dev
Festplatte  /dev/sda:  1000GB
Festplatte  /dev/sdb:  6001GB
Festplatte  /dev/sdc:  8002GB
Festplatte  /dev/sdd:  500GB
Festplatte  /dev/nvme0n1:  500GB

sdX ändert sich, wenn zB eine externe HDD beim Booten eingeschaltet ist, dann ist diese sda. Aber ex gibt nur 1 fest verbaute nvme.

dingsbums

Anmeldungsdatum:
13. November 2010

Beiträge: 3790

ich habe nur keine Ahnung für eine Syntax wie ich einen NVME-SSD ausschliesse.

Laut Post #3 wäre das dann wohl:

DEVICESCAN /dev/nvme0n1 -d ignore ...<other options>

glaskugel

(Themenstarter)

Anmeldungsdatum:
8. Juli 2010

Beiträge: 3771

Irgendwie komisch, ich finde bei https://linux.die.net/man/5/smartd.conf diese Option "-d ignore" nicht. Das Posting ist von 2013. Um sicher zu sein, überlege ich den Weg einfach alle möglichen Devices anszugeben. Man findet auch so gut wie nichts zu smartd und nvme.

Interessant finde ich das aus https://linux.die.net/man/5/smartd.conf

# The following line enables monitoring of the # ATA Error Log and the Self-Test Error Log. # It also tracks changes in both Prefailure # and Usage Attributes, apart from Attributes /dev/hdd -l error \

  • l selftest

    • t \ # Attributes not tracked:

    • I 194 \ # temperature

    • I 231 \ # also temperature

    • I 9 # power-on hours

Die Frage ist, ob damit keine Selbsttests gemacht werden:

-t \      # Attributes not tracked:
          -I selftest

Aus https://unix.stackexchange.com/questions/80894/how-to-get-smartd-to-ignore-an-hdd

/dev/sda -d removable -n standby,8 -S on -o on -a \
         -m root -M exec /usr/share/smartmontools/smartd-runner \
         -r 194 -R 5 -R 183 -R 187 -s L/../../6/01

Wenn ich da nun die sda-e prüfen lassen will und nvme nicht, dann brauche ich also pro sdX 1 Zeile laut der Manpage.

# parted -l | grep /dev
Festplatte  /dev/sda:  1000GB
Festplatte  /dev/sdb:  6001GB
Festplatte  /dev/sdc:  8002GB
Festplatte  /dev/sdd:  500GB
Festplatte  /dev/sde:  3001GB
Festplatte  /dev/nvme0n1:  500GB

Nach der Installation:

DEVICESCAN -d removable -n standby -m root -M exec /usr/share/smartmontools/smartd-runner

Für mein Verständnis brauche ich also nur "DEVICESCAN" durch "/dev/sdX" ersetzen, also so, wenn ich ein /usr/share/smartmontools/smartd-runner hätte, habe ich aber nicht! Ich habe mir die smartmontools selber kompiliert, da ja nvme experimentell ist und vielleicht eine neuere Version mit meiner nvme besser umgehen kann.

type smartctl
smartctl ist /usr/local/sbin/smartctl

smartctl -V
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.3.0-29-generic] (local build)
...
smartmontools release 7.1 dated 2019-12-30 at 15:00:11 UTC
smartmontools SVN rev 5022 dated 2019-12-30 at 15:00:49
smartmontools build host: x86_64-pc-linux-gnu
smartmontools build with: C++14, GCC 9.2.1 20191008
smartmontools configure arguments: [no arguments given]

Die smartd.conf sollte also zur Zeit gar nicht funktionieren, wenn es /usr/share/smartmontools/smartd-runner nicht gibt, oder? Nennt sich das nun anders bzw. welche Konfiguration wäre richtig?

/dev/sda -d removable -n standby -m root -M exec /usr/share/smartmontools/smartd-runner
/dev/sdb -d removable -n standby -m root -M exec /usr/share/smartmontools/smartd-runner
/dev/sdc -d removable -n standby -m root -M exec /usr/share/smartmontools/smartd-runner
/dev/sdd -d removable -n standby -m root -M exec /usr/share/smartmontools/smartd-runner
/dev/sde -d removable -n standby -m root -M exec /usr/share/smartmontools/smartd-runner
/dev/sdf -d removable -n standby -m root -M exec /usr/share/smartmontools/smartd-runner

Es gibt ein "/usr/local/share/smartmontools"

# ls -1 /usr/local/share/smartmontools
drivedb.h
Antworten |