OMV RPC Smart information inconsistent compared to smartctl

  • I am using a QNAP TR-004 USB enclosure (ya i know...) which is getting SMART info (https://github.com/openmediavault/openmediavault/issues/1302) but intermittently.


    The webgui's smart status will consistently toggle between 'GOOD' and 'UNKNOWN' while the temperature will sometimes show 'n/a' during refreshes.


    Running smartctl will give consistent results but when using omv-rpc, the values are not consistent.


    The following are commands ran consecutively to illustrate the changes and provide a comparison (see the 3rd time the command was ran). Full output of both commands in attachment.


  • crashtest

    Hat das Thema freigeschaltet.
    • Disk Management page (https://omv/#/storage/disks) shows consistent information. Disks model always shows up as TR-004 DISK00, TR-004 DISK01 and so on.
    • Disk Management loads RPC service equivalent to omv-rpc -u admin 'DiskManagement' 'enumerateDevices'
    • Disk Management RPC script (diskmgmt.inc) gets the model using "model" => $sd->getModel() which is in storagedevice.inc
    • storagedevice.inc gets model from udev (udevadm info --query=all --name=/dev/sda) or sysfs (/sys/block/sda/device/model) which both shows a consistent output of TR-004 DISKxx


    • On the other hand, in SMART devices page (https://omv/#/storage/smart/devices), model, serial number, temperature and status are changing on every reload.
    • For example, /dev/sda model shows up as TR-004 DISK00, but on reload, it changes to ST3000DM008-2DM166
    • SMART RPC script (smart.inc) gets the model using "model" => !empty($info['devicemodel']) ? $info['devicemodel'] : $sd->getModel()
    • $info['devicemodel'] gets the device model from SMART information $info = $si->getInformation(); which shows a consistent output of ST3000DM008-2DM166 when running smartctl -d jmb39x-q,0 -a /dev/sda
    • $sd->getModel() gets the device model from udev/sysfs which shows a consistent output of TR-004 DISK00


    • When I modify /usr/share/openmediavault/engined/rpc/smart.inc and change "model" => !empty($info['devicemodel']) ? $info['devicemodel'] : $sd->getModel() to "model" => $sd->getModel(), the model number in SMART devices page consistently shows TR-004 DISKxx
    • When I change to "model" => $info['devicemodel'], the model number in SMART devices page sometimes show ST3000DM008-2DM166 and sometimes the field is blank.


    • Running smartctl -d jmb39x-q,0 -a /dev/sda gives good SMART information
    • Running smartctl -d jmb39x-q,1 -a /dev/sdb gives good SMART information
    • Running both commands in parallel smartctl -d jmb39x-q,0 -a /dev/sda & smartctl -d jmb39x-q,1 -a /dev/sdb results in one of the smartctl process hanging. Sometimes there is output, sometimes smartctl fails with Smartctl open device: /dev/sdb [jmb39x_disk_1] failed: No JMB39x response detected. But the command always fails to end until I press Ctrl-C

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!