Illegal Request SCSI errors with ext4
Environment
- Red Hat Enterprise Linux 5
- iSCSI storage enclosure
- EXT4 filesystem
Issue
- System using ext4 filesystem experiences regular scsi errors.
kernel: FAILED
kernel: status = 1, message = 00, host = 0, driver = 08
kernel: <6>sd: Current: sense key: Illegal Request
kernel: <<vendor>> ASC=0x94 ASCQ=0x1ASC=0x94 ASCQ=0x1
Resolution
- Disabling barrier usage prevents the errors by not causing the
SYNCHRONIZE_CACHEcommand to be sent. Addbarrier=0as a mount option to ext4 mounts.
Root Cause
- The error messages are due to a storage enclosure rejecting the
SYNCHRONIZE_CACHEscsi command. TheSYNCHRONIZE_CACHEcommand is used for scsi devices to function as a write barrier. If the storage hardware doesn't accept or understand this command, an error will be generated every time one is sent.
Diagnostic Steps
- The exact error message is from
sd_sync_cache()indriver/scsi/sd.c. It will have thesd:prefix on the first line with the sense information.
printk(KERN_WARNING "FAILED\n status = %x, message = %02x, "
"host = %d, driver = %02x\n ",
status_byte(res), msg_byte(res),
host_byte(res), driver_byte(res));
if (driver_byte(res) & DRIVER_SENSE)
scsi_print_sense_hdr("sd", &sshdr);
SBR
Product(s)
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.