RE: About smartctl unable to query SAS Disk device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



HI Sir:
	Attached json.txt and console_output.txt.

-----Original Message-----
From: Erwan Velu <evelu@xxxxxxxxxx>
Sent: Thursday, July 5, 2018 4:24 AM
To: Rick Chen <rick.chen@xxxxxxxxxxxxxxx>
Cc: Jeremy Wei <jeremycwei@xxxxxxxxx>; brian huang <brian.huang@xxxxxxxxxxxxxxx>; ceph-devel@xxxxxxxxxxxxxxx; Sage Weil <sage@xxxxxxxxxxxx>
Subject: Re: About smartctl unable to query SAS Disk device

Rick, can you provide the json as attachement so we can inspect it ?

----- Mail original -----
De: "Sage Weil" <sage@xxxxxxxxxxxx>
À: "Erwan Velu" <evelu@xxxxxxxxxx>
Cc: "Rick Chen" <rick.chen@xxxxxxxxxxxxxxx>, "Jeremy Wei" <jeremycwei@xxxxxxxxx>, "brian huang" <brian.huang@xxxxxxxxxxxxxxx>, ceph-devel@xxxxxxxxxxxxxxx
Envoyé: Mercredi 4 Juillet 2018 21:08:39
Objet: Re: About smartctl unable to query SAS Disk device

On Wed, 4 Jul 2018, Erwan Velu wrote:
> Did you tried the "-d ata" to get more information ?
>
> SCSI implementation of SMART is much more lighter than the ATA one.

The 'smartctl -a --json /dev/sdb' is working fine, it's just that the invocation via the ceph tell osd.X is returning nothing.

This is what the OSD is doing:

https://github.com/ceph/ceph/blob/master/src/osd/OSD.cc#L6250

so the possible issues I see are

1- sudo.  whoever teh ceph-osd process is running as is probably not in sudoers yet

2- smartctl not in path.. on my box it's /usr/sbin, perhaps we should specify that explicitly?

3- the smart otput is failing to parse as json here

https://github.com/ceph/ceph/blob/master/src/osd/OSD.cc#L6234

My money is on 1 or 2.

sage


>
> ----- Mail original -----
> De: "Sage Weil" <sweil@xxxxxxxxxx>
> À: "Rick Chen" <rick.chen@xxxxxxxxxxxxxxx>
> Cc: "Jeremy Wei" <jeremycwei@xxxxxxxxx>, "brian huang"
> <brian.huang@xxxxxxxxxxxxxxx>, "Jeremy Wei" <jeremycwei@xxxxxxxxx>,
> ceph-devel@xxxxxxxxxxxxxxx
> Envoyé: Mercredi 4 Juillet 2018 16:08:32
> Objet: RE: About smartctl unable to query SAS Disk device
>
> On Wed, 4 Jul 2018, Rick Chen wrote:
> > HI Sage:
> > NO, I did not see any message like ' smartctl JSON output of /dev/whatever is invalid'.
> > I attached the same device smartctl command output at below.
>
> Oh, the other thing to keep in mind is that ceph-osd is using sudo to
> run smartctl.  See https://github.com/ceph/ceph/pull/22745 ... maybe
> that is what's needed in your case?
>
> sage
>
>  >
> > -----Original Message-----
> > From: Sage Weil <sweil@xxxxxxxxxx>
> > Sent: Tuesday, July 3, 2018 8:04 PM
> > To: Rick Chen <rick.chen@xxxxxxxxxxxxxxx>
> > Cc: Jeremy Wei <jeremycwei@xxxxxxxxx>; brian.huang@xxxxxxxxxxxxxxx;
> > Jeremy Wei <jeremycwei@xxxxxxxxx>; ceph-devel@xxxxxxxxxxxxxxx
> > Subject: Re: About smartctl unable to query SAS Disk device
> >
> > On Tue, 3 Jul 2018, Rick Chen wrote:
> > > HI Sage:
> > >
> > > We have an issue about SAS disk device. From the below message,
> > > the smartctl succeed to get device smart information that include
> > > device information and temperature. But we use ceph osd get smart
> > > <osd.id>, it response empty dictionary.
> > >
> > > The device base information and temperature can help to predict
> > > device health data although it did not have any smart attributes.
> >
> > Hmm, does this seem to be specific to SAS devices?  (The OSD returns valid JSON for other device types?)  Do you see a message like 'smartctl JSON output of /dev/whatever is invalid'?
> >
> > sage
> >
> >
> > >
> > >
> > >
> > > # ceph osd smart get <osd.id>
> > >
> > > [root@node0 ~]# ceph osd smart get 0
> > >
> > > {
> > >
> > > }
> > >
> > >
> > >
> > > # smartctl -a --json /dev/sdb
> > >
> > > {
> > >
> > >   "json_format_version" : [
> > >
> > >     0,
> > >
> > >     1
> > >
> > >   ],
> > >
> > >   "smartctl" : {
> > >
> > >     "version" : [
> > >
> > >       6,
> > >
> > >       7
> > >
> > >     ],
> > >
> > >     "platform_info" : "x86_64-linux-3.10.0-229.el7.x86_64",
> > >
> > >     "build_info" : "(local build)",
> > >
> > >     "argv" : [
> > >
> > >       "smartctl",
> > >
> > >       "-a",
> > >
> > >       "--json",
> > >
> > >       "/dev/sdb"
> > >
> > >     ],
> > >
> > >     "exit_status" : 0
> > >
> > >   },
> > >
> > >   "device" : {
> > >
> > >     "name" : "/dev/sdb",
> > >
> > >     "info_name" : "/dev/sdb",
> > >
> > >     "type" : "scsi",
> > >
> > >     "protocol" : "SCSI"
> > >
> > >   },
> > >
> > >   "vendor" : "SEAGATE",
> > >
> > >   "product" : "ST400FM0053",
> > >
> > >   "model_name" : "SEAGATE ST400FM0053",
> > >
> > >   "revision" : "0007",
> > >
> > >   "scsi_version" : "SPC-4",
> > >
> > >   "user_capacity" : {
> > >
> > >     "blocks" : {
> > >
> > >       "n" : 781422768,
> > >
> > >       "s" : "781422768"
> > >
> > >     },
> > >
> > >     "bytes" : {
> > >
> > >       "n" : 400088457216,
> > >
> > >       "s" : "400088457216"
> > >
> > >     }
> > >
> > >   },
> > >
> > >   "logical_block_size" : 512,
> > >
> > >   "physical_block_size" : 4096,
> > >
> > >   "rotation_rate" : 0,
> > >
> > >   "form_factor" : {
> > >
> > >     "scsi_value" : 3,
> > >
> > >     "name" : "2.5 inches"
> > >
> > >   },
> > >
> > >   "serial_number" : "Z3F01KFM0000Z3F01KFM",
> > >
> > >   "device_type" : {
> > >
> > >     "scsi_value" : 0,
> > >
> > >     "name" : "disk"
> > >
> > >   },
> > >
> > >   "local_time" : {
> > >
> > >     "time_t" : 1530609525,
> > >
> > >     "asctime" : "Tue Jul  3 17:18:45 2018 CST"
> > >
> > >   },
> > >
> > >   "smart_status" : {
> > >
> > >     "passed" : true
> > >
> > >   },
> > >
> > >   "temperature" : {
> > >
> > >     "current" : 37
> > >
> > >   }
> > >
> > > }
> > >
> > >
> > >
> > > ---
> > > Avast 防毒軟體已檢查此封電子郵件的病毒。
> > > https://www.avast.com/antivirus
> > >
> >
> >
> > ---
> > Avast 防毒軟體已檢查此封電子郵件的病毒。
> > https://www.avast.com/antivirus
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe
> > ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >
> >
>
>


