Latest working kernel version: Unknown Earliest failing kernel version: pre 2.6.19 Distribution: gentoo Hardware Environment: x86 Software Environment: Problem Description: I have a failing disk drive, and in one type of USB-IDE adaptor bad sectors are not being handled correctly. This is probably becasue the USB-IDE converter doesn't seem to report errors from reading bad sectors in the "proper" way, but it does give plenty of evidence that something is wrong and that the sector cannot be read. Alan Stern gave a nice summary here: http://marc.info/?l=linux-scsi&m=122903295704381&w=2 Various recent kernels seem to do different things when attempting to read the bad disk: - 2.6.26 read the whole disk without reporting errors - 2.6.27 gets in a very long (or possibly infinite) loop - 2.6.28 gets a bit stuck on the bad sectors, taking several minutes to timeout, and still does not report error Steps to reproduce: Attempt to read bad sectors from a disk drive via a newlink IDE/SATA to USB disk adaptor.
Created attachment 19330 [details] Usbmon log for access to bad sector via usb-ide adaptor These are the kernel messages from insertion of the usb drive to the end of the dd command for one bad sector corresponding to the usbmon log attached: Dec 12 15:26:49 daniel root: uname: Linux daniel 2.6.28-rc8 #1 PREEMPT Fri Dec 12 14:49:40 GMT 2008 i686 AMD Sempron(tm) Processor 2800+ AuthenticAMD GNU/Linux Dec 12 15:26:49 daniel root: About to insert disk Dec 12 15:27:04 daniel usb 1-3: new high speed USB device using ehci_hcd and address 4 Dec 12 15:27:04 daniel usb 1-3: configuration #1 chosen from 1 choice Dec 12 15:27:04 daniel scsi6 : SCSI emulation for USB Mass Storage devices Dec 12 15:27:04 daniel usb-storage: device found at 4 Dec 12 15:27:04 daniel usb-storage: waiting for device to settle before scanning Dec 12 15:27:04 daniel usb 1-3: New USB device found, idVendor=07ff, idProduct=00ff Dec 12 15:27:04 daniel usb 1-3: New USB device strings: Mfr=10, Product=11, SerialNumber=5 Dec 12 15:27:04 daniel usb 1-3: Product: USB20 Dec 12 15:27:04 daniel usb 1-3: Manufacturer: USBID Dec 12 15:27:04 daniel usb 1-3: SerialNumber: 7D5773691612 Dec 12 15:27:09 daniel scsi 6:0:0:0: Direct-Access WDC AC22 000L 1N37 PQ: 0 ANSI: 2 CCS Dec 12 15:27:09 daniel sd 6:0:0:0: [sdb] 3907008 512-byte hardware sectors: (2.00 GB/1.86 GiB) Dec 12 15:27:09 daniel sd 6:0:0:0: [sdb] Write Protect is off Dec 12 15:27:09 daniel sd 6:0:0:0: [sdb] Mode Sense: 00 38 00 00 Dec 12 15:27:09 daniel sd 6:0:0:0: [sdb] Assuming drive cache: write through Dec 12 15:27:09 daniel sd 6:0:0:0: [sdb] 3907008 512-byte hardware sectors: (2.00 GB/1.86 GiB) Dec 12 15:27:09 daniel sd 6:0:0:0: [sdb] Write Protect is off Dec 12 15:27:09 daniel sd 6:0:0:0: [sdb] Mode Sense: 00 38 00 00 Dec 12 15:27:09 daniel sd 6:0:0:0: [sdb] Assuming drive cache: write through Dec 12 15:27:09 daniel sdb: unknown partition table Dec 12 15:27:09 daniel sd 6:0:0:0: [sdb] Attached SCSI disk Dec 12 15:27:09 daniel sd 6:0:0:0: Attached scsi generic sg2 type 0 Dec 12 15:27:09 daniel usb-storage: device scan complete Dec 12 15:27:16 daniel root: About to do dd of a known bad sector Dec 12 15:27:27 daniel sd 6:0:0:0: [sdb] Sense Key : 0x0 [current] Dec 12 15:27:27 daniel sd 6:0:0:0: [sdb] ASC=0x0 ASCQ=0x0 Dec 12 15:27:46 daniel sd 6:0:0:0: [sdb] Sense Key : 0x0 [current] Dec 12 15:27:46 daniel sd 6:0:0:0: [sdb] ASC=0x0 ASCQ=0x0 Dec 12 15:28:00 daniel sd 6:0:0:0: [sdb] Sense Key : 0x0 [current] Dec 12 15:28:00 daniel sd 6:0:0:0: [sdb] ASC=0x0 ASCQ=0x0 Dec 12 15:28:05 daniel root: dd done
f1a0743bc0e7a30c032b1eb78f6a2b0f805b4597