Project

General

Profile

Actions

Bug #39290

open

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

Added by Марк Коренберг about 5 years ago. Updated over 4 years 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 (v1):
Crash signature (v2):

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 1 (0 open1 closed)

Has duplicate mgr - Bug #39365: Disk predictor uses too new smartmontools feature (json output)Duplicate04/17/2019

Actions
Actions #1

Updated by Марк Коренберг about 5 years 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

Actions #2

Updated by Марк Коренберг about 5 years 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
Actions #3

Updated by Patrick Donnelly about 5 years ago

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

Updated by Rick Chen about 5 years ago

The smartmontools require last version 6.7 that support json output.

Actions #5

Updated by Марк Коренберг about 5 years 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.

Actions #6

Updated by Brad Hubbard about 5 years ago

  • Has duplicate Bug #39365: Disk predictor uses too new smartmontools feature (json output) added
Actions #7

Updated by Martin H. almost 5 years 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).

Actions #8

Updated by Horace Ng over 4 years 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

Actions

Also available in: Atom PDF