RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1671154 - RFE: update to smartmontools 7.0 (or greater)
Summary: RFE: update to smartmontools 7.0 (or greater)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: smartmontools
Version: ---
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: 8.3
Assignee: Michal Hlavinka
QA Contact: David Jež
Katerina Nemcova
URL:
Whiteboard:
Depends On: 1681505
Blocks: 1811582 1814082 1819712
TreeView+ depends on / blocked
 
Reported: 2019-01-30 22:16 UTC by Ken Dreyer (Red Hat)
Modified: 2023-10-06 18:06 UTC (History)
12 users (show)

Fixed In Version: smartmontools-7.1-1.el8
Doc Type: Enhancement
Doc Text:
.`smartmontools` rebased to version 7.1 The `smartmontools` package has been upgraded to version 7.1, which provides multiple bug fixes and enhancements. Notable changes include: * HDD, SSD and USB additions to the drive database. * New options `-j` and `--json` to enable JSON output mode. * Workaround for the incomplete `Log` subpages response from some SAS SSDs. * Improved handling of `READ CAPACITY` command. * Various improvements for the decoding of the log pages.
Clone Of:
Environment:
Last Closed: 2020-11-04 01:45:17 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Debian BTS 918535 0 None None None 2019-01-30 22:25:26 UTC
Red Hat Product Errata RHEA-2020:4487 0 None None None 2020-11-04 01:45:24 UTC

Description Ken Dreyer (Red Hat) 2019-01-30 22:16:08 UTC
Description of problem:
smartmontools 8 adds support JSON output to smartctl.

This allows Ceph to scrape device health metrics and intelligently handle failures.

Version-Release number of selected component (if applicable):
smartmontools-1:6.6-3.el8

How reproducible:
always

Steps to Reproduce:
1. yum install smartmontools
2. smartctl --json


Actual results:
smartctl prints "UNRECOGNIZED OPTION: json"

Expected results:
smartctl prints JSON output

Comment 1 Ken Dreyer (Red Hat) 2019-01-30 22:18:58 UTC
The drive failure prediction features we're building for RH Ceph Storage 4 ("Nautilus") depends on the JSON output. It's a compelling feature for this release.

Comment 2 Ken Dreyer (Red Hat) 2019-01-31 00:32:51 UTC
I put "smartmontools 8" in the bug description, but no such version exists, and I really meant "smartmontools 7".

Comment 5 Ken Dreyer (Red Hat) 2020-01-21 18:30:06 UTC
RHEL 7 has smartmontools-1:7.0-1.1

RHEL 8 has smartmontools-1:6.6-3

This affects users who try to upgrade from RHEL 7 to RHEL 8.

Comment 6 Ken Dreyer (Red Hat) 2020-01-22 18:10:37 UTC
FYI I've temporarily built Fedora's smartmontools-7.1-7 for el8 in https://copr.fedorainfracloud.org/coprs/ktdreyer/ceph-el8/ for our use with Ceph upstream. The SRPM built fine without modification.

Comment 10 Yaniv Kaul 2020-03-24 13:26:51 UTC
We'll probably need a backport to 8.2.z as well.

Comment 22 Ken Dreyer (Red Hat) 2020-10-26 21:51:27 UTC
A while back I built and then deleted smartmontools 7 from https://copr.fedorainfracloud.org/coprs/ktdreyer/ceph-el8/ .

It turns out it would be really helpful to do early testing of smartmontools 7 with Ceph upstream. Today I built smartmontools-7.1-1.el8 in the Copr repository. You can use this until the RHEL 8.3 and CentOS 8.3 buils are publicly available.

(Standard disclaimers apply... this Copr repository is for upstream testing only, and Red Hat does not support builds there. We support smartmontools 7 once it's officially in RHEL 8.)

Comment 23 Patrick C. F. Ernzer 2020-10-29 18:36:43 UTC
tl;dr: smartmontools-7.1 seems to be working fine in my small homelab setup (4 nodes, 12 OSDs)

side note: as per http://ftp.redhat.com/redhat/containers/rhceph/rhceph-4-rhel8/ we have had smartmontools-7.1-1.el8-x86_64 in the container image rhceph-4-rhel8 since 4-28 (4-20 still had old smartmontools-6.6-3.el8-x86_64)

In my homelab, RHCS4, containerised install, with 4-33 (see at very end for container tag verification);

When called manually, smartmontools 7 works fine on my homelab machines, see below. 
When used with `ceph device get-health-metrics <device identifier>` is works fine too, see further below.
While I have scraping on, diskprediction_local manager module is still off (since it needs sklearn, separate bug)

logs follow, (full output gladly made available, I just did not want to make this update in BZ even longer)

[root@f5-422-01 ~]# podman exec ceph-mon-f5-422-01 ceph config get mgr.1 mgr/devicehealth/scrape_frequency
86400

[root@f5-422-01 ~]# podman exec ceph-osd-6 smartctl --version
smartctl 7.1 2020-04-05 r5049 [x86_64-linux-4.18.0-193.28.1.el8_2.x86_64] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

smartctl comes with ABSOLUTELY NO WARRANTY. This is free
software, and you are welcome to redistribute it under
the terms of the GNU General Public License; either
version 2, or (at your option) any later version.
See http://www.gnu.org for further details.

smartmontools release 7.1 dated 2019-12-30 at 15:00:11 UTC
smartmontools SVN rev 5049 dated 2020-04-05 at 16:31:29
smartmontools build host: x86_64-redhat-linux-gnu
smartmontools build with: C++14, GCC 8.3.1 20191121 (Red Hat 8.3.1-5)
smartmontools configure arguments: '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--program-prefix=' '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-selinux' '--with-libcap-ng=yes' '--with-libsystemd' '--with-systemdsystemunitdir=/usr/lib/systemd/system' '--sysconfdir=/etc/smartmontools/' '--with-systemdenvfile=/etc/sysconfig/smartmontools' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'CXXFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' 'LDFLAGS=-Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' 'CFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' 'PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'


[root@f5-422-01 ~]# podman exec ceph-osd-6 smartctl --json /dev/sdc
{
  "json_format_version": [
    1,
    0
  ],
  "smartctl": {
    "version": [
      7,
      1
    ],
    "svn_revision": "5049",
    "platform_info": "x86_64-linux-4.18.0-193.28.1.el8_2.x86_64",
    "build_info": "(local build)",
    "argv": [
      "smartctl",
      "--json",
      "/dev/sdc"
    ],
    "exit_status": 0
  },
  "device": {
    "name": "/dev/sdc",
    "info_name": "/dev/sdc [SAT]",
    "type": "sat",
    "protocol": "ATA"
  }
}


[root@f5-422-01 ~]# podman exec ceph-osd-6 smartctl --all --json /dev/sdc | head -n 29
{
  "json_format_version": [
    1,
    0
  ],
  "smartctl": {
    "version": [
      7,
      1
    ],
    "svn_revision": "5049",
    "platform_info": "x86_64-linux-4.18.0-193.28.1.el8_2.x86_64",
    "build_info": "(local build)",
    "argv": [
      "smartctl",
      "--all",
      "--json",
      "/dev/sdc"
    ],
    "exit_status": 0
  },
  "device": {
    "name": "/dev/sdc",
    "info_name": "/dev/sdc [SAT]",
    "type": "sat",
    "protocol": "ATA"
  },
  "model_family": "Hitachi Ultrastar 7K3000",
  "model_name": "Hitachi HUA723020ALA640",


[root@f5-422-01 ~]# podman exec  ceph-mon-f5-422-01 ceph device get-health-metrics ST1000DM010-2EP1_[REDACTED]|head -n 50
{
    "20200815-152832": {
        "ata_sct_capabilities": {
            "data_table_supported": false,
            "error_recovery_control_supported": false,
            "feature_control_supported": false,
            "value": 4229
        },
        "ata_smart_attributes": {
            "revision": 10,
            "table": [
                {
                    "flags": {
                        "auto_keep": false,
                        "error_rate": true,
                        "event_count": false,
                        "performance": true,
                        "prefailure": true,
                        "string": "POSR-- ",
                        "updated_online": true,
                        "value": 15
                    },
                    "id": 1,
                    "name": "Raw_Read_Error_Rate",
                    "raw": {
                        "string": "134872229",
                        "value": 134872229
                    },
                    "thresh": 6,
                    "value": 81,
                    "when_failed": "",
                    "worst": 63
                },
                {
                    "flags": {
                        "auto_keep": false,
                        "error_rate": false,
                        "event_count": false,
                        "performance": false,
                        "prefailure": true,
                        "string": "PO---- ",
                        "updated_online": true,
                        "value": 3
                    },
                    "id": 3,
                    "name": "Spin_Up_Time",
                    "raw": {
                        "string": "0",
                        "value": 0
                    },


[root@f5-422-01 ~]# podman ps
CONTAINER ID  IMAGE                                                            COMMAND               CREATED     STATUS         PORTS  NAMES
338b5ca4bf73  registry.redhat.io/rhceph/rhceph-4-rhel8:latest                                        5 days ago  Up 5 days ago         ceph-osd-2
0376f85ac94b  registry.redhat.io/rhceph/rhceph-4-rhel8:latest                                        5 days ago  Up 5 days ago         ceph-osd-10
398c52a01f38  registry.redhat.io/rhceph/rhceph-4-rhel8:latest                                        5 days ago  Up 5 days ago         ceph-osd-6
cb8fde706deb  registry.redhat.io/rhceph/rhceph-4-rhel8:latest                                        5 days ago  Up 5 days ago         ceph-mon-f5-422-01
71af3a9a9d94  registry.redhat.io/rhceph/rhceph-4-rhel8:latest                                        5 days ago  Up 5 days ago         ceph-mgr-f5-422-01
510bb84f442f  registry.redhat.io/openshift4/ose-prometheus-node-exporter:v4.1  --path.procfs=/ho...  5 days ago  Up 5 days ago         node-exporter
ee9a5f63515e  registry.redhat.io/rhceph/rhceph-4-rhel8:latest                                        5 days ago  Up 5 days ago         ceph-mds-f5-422-01

[root@f5-422-01 ~]# podman inspect --format {{.Labels}} registry.redhat.io/rhceph/rhceph-4-rhel8:latest
map[CEPH_POINT_RELEASE: GIT_BRANCH:stable-4.0 GIT_CLEAN:True GIT_COMMIT:41996afa03018a8acc0ee050d356954c15778c2e GIT_REPO:https://github.com/ceph/ceph-container.git RELEASE:stable-4.0 architecture:x86_64 build-date:2020-09-22T17:54:06.594806 com.redhat.build-host:cpt-1008.osbs.prod.upshift.rdu2.redhat.com com.redhat.component:rhceph-container com.redhat.license_terms:https://www.redhat.com/agreements description:Red Hat Ceph Storage 4 distribution-scope:public io.k8s.description:Red Hat Ceph Storage 4 io.k8s.display-name:Red Hat Ceph Storage 4 on RHEL 8 io.openshift.expose-services: io.openshift.tags:rhceph ceph maintainer:Dimitri Savineau <dsavinea> name:rhceph release:33 summary:Provides the latest Red Hat Ceph Storage 4 on RHEL 8 in a fully featured and supported base image. url:https://access.redhat.com/containers/#/registry.access.redhat.com/rhceph/images/4-33 vcs-ref:480e4d6407509b55994a17f2f8a48d652860f527 vcs-type:git vendor:Red Hat, Inc. version:4]

Comment 25 errata-xmlrpc 2020-11-04 01:45:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (smartmontools bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2020:4487


Note You need to log in before you can comment on or make changes to this bug.