SUSE Support

Here When You Need Us

scsi_eh messages when ejecting media from SATA CD/DVD drives

This document (7002774) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 10

Situation

After ejecting the media from some SATA CD/DVD drives, many SCSI messages can be seen in /var/log/messages. The messages look similar to the following:

Jan 11 05:22:58 fs1 kernel: Error handler scsi_eh_1 waking up
Jan 11 05:22:58 fs1 kernel: scsi_eh_1: flush finish cmd: ffff810222cbe9c0
Jan 11 05:22:58 fs1 kernel: scsi_restart_operations: waking up host to restart
Jan 11 05:22:58 fs1 kernel: Error handler scsi_eh_1 waking up
Jan 11 05:22:58 fs1 kernel: scsi_eh_1: flush finish cmd: ffff810222cbe9c0
Jan 11 05:22:58 fs1 kernel: scsi_restart_operations: waking up host to restart

Resolution

These messages are caused by hald (hardware abstraction layer daemon) polling the CD/DVD device for media detection purposes. These messages do not indicate a problem, and should not result in any performance hit on modern hardware. However, it is possible to disable polling on a by-device basis. Please see the next sections for additional background information on this subject, and steps to disabling polling on a specific device.

More Information:
In these messages, EH stands for "E"xception "H"andling which includes SCSI sense data requisition.  Several old SCSI drivers handle sense data requisition in this manner. ATAPI resembles these drivers in this respect as ATAPI CHECK_SENSE does not have an automatic way to acquire sense data. The resolution to this was to implement sense acquisition via exception handling. 

This implementation results in scsi_eh, which hosts libata eh, being invoked for any ATAPI command which finishes with CHECK SENSE and TEST UNIT READY. On a drive without media inserted hald polling will always result in CHECK SENSE with the sense data being NOT READY - media not present.

Disabling hald Polling:
In internal testing, polling and scsi_eh being invoked does not make any measurable difference in performance on modern machines.  However, if the machine is heavily loaded IO-wise and the hard drive is sharing a channel with the optical drive, there could be some small impact on performance. If a server is in this configuration, or the scsi_eh messages are too intrusive, it is possible to create a policy for hald which disables polling on this device. The following steps can be followed to implement this:
  1. Determine the "storage.model" string for the problem optical drive.
    • This can be obtained using the following command and sample (truncated) output:
      #  hwinfo --cdrom
      26: IDE 00.0: 10602 CD-ROM (DVD)                               
        [Created at block.198]                                       
        UDI: /org/freedesktop/Hal/devices/storage_model_HL_DT_ST_DVD_ROM_GDRH20N
        Unique ID: Fffu.cg_k0bfMPK1                                              
        .....
        Hardware Class: cdrom
        Model: "DVD-ROM GDRH20N"
        Vendor: "HL-DT-ST"
       
  2. Create a custom "fdi" file which disables polling.
    • Use the following file as a temple, replacing the "storage.model" string with the "MODEL" string from the hwinfo output:

      <?xml version="1.0" encoding="UTF-8"?>

      <deviceinfo version="0.2">
        <device>
          <match key="storage.model" string="DVD-ROM GDRH20N">
            <merge key="storage.media_check_enabled" type="bool">false</merge>
          </match>
        </device>
      </deviceinfo>
       
  3. Save the "fdi" file as /usr/share/hal/fdi/policy/10osvendor/01-disable-cdrom.fdi
     
  4. Restart hal using:
              # rchal restart
     
  5. Check the output of `lshal` to see if the optical device has the "storage.media_check_enabled" key set to "false".
     
  6. Monitor /var/log/messages to confirm the polling messages have stopped.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7002774
  • Creation Date: 19-Mar-2009
  • Modified Date:05-Mar-2021
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.