linux - How to understand this messages in /var/log/messages?

06
2014-04
  • lxgeek

    the messages is:

    Dec 18 10:08:55 localhost kernel: sdb: Current [descriptor]: sense key: Recovered Error
    Dec 18 10:08:55 localhost kernel:     Add. Sense: ATA pass through information available
    Dec 18 10:08:55 localhost kernel: 
    Dec 18 10:08:55 localhost kernel: Descriptor sense data with sense descriptors (in hex):
    Dec 18 10:08:55 localhost kernel:         72 01 00 1d 00 00 00 0e 09 0c 00 00 00 00 00 00 
    Dec 18 10:08:55 localhost kernel:         00 4f 00 c2 00 50 
    

    How to understand this messages ? Thank you

  • Answers
  • davidgo

    This relates to a transient issue on a disk drive (which is implied by the error message and the "hdb"). Its difficult to advise more then that, but it could be an error reading the disk while its spinning up or something like that - It could also be a driver error or slight incompatibility.

    It might be useful to advise what kind of disks you have, what kernel and what configuration - although I'm not sure its anything worth spending time on.

  • MariusMatutiae

    It is mostly harmless. Google is full of people reporting no errors recovered by SMART, after seeing this so-called error.

    James Bottomley (if you do not know who he is, you may read it here, but in any case he is one of the top Linux Kernel developers) says, about this error:

    This is a message the kernel prints out on all recovered error returns (except those marked REQ_QUIET). It's purely informational and doesn't affect return processing of the command at all, so the kernel is actually treating this as a successful completion not an error.

    He states this on this Bugzilla page, where he also says it is easy to quiet the error message:

      diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
      index f3c4089..a0235c9 100644
      --- a/drivers/scsi/scsi_lib.c
      +++ b/drivers/scsi/scsi_lib.c
      @@ -774,7 +774,8 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
     * is what gets returned to the user
     */
    if (sense_valid && sshdr.sense_key == RECOVERED_ERROR) {
      -     if (!(req->cmd_flags & REQ_QUIET))
      +     if (!(req->cmd_flags & REQ_QUIET) &&
      +         !(sshdr.asc == 0x00 && sshdr.ascq == 0x1d))
            scsi_print_sense("", cmd);
        result = 0;
        /* BLOCK_PC may have set error */
    

    I think you may relax, now.


  • Related Question

    linux - How to change log level in /var/log/messages?
  • Questioner

    SLES10 sp2

    Does anyone know of a way to change the log level in the /var/log/messages file.

    I have so many (what support calls cosmetic errors) logging to this file it is driving me crazy.


  • Related Answers
  • vava

    Sure, edit /etc/syslog.conf. There's a line

    *.=info;*.=notice;*.=warning;\
        auth,authpriv.none;\
        cron,daemon.none;\
        mail,news.none		-/var/log/messages
    

    remove *.=notice or *.=info or tweak it as you want.

    $ man syslog.conf
    

    will give you all the options you can use.

    Don't forget to restart syslog daemon for changes to take effect.

  • Teddy

    It depends on what syslog daemon you are using. From your comment about using syslog-ng I'd guess you should change this section in /etc/syslog-ng/syslog-ng.conf:

    filter f_messages {
            level(info,notice,warn)
                and not facility(auth,authpriv,cron,daemon,mail,news);
    };
    

    Per the other comment, you could try removing "info,notice" on the "level()" line.

    (I’m guessing you are looking for something specific in /var/log/messages and having trouble finding it among all the other stuff? If that’s the case, what you really ought to be doing is creating your own log file with exactly the messages you want. This might be a little tricky and require some reading of the dreaded manuals, of course.)