Project

General

Profile

Bug #39290

Nautilus predictor does not work in Ubuntu 18.04 LTS - smartctl doesn't support JSON output

Added by Марк Коренберг over 1 year ago. Updated 9 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature:

Description

$ smartctl -f json --all /dev/sda
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.18.0-11-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=======> INVALID ARGUMENT TO -f: json
=======> VALID ARGUMENTS ARE: old, brief, hex[,id|val] <=======

Use smartctl -h to get a usage summary


$ ceph device get-health-metrics OCZ-VERTEX460A_A22MQ061448000731 {
"20190414-174435": {
"nvme_smart_health_information_add_log_error_code": -22,
"nvme_vendor": "ocz-vertex460a",
"nvme_smart_health_information_add_log_error": "nvme returned an error: sudo: exit status: 1",
"dev": "/dev/sda",
"error": "smartctl returned invalid JSON"
},
"20190414-174440": {
"nvme_smart_health_information_add_log_error_code": -22,
"nvme_vendor": "ocz-vertex460a",
"nvme_smart_health_information_add_log_error": "nvme returned an error: sudo: exit status: 1",
"dev": "/dev/sda",
"error": "smartctl returned invalid JSON"
}
}


Related issues

Duplicated by mgr - Bug #39365: Disk predictor uses too new smartmontools feature (json output) Duplicate 04/17/2019

History

#1 Updated by Марк Коренберг over 1 year ago

Exactly the same in Centos 7

smartctl -f json --all /dev/sda
smartctl 6.5 2016-05-07 r4318 [x86_64-linux-3.10.0-957.5.1.el7.x86_64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=======> INVALID ARGUMENT TO -f: json
=======> VALID ARGUMENTS ARE: old, brief, hex[,id|val] <=======

Use smartctl -h to get a usage summary

#2 Updated by Марк Коренберг over 1 year ago

Bots Centos 7 and Ubuntu 18.04 does not support command:

smartctl -a --json /dev/

Centos 7:

smartctl -a --json /dev/sda
smartctl 6.5 2016-05-07 r4318 [x86_64-linux-3.10.0-957.5.1.el7.x86_64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=======> UNRECOGNIZED OPTION: json

Use smartctl -h to get a usage summary

Ubuntu 18.04:

$ smartctl -a --json /dev/sda
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.15.0-47-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=======> UNRECOGNIZED OPTION: json

Use smartctl -h to get a usage summary

#3 Updated by Patrick Donnelly over 1 year ago

  • Project changed from Ceph to mgr
  • Start date deleted (04/14/2019)

#4 Updated by Rick Chen over 1 year ago

The smartmontools require last version 6.7 that support json output.

#5 Updated by Марк Коренберг over 1 year ago

Rick Chen, Yes, I know. But for Centos 7 we have: http://mirror.centos.org/centos-7/7/storage/x86_64/ceph-nautilus/smartmontools-7.0-3.el7.x86_64.rpm

And do not have something for Ubuntu. It's not fair.

#6 Updated by Brad Hubbard over 1 year ago

  • Duplicated by Bug #39365: Disk predictor uses too new smartmontools feature (json output) added

#7 Updated by Martin H. about 1 year ago

Well, as far as I can see, there is no version 6.7 (and never was) of smartmontools. @Rick Chen You probably mean 7.0? I had to compile and install that version manually in to get it working on Ubuntu (16.04 in my case).

#8 Updated by Horace Ng 9 months ago

same invalid json error with smartmontools 7.0

"20200102-035713": {
"nvme_smart_health_information_add_log_error_code": -22,
"nvme_vendor": "hgst_hdn724030ale640",
"nvme_smart_health_information_add_log_error": "nvme returned an error: sudo: exit status: 1",
"dev": "/dev/sdg",
"error": "smartctl returned invalid JSON"

smartctl 7.0 2018-12-30 r4883 [x86_64-linux-3.10.0-957.12.1.el7.x86_64] (local build)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

Also available in: Atom PDF