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 > > > > > >