---
Avast 防毒軟體已檢查此封電子郵件的病毒。
https://www.avast.com/antivirus
smartctl 6.7 (build date Jun 29 2018) [x86_64-linux-3.10.0-229.el7.x86_64] (local build)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               SEAGATE
Product:              ST400FM0053
Revision:             0007
Compliance:           SPC-4
User Capacity:        400,088,457,216 bytes [400 GB]
Logical block size:   512 bytes
Physical block size:  4096 bytes
LB provisioning type: not reported [LBPME=1, LBPRZ=1]
Rotation Rate:        Solid State Device
Form Factor:          2.5 inches
Logical Unit id:      0x5000c5003018c9ff
Serial number:        Z3F01J830000Z3F01J83
Device type:          disk
Transport protocol:   SAS (SPL-3)
Local Time is:        Thu Jul  5 08:51:34 2018 CST
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Enabled

=== START OF READ SMART DATA SECTION ===
SMART Health Status: OK

Percentage used endurance indicator: 2%
Current Drive Temperature:     33 C
Drive Trip Temperature:        60 C

Manufactured in week 37 of year 2016
Specified cycle count over device lifetime:  10000
Accumulated start-stop cycles:  77
Elements in grown defect list: 0

Vendor (Seagate Cache) information
  Blocks sent to initiator = 168469177
  Blocks received from initiator = 1356115627
  Blocks read from cache and sent to initiator = 1036803576
  Number of read and write commands whose size <= segment size = 1495744260
  Number of read and write commands whose size > segment size = 1589037803

Vendor (Seagate/Hitachi) factory information
  number of hours powered up = 7924.62
  number of minutes until next internal SMART test = 55

Error counter log:
           Errors Corrected by           Total   Correction     Gigabytes    Total
               ECC          rereads/    errors   algorithm      processed    uncorrected
           fast | delayed   rewrites  corrected  invocations   [10^9 bytes]  errors
read:          0        0         0         0          0      13280.396           0
write:         0        0         0         0          0      90857.833           0
verify:        0        0         0         0          0          0.376           0

Non-medium error count:        0

No Self-tests have been logged

{
  "json_format_version" : [
    0,
    1
  ],
  "smartctl" : {
    "version" : [
      6,
      7
    ],
    "platform_info" : "x86_64-linux-3.10.0-229.el7.x86_64",
    "build_info" : "(local build)",
    "argv" : [
      "smartctl",
      "-a",
      "--json",
      "/dev/sdb"
    ],
    "exit_status" : 0
  },
  "device" : {
    "name" : "/dev/sdb",
    "info_name" : "/dev/sdb",
    "type" : "scsi",
    "protocol" : "SCSI"
  },
  "vendor" : "SEAGATE",
  "product" : "ST400FM0053",
  "model_name" : "SEAGATE ST400FM0053",
  "revision" : "0007",
  "scsi_version" : "SPC-4",
  "user_capacity" : {
    "blocks" : {
      "n" : 781422768,
      "s" : "781422768"
    },
    "bytes" : {
      "n" : 400088457216,
      "s" : "400088457216"
    }
  },
  "logical_block_size" : 512,
  "physical_block_size" : 4096,
  "rotation_rate" : 0,
  "form_factor" : {
    "scsi_value" : 3,
    "name" : "2.5 inches"
  },
  "serial_number" : "Z3F01J830000Z3F01J83",
  "device_type" : {
    "scsi_value" : 0,
    "name" : "disk"
  },
  "local_time" : {
    "time_t" : 1530751909,
    "asctime" : "Thu Jul  5 08:51:49 2018 CST"
  },
  "smart_status" : {
    "passed" : true
  },
  "temperature" : {
    "current" : 33
  }
}

[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux