Subject: linux-image-2.6.18-4-686: USB HD gives I/O errors while spinning up Package: linux-image-2.6.18-4-686 Version: 2.6.18.dfsg.1-12 Severity: important
I recently purchased a Seagate FreeAgent hard drive. Seagate sets the drive to spin down after about 15 minutes if there is no activity. There is no way to change this setting on the drive. The drive works well until it spins down. It looks like the first I/O sent to the drive after it spins down fails. Here are the relevant lines from the initialization: SCSI subsystem initialized Initializing USB Mass Storage driver... usb 4-3: new high speed USB device using ehci_hcd and address 4 usb 4-3: configuration #1 chosen from 1 choice scsi0 : SCSI emulation for USB Mass Storage devices usb-storage: device found at 2 usb-storage: waiting for device to settle before scanning scsi1 : SCSI emulation for USB Mass Storage devices usbcore: registered new driver usb-storage USB Mass Storage support registered. usb-storage: device found at 4 usb-storage: waiting for device to settle before scanning hdc: SAMSUNG CD-ROM SC-148, ATAPI CD/DVD-ROM drive usb 1-2: new full speed USB device using uhci_hcd and address 3 usb 1-2: configuration #1 chosen from 1 choice hub 1-2:1.0: USB hub found hub 1-2:1.0: 4 ports detected SCSI device sda: 625142448 512-byte hdwr sectors (320073 MB) sda: Write Protect is off sda: Mode Sense: 1c 00 00 00 sda: assuming drive cache: write through SCSI device sda: 625142448 512-byte hdwr sectors (320073 MB) sda: Write Protect is off sda: Mode Sense: 1c 00 00 00 sda: assuming drive cache: write through sda: sda1 sd 0:0:0:0: Attached scsi disk sda After I mount a filesystem, wait 16 minutes, and then attempt to access it: EXT3 FS on sda1, internal journal EXT3-fs: mounted filesystem with ordered data mode. sd 0:0:0:0: Device not ready: <6>: Current: sense key: Not Ready Additional sense: Logical unit not ready, initializing command required end_request: I/O error, dev sda, sector 623378511 EXT3-fs error (device sda1): ext3_get_inode_loc: unable to read inode block - inode=38961153, block=77922306 Aborting journal on device sda1. sd 0:0:0:0: Device not ready: <6>: Current: sense key: Not Ready Additional sense: Logical unit not ready, initializing command required end_request: I/O error, dev sda, sector 4375 printk: 119 messages suppressed. Buffer I/O error on device sda1, logical block 539 lost page write due to I/O error on sda1 sd 0:0:0:0: Device not ready: <6>: Current: sense key: Not Ready Additional sense: Logical unit not ready, initializing command required end_request: I/O error, dev sda, sector 63 Buffer I/O error on device sda1, logical block 0 lost page write due to I/O error on sda1 I spent some time looking through the kernel source, and I found an interesting note in scsi_eh_stu: If commands are failing due to not ready, initializing command required, try revalidating the device, which will end up sending a start unit. I wasn't able to follow the usb-storage code well enough to know if this command is being issued. I do know that the drive starts to work about 7 seconds after all of these error messages come out. I assume that this is the amount of time that it needs to spin up. I see similar behavior on older kernels (including the current version of 2.6.8 that shipped with Sarge). I see a long pause when the drive spins up under Windows, but I don't get I/O errors from the system. I'd be willing to investigate further, but it would help to know a bit more about what error handling routine is running. I have done some kernel programming in the past, but the USB code is a bit new. Thanks for your help, Greg -- System Information: Debian Release: 4.0 APT prefers stable APT policy: (500, 'stable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-4-686 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Versions of packages linux-image-2.6.18-4-686 depends on: ii coreutils 5.97-5.3 The GNU core utilities ii debconf [debconf-2.0] 1.5.11 Debian configuration management sy ii initramfs-tools [linux-initra 0.85g tools for generating an initramfs ii module-init-tools 3.3-pre4-2 tools for managing Linux kernel mo ii yaird [linux-initramfs-tool] 0.0.12-18 Yet Another mkInitRD Versions of packages linux-image-2.6.18-4-686 recommends: ii libc6-i686 2.3.6.ds1-13 GNU C Library: Shared libraries [i -- debconf information: linux-image-2.6.18-4-686/preinst/failed-to-move-modules-2.6.18-4-686: * linux-image-2.6.18-4-686/preinst/lilo-initrd-2.6.18-4-686: false linux-image-2.6.18-4-686/preinst/elilo-initrd-2.6.18-4-686: true linux-image-2.6.18-4-686/preinst/overwriting-modules-2.6.18-4-686: true * linux-image-2.6.18-4-686/prerm/removing-running-kernel-2.6.18-4-686: true linux-image-2.6.18-4-686/prerm/would-invalidate-boot-loader-2.6.18-4-686: true linux-image-2.6.18-4-686/postinst/bootloader-test-error-2.6.18-4-686: linux-image-2.6.18-4-686/preinst/abort-overwrite-2.6.18-4-686: linux-image-2.6.18-4-686/postinst/old-system-map-link-2.6.18-4-686: true linux-image-2.6.18-4-686/postinst/depmod-error-2.6.18-4-686: false linux-image-2.6.18-4-686/preinst/abort-install-2.6.18-4-686: linux-image-2.6.18-4-686/postinst/depmod-error-initrd-2.6.18-4-686: false linux-image-2.6.18-4-686/postinst/old-initrd-link-2.6.18-4-686: true linux-image-2.6.18-4-686/preinst/bootloader-initrd-2.6.18-4-686: true linux-image-2.6.18-4-686/preinst/already-running-this-2.6.18-4-686: linux-image-2.6.18-4-686/postinst/old-dir-initrd-link-2.6.18-4-686: true linux-image-2.6.18-4-686/postinst/kimage-is-a-directory: shared/kernel-image/really-run-bootloader: true linux-image-2.6.18-4-686/preinst/lilo-has-ramdisk: linux-image-2.6.18-4-686/postinst/bootloader-error-2.6.18-4-686: linux-image-2.6.18-4-686/preinst/initrd-2.6.18-4-686: * linux-image-2.6.18-4-686/postinst/create-kimage-link-2.6.18-4-686: true -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]