S.M.A.R.T. monitoring not starts automatically at reboot

  • Hi :)


    On my Odroid HC2 i have S.M.A.R.T. monitoring enabled and my scheduled tests works fine. The issue is that when i reboot, the monitoring seems to not start automatically. In the logs i see that i'm monitoring 0 devices. So i have to manually issue the command [tt]service smartd restart[/tt]


    My Check interval is set to 1800 and Power Mode to Never.


    Any idea why this happens?



  • Can you please post the output of

    Code
    # cat /etc/smartd.conf
    # omv-confdbadm read --prettify conf.service.smartmontools.device

    Thanks, sure.


    Code
    root@DK:~# cat /etc/smartd.conf
    # This file is auto-generated by openmediavault (https://www.openmediavault.org)
    # WARNING: Do not edit this file, your changes will get lost.
    /dev/disk/by-id/ata-ST4000VN008-2DR166_ZDH6VJKY -d sat -a -o on -S on -T permissive -W 0,0,0 -I 190 -I 194 -I 231 -n never,q \
    -s (S/../.././04|L/../01/./07) \
    -m xxx@xxx.xx -M exec /usr/share/smartmontools/smartd-runner

    -----

    Code
    root@DK:~# omv-confdbadm read --prettify conf.service.smartmontools.device
    [
    {
    "devicefile": "/dev/disk/by-id/ata-ST4000VN008-2DR166_ZDH6VJKY",
    "devicetype": "sat",
    "enable": true,
    "uuid": "af4d1657-2ef9-4ef5-918b-ca1dd8c92d90"
    }
    ]
  • From the configuration point of view everything is ok. If there is a device monitored, then OMV will enable the smartmontools systemd service.


    Could you please reboot the system and then check with systemctl statussmartmontools if the service is enabled and running. Please post the output of the command.


    Last question. Have you installed a backport package version of smartmontools?

  • From the configuration point of view everything is ok. If there is a device monitored, then OMV will enable the smartmontools systemd service.


    Could you please reboot the system and then check with systemctl statussmartmontools if the service is enabled and running. Please post the output of the command.


    Last question. Have you installed a backport package version of smartmontools?

    Here is the output https://pastebin.com/kfKVuRrq

    This instead is the output after i manually restart the service https://pastebin.com/y98S9T65


    About a backport package version of smartmontools, no, never installed, not that i'm aware of. How could i check?

  • Here is the output https://pastebin.com/kfKVuRrq

    This instead is the output after i manually restart the service https://pastebin.com/y98S9T65

    Well, it sounds like /dev/disk/by-id/... is not yet ready when smartd is started. It clearly states:


    Device: /dev/disk/by-id/ata-ST4000VN008-2DR166_ZDH6VJKY [SAT], open() failed: No such device


    Then when you start it manually the entry in /dev has been created. Now systemd units and services have dependencies. Either you will have to make sure the smartd service starts only after whatever unit/service responsible for creating the /dev/disk/by-id/ device files has successfully started or you should check if that unit/service somehow stalls/times out during boot and fix that.

  • Well, it sounds like /dev/disk/by-id/... is not yet ready when smartd is started. It clearly states:


    Device: /dev/disk/by-id/ata-ST4000VN008-2DR166_ZDH6VJKY [SAT], open() failed: No such device


    Then when you start it manually the entry in /dev has been created. Now systemd units and services have dependencies. Either you will have to make sure the smartd service starts only after whatever unit/service responsible for creating the /dev/disk/by-id/ device files has successfully started or you should check if that unit/service somehow stalls/times out during boot and fix that.

    What about OMV will create the systemd unit overrides? How does such a unit file have to look like?


    /etc/systemd/system/smartmontools.d/openmediavault.conf

    Code
    [Unit]
    After=sys-devices-ata-ST4000VN008-2DR166_ZDH6VJKY.device
    Wants=sys-devices-ata-ST4000VN008-2DR166_ZDH6VJKY.device

    @steakhutzeee

    Could you please post the output of systemctl list-units -t device --no-pager.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!