# Information smartd étrange

**URL:** <https://www.debian-fr.org/t/information-smartd-etrange/78060>\
**Category:** Support Debian\
**Created:** [Novembre 23, 2018, 7:18 UTC](https://www.debian-fr.org/t/information-smartd-etrange/78060 "2018-11-23T07:18:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsuinux](https://www.debian-fr.org/user_avatar/www.debian-fr.org/rsuinux/32/4554_2.png) [@rsuinux](https://www.debian-fr.org/u/rsuinux)\
**Post date:** [Novembre 23, 2018, 7:18 UTC](https://www.debian-fr.org/t/information-smartd-etrange/78060/1 "2018-11-23T07:18:09Z")

</div>

Bonjour à tous;  
Sur mon serveur, j’ai mis en daemon smartd.  
Et j’ai une remonté d’erreur/warning que je n’arrive pas à interpréter:

```
The following warning/error was logged by the smartd daemon:
Device: /dev/sdb, not capable of SMART self-check
Device info:
ST1000DM003-1SB10C, S/N:Z9A0VMZ0, WWN:5-000c50-087b8b568, FW:CC43, 1.00 TB
For details see host's SYSLOG.

```

A savoir que le disque en question n’est mounté que temporairement pour faire des sauvegardes. Mais il est branché “en dur”. C’est un script qui le mount fait un rsync et démount.

Est ce que l’erreur pourrait venir du fait que le test est fait sur un disque justement non monté?

Merci de votre aide?

---

<div class="post-metadata">

**Author:** ![mattotop](https://www.debian-fr.org/user_avatar/www.debian-fr.org/mattotop/32/3942_2.png) [@mattotop](https://www.debian-fr.org/u/mattotop)\
**Post date:** [Novembre 23, 2018, 7:52 UTC](https://www.debian-fr.org/t/information-smartd-etrange/78060/2 "2018-11-23T07:52:36Z")

</div>

> [@rsuinux](#):
>
> un disque justement non monté

Bah non, là, c’est le smart qui dit qu’il ne peut pas causer avec les capteurs du disque, pas de question de montage dans le message.  
Le message est un peu bizarre avec un disque récent, mais il y en a qui n’ont pas de routine d’auto test.  
Tu es sûr que le branchement SATA est sans faux contact ?

---

<div class="post-metadata">

**Author:** ![rsuinux](https://www.debian-fr.org/user_avatar/www.debian-fr.org/rsuinux/32/4554_2.png) [@rsuinux](https://www.debian-fr.org/u/rsuinux)\
**Post date:** [Novembre 23, 2018, 8:36 UTC](https://www.debian-fr.org/t/information-smartd-etrange/78060/3 "2018-11-23T08:36:41Z")

</div>

Je n’est pas vérifié les connecteurs (la machine est dans un réduit, afin de ne pas gêner)  
Un chantier pour ce week end…

---

<div class="post-metadata">

**Author:** ![Mimoza](https://www.debian-fr.org/user_avatar/www.debian-fr.org/mimoza/32/3858_2.png) [@Mimoza](https://www.debian-fr.org/u/Mimoza)\
**Post date:** [Novembre 23, 2018, 9:22 UTC](https://www.debian-fr.org/t/information-smartd-etrange/78060/4 "2018-11-23T09:22:27Z")

</div>

En effet, il dit qu’il n’arrive pas a faire son auto-test.  
Revoir les connexion est un bon début, mais s’il n’a pas bougé depuis un moment j’ai des doutes.  
Tu dit qu’il est démonté et remonté a chaque lancement de ton script rsync, mais ton disque est bien alimenté électriquement en permanence ?  
De façon général y a-t-il un évènement récent qui a changé quoique ce soit sur le disque ?

---

<div class="post-metadata">

**Author:** ![Clochette](https://www.debian-fr.org/user_avatar/www.debian-fr.org/clochette/32/8757_2.png) [@Clochette](https://www.debian-fr.org/u/Clochette)\
**Post date:** [Novembre 23, 2018, 12:08 UTC](https://www.debian-fr.org/t/information-smartd-etrange/78060/5 "2018-11-23T12:08:03Z")

</div>

> [@rsuinux](#):
>
> ```plaintext
> The following warning/error was logged by the smartd daemon:
> Device: /dev/sdb, not capable of SMART self-check
> Device info:
> ST1000DM003-1SB10C, S/N:Z9A0VMZ0, WWN:5-000c50-087b8b568, FW:CC43, 1.00 TB
> For details see host's SYSLOG.
> 
> ```

Dixit le man de `smartctl` :

```plaintext
smartctl is a command line utility designed to perform SMART tasks such as printing the SMART self-test and error logs,
 enabling and disabling SMART automatic testing, and initiating device self-tests.
Note: if the user issues a SMART command that is (apparently) not implemented by the device,
 smartctl will print a warning message but issue the command anyway (see the -T, --tolerance option below).
This should not cause problems: on most devices, unimplemented SMART commands issued to a drive are ignored and/or return an error. 

```

Je serais toi je testerai tout simplement manuellement le disque et vérifierai si il est justement capable de gérer les tests smart.

---

<div class="post-metadata">

**Author:** ![mattotop](https://www.debian-fr.org/user_avatar/www.debian-fr.org/mattotop/32/3942_2.png) [@mattotop](https://www.debian-fr.org/u/mattotop)\
**Post date:** [Novembre 23, 2018, 12:59 UTC](https://www.debian-fr.org/t/information-smartd-etrange/78060/6 "2018-11-23T12:59:03Z")

</div>

> [@Clochette](#):
>
> si il est justement capable

J’ai regardé, c’est un seagate de 1To récent, ça serait étonnant qu’il n’ai pas de smart.  
Mais bon, c’est vrai que ça mérite d’être testé avant d’ouvrir le capot, il peut y avoir des messages plus explicites lors des tests.

---

<div class="post-metadata">

**Author:** ![anon29980398](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/a/f4b2a3/32.png) [@anon29980398](https://www.debian-fr.org/u/anon29980398)\
**Post date:** [Novembre 23, 2018, 1:27 UTC](https://www.debian-fr.org/t/information-smartd-etrange/78060/7 "2018-11-23T13:27:08Z")

</div>

Bonjour

> [@rsuinux](#):
>
> ```plaintext
> …
> For details see host's SYSLOG.
> 
> ```

Et finalement, que disent les fichiers log du système hôte de ce disque ?

---

<div class="post-metadata">

**Author:** ![rsuinux](https://www.debian-fr.org/user_avatar/www.debian-fr.org/rsuinux/32/4554_2.png) [@rsuinux](https://www.debian-fr.org/u/rsuinux)\
**Post date:** [Novembre 24, 2018, 8:03 UTC](https://www.debian-fr.org/t/information-smartd-etrange/78060/8 "2018-11-24T20:03:33Z")

</div>

Merci a tous pour vos réponses.  
Je fais une réponse commune si vous permettez.  
Pour le problème de connexion, je n’ai pas bougé la machine depuis 1an et demi. Tout est branché a l’intérieur, c’est une “petite” machine de récup que j’ai reconverti et place sous un escalier. Et quand j’ai écrit que je mountais, ce n’est pas physiquement, c’est juste que le disque n’a pas de répertoire dédié et donc j’utilise mount en scripts pour les sauvegardes uniquement puis umount des que c’est fini.  
Dans les log, je n’ai… Rien de plus que ce que j’ai dans le mail d’alerte (cf. Premier post).

Et voilà un test :

```
# less /tmp/smart-tool-sdb.txt
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.9.0-6-amd64
] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www
.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family: Seagate Barracuda 7200.14 (AF)
Device Model: ST1000DM003-1SB10C
Serial Number: Z9A0VMZ0
LU WWN Device Id: 5 000c50 087b8b568
Firmware Version: CC43
User Capacity: 1 000 204 886 016 bytes [1,00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Device is: In smartctl database [for details use:
-P show]
ATA Version is: ATA8-ACS T13/1699-D revision 4
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is: Wed Nov 21 07:06:29 2018 CET
SMART support is: Available - device has SMART capability
.
SMART support is: Enabled

```

Un peu plus loin:

```
SMART Error Log Version: 1
No Errors Logged

```

Ce qui, pour moi, ne veut pas dire qu’i n’y a pas d’erreur. Juste qu’elles ne sont pas écrites.

Et pour finir, pas d’évennement récent, si ce n’est la mise en marche de mon script de sauvegarde concomitant avec la mise en daemon de smartd.

---

<div class="post-metadata">

**Author:** ![Mimoza](https://www.debian-fr.org/user_avatar/www.debian-fr.org/mimoza/32/3858_2.png) [@Mimoza](https://www.debian-fr.org/u/Mimoza)\
**Post date:** [Novembre 24, 2018, 9:21 UTC](https://www.debian-fr.org/t/information-smartd-etrange/78060/9 "2018-11-24T21:21:41Z")

</div>

L’erreur qui t’es remonté l’est elle lorsque ton script fonctionne ou pas ?

---

<div class="post-metadata">

**Author:** ![grandtoubab](https://www.debian-fr.org/user_avatar/www.debian-fr.org/grandtoubab/32/4505_2.png) [@grandtoubab](https://www.debian-fr.org/u/grandtoubab)\
**Post date:** [Novembre 24, 2018, 9:39 UTC](https://www.debian-fr.org/t/information-smartd-etrange/78060/10 "2018-11-24T21:39:51Z")

</div>

salut

listage de toutes les infos du disque `/dev/sdb`

`sudo smartctl -a /dev/sdb`

lancer un test court

```plaintext
sudo smartctl -t short /dev/sdb

```

lire les résultats des tests

```plaintext
sudo smartctl -l selftest /dev/sdb

```

Dans `/etc/smartd.conf` la seule ligne décommentée

```plaintext
# list the devices that they wish to monitor.
DEVICESCAN -d removable -n standby -m root -M exec /usr/share/smartmontools/smartd-runner

```

> [@](#):
>
> [https://linux.die.net/man/5/smartd.conf](https://linux.die.net/man/5/smartd.conf)  
> _removable_ - the device or its media is removable. This indicates to **smartd** that it should continue (instead of exiting, which is the default behavior) if the device does not appear to be present when **smartd** is started
> 
> _standby_ - check the device unless it is in SLEEP or STANDBY mode. In these modes most disks are not spinning, so if you want to prevent a laptop disk from spinning up each time that **smartd** polls, this is probably what you want.
> 
> -m ADD  
> Send a warning email to the email address  
> -M  
> _exec PATH_ - run the executable PATH instead of the default mail command, when **smartd** needs to send email. PATH must point to an executable binary file or script.

Pour vérifier l’état du service

```plaintext
systemctl status smartd.service -l --no-pager

```

Exemple

```plaintext
systemctl status smartd.service -l --no-pager
● smartd.service - Self Monitoring and Reporting Technology (SMART) Daemon
   Loaded: loaded (/lib/systemd/system/smartd.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2018-11-25 12:23:02 CET; 2h 12min ago
     Docs: man:smartd(8)
           man:smartd.conf(5)
 Main PID: 578 (smartd)
    Tasks: 1 (limit: 4297)
   Memory: 3.1M
   CGroup: /system.slice/smartd.service
           └─578 /usr/sbin/smartd -n

nov. 25 12:23:04 debian smartd[578]: Device: /dev/sda [SAT], found in smartd database: Hitachi Travelstar 7K500
nov. 25 12:23:05 debian smartd[578]: Device: /dev/sda [SAT], is SMART capable. Adding to "monitor" list.
nov. 25 12:23:05 debian smartd[578]: Device: /dev/sda [SAT], state read from /var/lib/smartmontools/smartd.Hitachi_HTS725032A9A364-110305PCKC04BPJ0X3GK.ata.state
nov. 25 12:23:05 debian smartd[578]: Monitoring 1 ATA/SATA, 0 SCSI/SAS and 0 NVMe devices
nov. 25 12:23:05 debian smartd[578]: Device: /dev/sda [SAT], SMART Usage Attribute: 190 Airflow_Temperature_Cel changed from 57 to 79
nov. 25 12:23:05 debian smartd[578]: Device: /dev/sda [SAT], state written to /var/lib/smartmontools/smartd.Hitachi_HTS725032A9A364-110305PCKC04BPJ0X3GK.ata.state
nov. 25 12:53:06 debian smartd[578]: Device: /dev/sda [SAT], SMART Usage Attribute: 190 Airflow_Temperature_Cel changed from 79 to 64
nov. 25 13:23:05 debian smartd[578]: Device: /dev/sda [SAT], SMART Usage Attribute: 190 Airflow_Temperature_Cel changed from 64 to 60
nov. 25 13:53:05 debian smartd[578]: Device: /dev/sda [SAT], SMART Usage Attribute: 190 Airflow_Temperature_Cel changed from 60 to 58
nov. 25 14:23:05 debian smartd[578]: Device: /dev/sda [SAT], SMART Usage Attribute: 190 Airflow_Temperature_Cel changed from 58 to 57

```

---

<div class="post-metadata">

**Author:** ![rsuinux](https://www.debian-fr.org/user_avatar/www.debian-fr.org/rsuinux/32/4554_2.png) [@rsuinux](https://www.debian-fr.org/u/rsuinux)\
**Post date:** [Novembre 26, 2018, 7:56 UTC](https://www.debian-fr.org/t/information-smartd-etrange/78060/11 "2018-11-26T19:56:57Z")

</div>

> [@grandtoubab](#):
>
> `systemctl status smartd.service -l --no-pager`

Je n’ai pas la ligne dé-commentée.  
Je vais tester et voir le résultat.

---

<div class="post-metadata">

**Author:** ![sk4hrr](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/s/7bcc69/32.png) [@sk4hrr](https://www.debian-fr.org/u/sk4hrr)\
**Post date:** [Novembre 26, 2018, 9:19 UTC](https://www.debian-fr.org/t/information-smartd-etrange/78060/12 "2018-11-26T21:19:13Z")

</div>

Bonsoir,

Au risque de poser une question stupide… ne faut-il pas que la carte SATA gère également le SMART pour que ça fonctionne ?

---

<div class="post-metadata">

**Author:** ![rsuinux](https://www.debian-fr.org/user_avatar/www.debian-fr.org/rsuinux/32/4554_2.png) [@rsuinux](https://www.debian-fr.org/u/rsuinux)\
**Post date:** [Novembre 27, 2018, 10:37 UTC](https://www.debian-fr.org/t/information-smartd-etrange/78060/13 "2018-11-27T10:37:29Z")

</div>

Il n’y a jamais de question stupide.  
De plus, j’ai deux autres disques, qui ne génèrent pas d’erreur.  
Ce ne doit donc pas venir de la.  
Par contre, depuis que j’ai modifié la conf comme proposé par @grandtoubab , je n’ai plus d’erreur !  
Miracle de la technologie ?  
Non miracle des documentations…

Grand merci a toi.

---

<div class="post-metadata">

**Author:** ![grandtoubab](https://www.debian-fr.org/user_avatar/www.debian-fr.org/grandtoubab/32/4505_2.png) [@grandtoubab](https://www.debian-fr.org/u/grandtoubab)\
**Post date:** [Novembre 27, 2018, 11:21 UTC](https://www.debian-fr.org/t/information-smartd-etrange/78060/14 "2018-11-27T11:21:08Z")

</div>

petite cerise sur le gâteau, je me suis mis un test dans le calendrier hebdomadaire

```auto
root@debian:/etc/cron.weekly# cat smartctl
#! /bin/bash
#set -e
/usr/sbin/smartctl -t short /dev/sda
/bin/sleep 180
/usr/sbin/smartctl -l selftest /dev/sda

```

pour forcer le déclenchement, en root

```auto
# anacron -f -n

```

Anacron donne les résultats dans un mail

```auto
/etc/cron.weekly/smartctl:
smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.19.4-4-19-4-23-nov-2018] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Short self-test routine immediately in off-line mode".
Drive command "Execute SMART Short self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 2 minutes for test to complete.
Test will complete after Tue Nov 27 12:16:56 2018

Use smartctl -X to abort test.
smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.19.4-4-19-4-23-nov-2018] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 10404 -
# 2 Short offline Completed without error 00% 10389 -
# 3 Short offline Completed without error 00% 10378 -
# 4 Short offline Completed without error 00% 8620 -
# 5 Extended offline Completed without error 00% 8363 -
# 6 Short offline Completed without error 00% 8353 -
# 7 Short offline Completed without error 00% 6883 -
# 8 Short offline Completed without error 00% 6373 -
# 9 Short offline Completed without error 00% 6199 -
#10 Short offline Completed without error 00% 3367 -
#11 Short offline Completed without error 00% 2694 -
#12 Short offline Completed without error 00% 2376 -

```

---

<div class="post-metadata">

**Author:** ![sk4hrr](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/s/7bcc69/32.png) [@sk4hrr](https://www.debian-fr.org/u/sk4hrr)\
**Post date:** [Novembre 27, 2018, 11:50 UTC](https://www.debian-fr.org/t/information-smartd-etrange/78060/15 "2018-11-27T11:50:42Z")

</div>

> [@rsuinux](#):
>
> Il n’y a jamais de question stupide.  
> De plus, j’ai deux autres disques, qui ne génèrent pas d’erreur.

C’est gentil, du coup ma question tombe à l’eau.

> [@grandtoubab](#):
>
> petite cerise sur le gâteau, je me suis mis un test dans le calendrier hebdomadaire

Pourquoi ne pas utiliser directement le démon comme [ici](https://doc.ubuntu-fr.org/smartmontools#notification_automatique_d_un_probleme) ?

---

<div class="post-metadata">

**Author:** ![grandtoubab](https://www.debian-fr.org/user_avatar/www.debian-fr.org/grandtoubab/32/4505_2.png) [@grandtoubab](https://www.debian-fr.org/u/grandtoubab)\
**Post date:** [Novembre 27, 2018, 2:19 UTC](https://www.debian-fr.org/t/information-smartd-etrange/78060/16 "2018-11-27T14:19:36Z")

</div>

> [@sk4hrr](#):
>
> > [@grandtoubab](#):
> >
> > petite cerise sur le gâteau, je me suis mis un test dans le calendrier hebdomadaire
> 
> Pourquoi ne pas utiliser directement le démon comme [ici](https://doc.ubuntu-fr.org/smartmontools#notification_automatique_d_un_probleme) ?

le daemon fonctionne, bien lire mes message au-desssus

```auto
systemctl status smartd.service -l --no-pager

```

la je déclenche un test court mais complet par le calendrier , c’est pas exactement la même chose

---

<div class="post-metadata">

**Author:** ![sk4hrr](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/s/7bcc69/32.png) [@sk4hrr](https://www.debian-fr.org/u/sk4hrr)\
**Post date:** [Novembre 27, 2018, 2:21 UTC](https://www.debian-fr.org/t/information-smartd-etrange/78060/17 "2018-11-27T14:21:12Z")

</div>

> [@grandtoubab](#):
>
> la je déclenche un test court mais complet par le calendrier , c’est pas exactement la même chose

J’ai bien lu, mais du coup je dois pas comprendre =  
J’avais l’impression qu’il était possible de tout faire via le démon, mais du coup non ?

---

<div class="post-metadata">

**Author:** ![anon29980398](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/a/f4b2a3/32.png) [@anon29980398](https://www.debian-fr.org/u/anon29980398)\
**Post date:** [Novembre 27, 2018, 2:35 UTC](https://www.debian-fr.org/t/information-smartd-etrange/78060/18 "2018-11-27T14:35:09Z")

</div>

Bonjour

> [@sk4hrr](#):
>
> …J’avais l’impression qu’il était possible de tout faire via le démon…

Je ne l’ai pas testée,  
mais je pense aussi que c’est possible en utilisant [une des fonctionnalités de **`smartd`**](https://wiki.archlinux.org/index.php/S.M.A.R.T.#Schedule_self-tests)

* * *

Voir aussi :

```plaintext
man smartd.conf

```

---

<div class="post-metadata">

**Author:** ![grandtoubab](https://www.debian-fr.org/user_avatar/www.debian-fr.org/grandtoubab/32/4505_2.png) [@grandtoubab](https://www.debian-fr.org/u/grandtoubab)\
**Post date:** [Novembre 27, 2018, 3:34 UTC](https://www.debian-fr.org/t/information-smartd-etrange/78060/19 "2018-11-27T15:34:27Z")

</div>

bonjour la syntaxe 😂  
DEVICESCAN -s (S/…/…/./02|L/…/…/6/03)

je préfère poser mon script directement dans cron.weekly

---

<div class="post-metadata">

**Author:** ![anon29980398](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/a/f4b2a3/32.png) [@anon29980398](https://www.debian-fr.org/u/anon29980398)\
**Post date:** [Novembre 27, 2018, 3:51 UTC](https://www.debian-fr.org/t/information-smartd-etrange/78060/20 "2018-11-27T15:51:14Z")

</div>

Oui, bon, la syntaxe utilisée par `cron` n’est pas mal non plus.

Au cas où, un extrait de  
`man smartd.conf`

> [@man smartd.conf](#):
>
> ```plaintext
> -s REGEXP
> Run Self-Tests or Offline Immediate Tests, at scheduled times.
> A Self- or Offline Immediate Test will be run at the end of
> periodic device polling, if all 12 characters of the string
> T/MM/DD/d/HH match the extended regular expression REGEXP.
> Here:
> 
> T is the type of the test. The values that smartd will try to
> match (in turn) are: 'L' for a Long Self-Test, 'S' for a
> Short Self-Test, 'C' for a Conveyance Self-Test (ATA only),
> and 'O' for an Offline Immediate Test (ATA only). As soon
> as a match is found, the test will be started and no addi‐
> tional matches will be sought for that device and that
> polling cycle.
> 
> To run scheduled Selective Self-Tests, use 'n' for next
> span, 'r' to redo last span, or 'c' to continue with next
> span or redo last span based on status of last test. The
> LBA range is based on the first span from the last test.
> See the smartctl -t select,[next|redo|cont] options for fur‐
> ther info.
> 
> Some disks (e.g. WD) do not preserve the selective self test
> log across power cycles. If state persistence ('-s' option)
> is enabled, the last test span is preserved by smartd and
> used if (and only if) the selective self test log is empty.
> 
> MM is the month of the year, expressed with two decimal digits.
> The range is from 01 (January) to 12 (December) inclusive.
> Do not use a single decimal digit or the match will always
> fail!
> 
> DD is the day of the month, expressed with two decimal digits.
> The range is from 01 to 31 inclusive. Do not use a single
> decimal digit or the match will always fail!
> 
> d is the day of the week, expressed with one decimal digit.
> The range is from 1 (Monday) to 7 (Sunday) inclusive.
> 
> HH is the hour of the day, written with two decimal digits, and
> given in hours after midnight. The range is 00 (midnight to
> just before 1 am) to 23 (11pm to just before midnight)
> inclusive. Do not use a single decimal digit or the match
> will always fail!
> 
> ```

[Page suivante](https://www.debian-fr.org/t/information-smartd-etrange/78060.md?page=2)
