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
Situation
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
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:
- 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"
- This can be obtained using the following command and sample (truncated) output:
- 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>
- Use the following file as a temple, replacing the "storage.model" string with the "MODEL" string from the hwinfo output:
- Save the "fdi" file as /usr/share/hal/fdi/policy/10osvendor/01-disable-cdrom.fdi
- Restart hal using:
# rchal restart
- Check the output of `lshal` to see if the optical device has the "storage.media_check_enabled" key set to "false".
- 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
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com