Re: General questions: self-tests / ATA attributes / SCSI sense / smart return status
Michael Woon <[email protected]> Mon, 23 Jan 2017 15:36:18 +0100
| Newsgroups | gmane.linux.utilities.smartmontools |
|---|---|
| Message-ID | <CAPbradZi35igwVj7fdAigZq1MEtR6TfG5XmAt3Pg=sTxu23rmg@mail.gmail.com> |
--===============4107735842876405519== Content-Type: multipart/alternative; boundary=001a114098d4981ae70546c3ee1a --001a114098d4981ae70546c3ee1a Content-Type: text/plain; charset=UTF-8 I realised I didn't reply to the list with this question. Just have a tiny clarification to ask for for this point: - If SMART RETURN STATUS returns "OK" and attributes are >= threshold, does smartctl still report healthas "OK / PASSED"? (and in this case, returned with bit 3 not set and bit 4 set?) I've put the rest of the questions in another, more accurately named thread. Thanks! Michael 2016-11-26 16:15 GMT+01:00 Michael Woon <[email protected]>: > Hi Christian, > > Thanks for the quick and excellent answer, that really cleared up a lot of > things for me. > > > I just have a couple of quick follow-ups: > > - If SMART RETURN STATUS returns "OK" and attributes are >= threshold, > does smartctl still report healthas "OK / PASSED"? (and in this case, > returned with bit 3 not set and bit 4 set?) > > > For any SCSI experts out there: > > - How do I proactively watch drive health for replacement? With SATA, I > watch reallocated sectors, amongst other things, and there's generally a > lot of documentation and discussion about this, but with SCSI, I ______? > (really couldn't find anything at all) > > - I've been asking all these questions with the assumption that smartctl > is the tool for this job. Could I wrong on this? > > > > Thanks again! > Michael > > > > 2016-11-26 14:29 GMT+01:00 Christian Franke <[email protected]> > : > >> Michael Woon wrote: >> >>> Hi Smartmontools devs, >>> >>> >>> I'm writing for a bit of clarity about self-tests and what records they >>> produce, and the smart health call. >>> >>> >>> As I understand from the documentation, calling "smartctl -H": >>> >>> -returns the result of the SMART RETURN STATUS command -/or- /checks if >>> any ATA attributes exceed thresholds in ATA drives >>> >> >> Yes. >> >> >> -checks for any error codes in the SCSI sense buffer. >>> >>> >> It checks ASC/ASCQ in SCSI IE log page (if supported) or in result of >> REQUEST SENSE command. >> >> Most remaining answers are for ATA/SATA only. SCSI/SAS differs >> considerably. Some SCSI expert on this list might want to answer. >> >> >> As I understand from the documentation, fore- and back-ground checks >>> update the self-test error log and certain ATA attributes, when they run. >>> >> >> There is no ATA "self-test error log". On completion of a self-test, a >> new entry is usually added to the ATA self-test log(s). The ATA error >> log(s) are typically not updated on read errors found during a self-test. >> >> >> My main questions are: >>> >>> -what does SMART RETURN STATUS evaluate? >>> >> >> Anything the author of the drive firmware decided to evaluate :-) >> >> Recent versions of ATA ACS standards say: >> "The SMART RETURN STATUS command causes the device to communicate the >> reliability status of the device to the host." >> If command returns failure(0x2c,0xf4): "The device has detected a >> threshold exceeded condition." >> >> Note that ATA SMART Attributes are not part of the standard. The SMART >> READ THRESHOLDS command was declared obsolete in ATA-4 (1998). >> >> >> >>> alternatively stated: >>> -does the command -only- look at ATA attributes stored in the table and >>> error codes in the SCSI sense buffer? or is the content of the self-test >>> error log also a factor? >>> >>> >> SMART RETURN STATUS does not return failure if any Read/Write error >> occured. It usually will return failure if the number of spare blocks for >> reallocation is below some threshold. >> >> >> bottom line: >>> -If I want to be sure of the health of a disk, can I trust the smart >>> health status (to include the result of the self-tests) or do I have to >>> look at -both- the health status and the self-test error log? >>> >> >> If you want to proactively replace drives, I would recommend to watch the >> number of reallocated sectors (e.g. use smartd with '-R 9! -r 9!' >> directive). A failing SMART STATUS may occur (too?) late. >> >> >> >>> or do I have the wrong angle on this: >>> -simply watch for a '0' exit code for an "all okay"? >>> >>> >> It depends, see above. >> >> >> minor questions about the exit codes: >>> -is it possible to have a set bit 3 (device failing) without a set bit 4 >>> (attributes over threshold), and vice versa? >>> >> >> Yes: if SMART RETURN STATUS returned failure but there is no attribute <= >> threshold in the SMART DATA block, the SMART READ THRESHOLD command did not >> work, etc... >> >> >> -at what point does a SCSI drive set the 6th bit in the error code? I >>> have drives (SAS) that have some errors in their smartctl output, but don't >>> set this bit when smartctl is run on them. >>> >> >> For some historic reason, bit 6 was never implemented for SCSI. >> >> >> -does bit 7 really only work for SATA drives? (SCSI drives have a self >>> test log too) >>> >> >> Yes, it works "better" for ATA because newer long tests without error >> clear the bit. >> >> Thanks, >> Christian >> >> > --001a114098d4981ae70546c3ee1a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">I realised I didn't reply to the list with this questi= on.<div><br></div><div><div style=3D"font-size:12.8px">Just have a tiny cla= rification to ask for for this point:</div><div style=3D"font-size:12.8px">= <br></div><div style=3D"font-size:12.8px">- If SMART RETURN STATUS returns = "OK" and attributes are >=3D threshold, does smartctl still re= port healthas "OK / PASSED"? (and in this case, returned with bit= 3 not set and bit 4 set?)</div></div><div style=3D"font-size:12.8px"><br><= /div><div style=3D"font-size:12.8px">I've put the rest of the questions= in another, more accurately named thread.</div><div style=3D"font-size:12.= 8px"><br></div><div style=3D"font-size:12.8px">Thanks!<br>Michael</div></di= v><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">2016-11-26 16:1= 5 GMT+01:00 Michael Woon <span dir=3D"ltr"><<a href=3D"mailto:[email protected]= du" target=3D"_blank">[email protected]</a>></span>:<br><blockquote class=3D"= gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-= left:1ex"><div dir=3D"ltr">Hi Christian,<div><br></div><div>Thanks for the = quick and excellent answer, that really cleared up a lot of things for me.<= /div><div><br></div><div><br></div><div>I just have a couple of quick follo= w-ups:</div><div><br></div><div>- If SMART RETURN STATUS returns "OK&q= uot; and attributes are >=3D threshold, does smartctl still report healt= has "OK / PASSED"? (and in this case, returned with bit 3 not set= and bit 4 set?)<br></div><div><br></div><div><br></div><div>For any SCSI e= xperts out there:</div><div><br></div><div>- How do I proactively watch dri= ve health for replacement? With SATA, I watch reallocated sectors, amongst = other things, and there's generally a lot of documentation and discussi= on about this, but with SCSI, I ______? (really couldn't find anything = at all)</div><div><br></div><div>- I've been asking all these questions= with the assumption that smartctl is the tool for this job. Could I wrong = on this?</div><div><br></div><div><br></div><div><br></div><div>Thanks agai= n!<span class=3D"HOEnZb"><font color=3D"#888888"><br>Michael</font></span><= /div><div><div class=3D"h5"><div><br></div><div><br></div><div class=3D"gma= il_extra"><br><div class=3D"gmail_quote">2016-11-26 14:29 GMT+01:00 Christi= an Franke <span dir=3D"ltr"><<a href=3D"mailto:Christian.Franke@t-online= .de" target=3D"_blank">[email protected]</a>></span><wbr>:<br= ><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border= -left:1px solid rgb(204,204,204);padding-left:1ex">Michael Woon wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left:1px solid rgb(204,204,204);padding-left:1ex"><span class=3D"m_36470348= 6472493541m_-4950706988384389454gmail-"> Hi Smartmontools devs,<br> <br> <br> I'm writing for a bit of clarity about self-tests and what records they= produce, and the smart health call.<br> <br> <br> As I understand from the documentation, calling "smartctl -H":<br= > <br></span> -returns the result of the SMART RETURN STATUS command -/or- /checks if any= ATA attributes exceed thresholds in ATA drives<br> </blockquote> <br> Yes.<span class=3D"m_364703486472493541m_-4950706988384389454gmail-"><br> <br> <br> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left:1px solid rgb(204,204,204);padding-left:1ex"> -checks for any error codes in the SCSI sense buffer.<br> <br> </blockquote> <br></span> It checks ASC/ASCQ in SCSI IE log page (if supported) or in result of REQUE= ST SENSE command.<br> <br> Most remaining answers are for ATA/SATA only. SCSI/SAS differs considerably= . Some SCSI expert on this list might want to answer.<span class=3D"m_36470= 3486472493541m_-4950706988384389454gmail-"><br> <br> <br> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left:1px solid rgb(204,204,204);padding-left:1ex"> As I understand from the documentation, fore- and back-ground checks update= the self-test error log and certain ATA attributes, when they run.<br> </blockquote> <br></span> There is no ATA "self-test error log". On completion of a self-te= st, a new entry is usually added to the ATA self-test log(s). The ATA error= log(s) are typically not updated on read errors found during a self-test.<= span class=3D"m_364703486472493541m_-4950706988384389454gmail-"><br> <br> <br> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left:1px solid rgb(204,204,204);padding-left:1ex"> My main questions are:<br> <br> -what does SMART RETURN STATUS evaluate?<br> </blockquote> <br></span> Anything the author of the drive firmware decided to evaluate :-)<br> <br> Recent versions of ATA ACS standards say:<br> "The SMART RETURN STATUS command causes the device to communicate the = reliability status of the device to the host."<br> If command returns failure(0x2c,0xf4): "The device has detected a thre= shold exceeded condition."<br> <br> Note that ATA SMART Attributes are not part of the standard. The SMART READ= THRESHOLDS command was declared obsolete in ATA-4 (1998).<span class=3D"m_= 364703486472493541m_-4950706988384389454gmail-"><br> <br> <br> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left:1px solid rgb(204,204,204);padding-left:1ex"> <br> alternatively stated:<br> -does the command -only- look at ATA attributes stored in the table and err= or codes in the SCSI sense buffer? or is the content of the self-test error= log also a factor?<br> <br> </blockquote> <br></span> SMART RETURN STATUS does not return failure if any Read/Write error occured= . It usually will return failure if the number of spare blocks for realloca= tion is below some threshold.<span class=3D"m_364703486472493541m_-49507069= 88384389454gmail-"><br> <br> <br> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left:1px solid rgb(204,204,204);padding-left:1ex"> bottom line:<br> -If I want to be sure of the health of a disk, can I trust the smart health= status (to include the result of the self-tests) or do I have to look at -= both- the health status and the self-test error log?<br> </blockquote> <br></span> If you want to proactively replace drives, I would recommend to watch the n= umber of reallocated sectors (e.g. use smartd with '-R 9! -r 9!' di= rective). A failing SMART STATUS may occur (too?) late.<span class=3D"m_364= 703486472493541m_-4950706988384389454gmail-"><br> <br> <br> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left:1px solid rgb(204,204,204);padding-left:1ex"> <br> or do I have the wrong angle on this:<br> -simply watch for a '0' exit code for an "all okay"?<br> <br> </blockquote> <br></span> It depends, see above.<span class=3D"m_364703486472493541m_-495070698838438= 9454gmail-"><br> <br> <br> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left:1px solid rgb(204,204,204);padding-left:1ex"> minor questions about the exit codes:<br> -is it possible to have a set bit 3 (device failing) without a set bit 4 (a= ttributes over threshold), and vice versa?<br> </blockquote> <br></span> Yes: if SMART RETURN STATUS returned failure but there is no attribute <= =3D threshold in the SMART DATA block, the SMART READ THRESHOLD command did= not work, etc...<span class=3D"m_364703486472493541m_-4950706988384389454g= mail-"><br> <br> <br> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left:1px solid rgb(204,204,204);padding-left:1ex"> -at what point does a SCSI drive set the 6th bit in the error code? I have = drives (SAS) that have some errors in their smartctl output, but don't = set this bit when smartctl is run on them.<br> </blockquote> <br></span> For some historic reason, bit 6 was never implemented for SCSI.<span class= =3D"m_364703486472493541m_-4950706988384389454gmail-"><br> <br> <br> <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left:1px solid rgb(204,204,204);padding-left:1ex"> -does bit 7 really only work for SATA drives? (SCSI drives have a self test= log too)<br> </blockquote> <br></span> Yes, it works "better" for ATA because newer long tests without e= rror clear the bit.<br> <br> Thanks,<br> Christian<br> <br> </blockquote></div><br></div></div></div></div> </blockquote></div><br></div> --001a114098d4981ae70546c3ee1a-- --===============4107735842876405519== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot --===============4107735842876405519== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Smartmontools-support mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/smartmontools-support --===============4107735842876405519==--