[Repaired] Bad blocks cause kernel blocking to the device

I got
May 10 10:08:13 qslap kernel: sd 4:0:0:0: [sdb] Unhandled sense code
May 10 10:08:13 qslap kernel: sd 4:0:0:0: [sdb] Result: hostbyte=0x00 driverbyte=0x08
May 10 10:08:13 qslap kernel: sd 4:0:0:0: [sdb] Sense Key : 0x3 [current]
May 10 10:08:13 qslap kernel: sd 4:0:0:0: [sdb] ASC=0x14 ASCQ=0x0
May 10 10:08:13 qslap kernel: sd 4:0:0:0: [sdb] CDB: cdb[0]=0x28: 28 00 25 42 ea af 00 00 01 00
May 10 10:08:13 qslap kernel: end_request: I/O error, dev sdb, sector 625142447
May 10 10:08:13 qslap kernel: Buffer I/O error on device sdb, logical block 78142805
in system log when I try to access /dev/sdb in some way (for example, plug in, fdisk, gparted, but not palimpsest).
This kind of log repeats several times and blocks any access to that device for tens of seconds (Seems kernel keep retrying, not give up the first time), which is annoying.
From palimpsest, I can see:
Current Pending Sector Count: Value: 1 sector
Uncorrectable Sector Count: Value: 1 sector
It says when write fails, "Current Pending Sector" will be remapped automatically by hardware.
I got the sector size = 512 bytes:
# fdisk -lu /dev/sdb
Disk /dev/sdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xaaaaaaaa
Disk /dev/sdb doesn't contain a valid partition table
badblocks detects the bad sector well:
# badblocks -svw -b 512 /dev/sdb 625142447 625142447
Checking for bad blocks in read-write mode
From block 625142447 to 625142447
Testing with pattern 0xaa: 625142447one, 0:20 elapsed
done
Reading and comparing: done
Testing with pattern 0x55: done
Reading and comparing: done
Testing with pattern 0xff: done
Reading and comparing: done
Testing with pattern 0x00: done
Reading and comparing: done
Pass completed, 1 bad blocks found.
From above, you can see that write a block one time takes 20 seconds due to kernel blocking.
badblocks writes 4 times,  ~80 seconds.
Note: badblocks doesn't find any bad blocks when performing a full disk read-only test.
However, the sector wasn't automatically remapped (badblocks has already written that sector)
the kernel is still generating logs and blocking, which is very annoying.
I also tried to write at that sector directly, no luck:
# dd if=/dev/zero of=/dev/sdb bs=512 count=1 seek=625142447
dd: writing `/dev/sdb': Input/output error
1+0 records in
0+0 records out
0 bytes (0 B) copied, 7.26951 s, 0.0 kB/s
What should I do to let the hardware remap that sector?
If no way due to hardware limitation, then how can I mute the annoying log and let the kernel not blocking ?
Additional: I am looking for a way to let kernel not blocking, give up at the begining asap, or let the hardware SMART mark that sector not to be 'Pending', not for a way to create fs with bad blocks marked.
I know if I provide a list of badblocks to mkfs.*** to create a fs, these blocks will not be used.
However, when I plug in the removable harddisk, BEFORE performing ANY r/w instructions, the kernel starts to generate logs and /dev/sdb is not visible in tens of seconds. Same situation occurs when I run / fdisk / gparted (these programs are not responsible for tens of seconds due to kernel blocking) ...
I guess that SMART does these checks automatically and cause kernel blocking, while SMART can't handle these things well.
This is the output of smartctl -a /dev/sdb -d sat, which may be helpful:
smartctl 5.39.1 2010-01-28 r3054 [i686-pc-linux-gnu] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF INFORMATION SECTION ===
Model Family: Seagate Momentus 5400.5 series
Device Model: ST9320320AS
Serial Number: 5SX3YFQ8
Firmware Version: SD03
User Capacity: 320,072,933,376 bytes
Device is: In smartctl database [for details use: -P show]
ATA Version is: 8
ATA Standard is: ATA-8-ACS revision 4
Local Time is: Mon May 10 11:25:42 2010 CST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
See vendor-specific Attribute list for marginal Attributes.
General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 121) The previous self-test completed having
the read element of the test failed.
Total time to complete Offline
data collection: ( 700) seconds.
Offline data collection
capabilities: (0x73) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
No Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 114) minutes.
Conveyance self-test routine
recommended polling time: ( 2) minutes.
SCT capabilities: (0x103f) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 094 088 006 Pre-fail Always - 182650280
3 Spin_Up_Time 0x0003 099 099 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 595
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 0
7 Seek_Error_Rate 0x000f 075 060 030 Pre-fail Always - 30942693
9 Power_On_Hours 0x0032 095 095 000 Old_age Always - 4482
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 1
12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 579
184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0
187 Reported_Uncorrect 0x0032 001 001 000 Old_age Always - 1812
188 Command_Timeout 0x0032 100 099 000 Old_age Always - 2
189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0022 067 039 045 Old_age Always In_the_past 33 (0 166 39 23)
191 G-Sense_Error_Rate 0x0032 100 100 000 Old_age Always - 98
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 48
193 Load_Cycle_Count 0x0032 011 011 000 Old_age Always - 178621
194 Temperature_Celsius 0x0022 033 061 000 Old_age Always - 33 (0 12 0 0)
195 Hardware_ECC_Recovered 0x001a 060 039 000 Old_age Always - 182650280
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 1
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 1
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
SMART Error Log Version: 1
ATA Error Count: 1979 (device log contains only the most recent five errors)
CR = Command Register [HEX]
FR = Features Register [HEX]
SC = Sector Count Register [HEX]
SN = Sector Number Register [HEX]
CL = Cylinder Low Register [HEX]
CH = Cylinder High Register [HEX]
DH = Device/Head Register [HEX]
DC = Device Command Register [HEX]
ER = Error register [HEX]
ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.
Error 1979 occurred at disk power-on lifetime: 4480 hours (186 days + 16 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
25 da 01 ff ff ff 4f 00 13:43:15.498 READ DMA EXT
25 da 01 ff ff ff 4f 00 13:43:13.155 READ DMA EXT
25 da 01 ff ff ff 4f 00 13:43:10.887 READ DMA EXT
25 da 01 ff ff ff 4f 00 13:43:10.887 READ DMA EXT
25 da 01 ff ff ff 4f 00 13:43:10.886 READ DMA EXT
Error 1978 occurred at disk power-on lifetime: 4480 hours (186 days + 16 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
25 da 01 ff ff ff 4f 00 13:43:13.155 READ DMA EXT
25 da 01 ff ff ff 4f 00 13:43:10.887 READ DMA EXT
25 da 01 ff ff ff 4f 00 13:43:10.887 READ DMA EXT
25 da 01 ff ff ff 4f 00 13:43:10.886 READ DMA EXT
25 da 01 ff ff ff 4f 00 13:43:10.886 READ DMA EXT
Error 1977 occurred at disk power-on lifetime: 4480 hours (186 days + 16 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
25 da 01 ff ff ff 4f 00 13:43:10.887 READ DMA EXT
25 da 01 ff ff ff 4f 00 13:43:10.887 READ DMA EXT
25 da 01 ff ff ff 4f 00 13:43:10.886 READ DMA EXT
25 da 01 ff ff ff 4f 00 13:43:10.886 READ DMA EXT
25 da 01 ff ff ff 4f 00 13:43:10.885 READ DMA EXT
Error 1976 occurred at disk power-on lifetime: 4480 hours (186 days + 16 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
25 da 01 ff ff ff 4f 00 13:43:08.457 READ DMA EXT
25 da 01 ff ff ff 4f 00 13:43:06.082 READ DMA EXT
25 da 01 ff ff ff 4f 00 13:43:03.814 READ DMA EXT
25 da 01 ff ff ff 4f 00 13:43:03.813 READ DMA EXT
25 da 01 ff ff ff 4f 00 13:43:03.813 READ DMA EXT
Error 1975 occurred at disk power-on lifetime: 4480 hours (186 days + 16 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
25 da 01 ff ff ff 4f 00 13:43:06.082 READ DMA EXT
25 da 01 ff ff ff 4f 00 13:43:03.814 READ DMA EXT
25 da 01 ff ff ff 4f 00 13:43:03.813 READ DMA EXT
25 da 01 ff ff ff 4f 00 13:43:03.813 READ DMA EXT
25 da 01 ff ff ff 4f 00 13:43:03.813 READ DMA EXT
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Extended offline Completed: read failure 90% 4480 625142447
# 2 Short offline Completed: read failure 90% 4474 625142447
# 3 Extended offline Completed: read failure 90% 4474 625142447
# 4 Short offline Completed: read failure 90% 4474 625142447
# 5 Conveyance offline Completed: read failure 90% 4473 625142447
# 6 Short offline Completed: read failure 90% 4473 625142447
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
Last edited by b6fan (2010-05-10 07:18:46)

Bad block repaired by SeaTools for DOS.
Seems only SeaTools for DOS can repair this issue.

Similar Messages

  • Mac pro 13'' harddisk makes noises when writing and reading data, but Techtool scanning result shows no bad blocks in the disk, that is normal?

    I bought my Mac pro 13 inch, i7 processor and 750G storage 20th November 2012. But I found when copy into or out the Mac, the harddisk makes noises, like bitting something. I thought there are bad blocks in the disk, but the result of Techtool scanning is no bad blocks in disk, and giving a passed conclusion.
    I went the apple store for testing, and the repairmen told me there are two choices available for me:1) replace the harddisk 2) back to the store i bought machine from for a new one. i think that the machine only bought few days, it had better not be disassembled, so i went back for a new one. unfortunately, the new one makes more noises than my old one. i don't know why like apple named brands notebooks have such problems.  did you undergo this experience ?

    All of the HDDs, be they in my MBPs or enclosures are barely audible.  I would say the you deserve no less.  I suggest that you do not leave until you are satisfied with a near silent HDD.
    Why you got two in a row is a puzzle, but then some people beat the odds and win the lottery.  In your case the results are not exactly positive.  All HDDs eventually fail, and some fail sooner than others.  At least you should start with a quiet one.
    Good luck.
    Ciao.

  • Trying to install/format an INTERNAL hard drive using Disk Utility gives me "Error: -69760: Unable to write to the last block of the device".   Is that a hardware problem and what could be done about it?

    *** PLEASE NOTE*** - This is a query about an INTERNAL HDD not an external one. Thanks.
    My Mac is a late 2009 model and the current hard drive recently failed. So I bought a new one, exactly the same, albeit 750gb instead of 500gb. The HDD is a Seagate Momentus 7200. Before the my current drive failed I made a time machine back up to an external USB HDD. I've inserted the HDD into the bottom of my Mac, plugged in the USB and started my machine pressing the 'Option' ([ALT]) key. I go into Disk Utility to try and format the new HDD by creating a new partition but I keep getting the messages,
    "Error: -69760: Unable to write to the last block of the device"
    or
    "POSIX: could not allocate memory"
    This is actaully the third HDD I've tried. The first was another Seagate Momentus 7200 500gb, but this time it was a newer model (model number ended in 423AS instead of 420AS - the new one I am trying ends with 420AS, which is the same as the current HDD). I then tried a Western Digital drive but that one didn't even show up in DU. Forums and tech support are suggesting it's faults with the HDDs but surely not three in a row?
    Could this be an issue with another part of my Mac?
    Is there anything else I can do to format the HDD, have I missed a crucial step?

    Did you ever get a resolution to this issue?
    I am having that exact error with a new 512GB SSD from Crucial, in a 15" MBP mid-2010.
    I really wonder now if the stupid SATA cable could be bad - causing the initial SSD fail.  I am replacing it with the EXACT same drive, and getting that "last block" error when i partition in the GUI or from command-line.
    thanks!

  • External USB hard drive won't reformat, won't appear in Finder, error: Unable to write to the last block of the device message

    So I just got a new MacBook Air and since I had an external USB hard drive (TOSHIBA MQ01ABD100 1TB) lying around, I decided to use it for back-up. Since I only have just the one hard drive, I decided to partition it into two - one for Time Machine backups, and one for general files (formatted FAT so I could use it with Windows). However, the partitioning failed and I ended up with a partition named disk1s2. Plus, it won't appear on Finder anymore, but it appears in Disk Utility.
    I have tried to reformat it, but I always get the message "Unable to write to the last block of the device".
    Here's the info about my drive:
    Name: TOSHIBA MQ01ABD100 Media
    Type: Disk
    Partition Map Scheme: GUID Partition Table
    Disk Identifier: disk1
    Media Name: TOSHIBA MQ01ABD100 Media
    Media Type: Generic
    Connection Bus: USB
    USB Serial Number: 1220069C
    Device Tree: IODeviceTree:/PCI0@0/XHC@14
    Writable: Yes
    Ejectable: Yes
    Location: External
    Total Capacity: 1 TB
    Disk Number: 1
    Partition Number: 0
    S.M.A.R.T. Status: Not Supported
    And here's for disk1s2:
    Name: disk1s2
    Type: Partition
    Disk Identifier: disk1s2
    Mount Point: Not mounted
    File System: Mac OS Extended
    Connection Bus: USB
    Device Tree: IODeviceTree:/PCI0@0/XHC@14
    Writable: Yes
    Capacity: 999.86 GB
    Owners Enabled: No
    Can Turn Owners Off: Yes
    Can Be Formatted: Yes
    Bootable: Yes
    Supports Journaling: Yes
    Journaled: No
    Disk Number: 1
    Partition Number: 2
    Here's what it says when I run diskutil in Terminal:
    Device Identifier:        disk1
    Device Node:              /dev/disk1
    Part of Whole:            disk1
    Device / Media Name:      TOSHIBA MQ01ABD100 Media
    Volume Name:              Not applicable (no file system)
    Mounted:                  Not applicable (no file system)
    File System:              None
    Content (IOContent):      GUID_partition_scheme
    OS Can Be Installed:      No
    Media Type:               Generic
    Protocol:                 USB
    SMART Status:             Not Supported
    Total Size:               1.0 TB (1000204884480 Bytes) (exactly 1953525165 512-Byte-Units)
    Volume Free Space:        Not applicable (no file system)
    Device Block Size:        512 Bytes
    Read-Only Media:          No
    Read-Only Volume:         Not applicable (no file system)
    Ejectable:                Yes
    Whole:                    Yes
    Internal:                 No
    OS 9 Drivers:             No
    Low Level Format:         Not supported
    I didn't have any data in it prior to the failed partitioning attempt, so there aren't any worries of data recovery. But I'd really like to be able to use this drive again, and save some money (external hard drives are expensive where I live). Anyone with any ideas?

    I'd also like to add that repairing the disk using Disk Utility does nothing but tell me to reformat the drive. So I'm stuck in a loop here.

  • Disk Utility Error "Unable to write to the last block of the device"

    I have a WD Caviar Black 1TB drive in an OWC Mercury Elite-AL Pro Quad Interface enclosure.  I have been using it as a Time Machine back up volume without any trouble.  I recently upgraded to Lion and within a week I had a back up fail.  I tried repairing the disk, and then tried erasing it, but that failed as well with the error saying that it was "Unable to write to the last block of the device".  This would seem to be the drive failing, but there are many reports in the Apple forums of back up drives giving this error after a Lion upgrade and I am thinking it's some kind of issue with drive needing some kind of firmware update or special formatting.  I thought you guys might be familiar with the issue and have a fix.  Right now the disk is dead in the water and can't be reformatted.

    I have exactly the same set up I described above in two different locations (one at home, and one at work).  I swap the Time Machine BUP drive when I get to each location and therefore leave my most recent back up at home or work when I leave each place.  That worked fine for a couple of years.  Then after the Lion upgrade, I started having issues with the two drives.  In both cases, I had to lose all my BUP history in Time Machine and start over with a fresh back up.  The set up at home, let me do it by reformatting the drive and then doing a new back up (I was frustrated I lost all the incremental back ups, the whole point to "Time" Machine, but I was able to get a new BUP established and start over).  At work, however, I had the issue described in my original post where I couldn't reofrmat the drive.  I was at a standstill and that's why I posted my issue.  A couple of weeks later, I got to work, plugged in the drive and it let me reformat it like nothing there was never a problem.  I made a fresh Time Machine BUP and everything was back to normal (albeit with a new BUP).  I can't tell you what changed ... It's possible there was a software update that snuck in and updated drivers or something without me being aware of it, but I haven't got a clue.  All I know is it's resolved and I am back to backing up as before ... Most importantly is to note it was not the drive that failed.  So, there's the update for you, I wish you luck with your drive.

  • Why does my mac when i try to format my stick say that unable to write to the last block of the device

    i bought a new mac with osx lion 10.7.why does my mac when i try to format my transcend 8 gb stick in disk utility say that it is unable to write to the last block of the device?please help me

    This may or may not work, but it's worth a try.
    Using Disk Utility, try an re-partition the drive into two partitions, making the second partition very small (a megabyte or two), then see if you can format the first partition normally. Leave the second partition alone.
    If this works, then the first partiton is what you will use.

  • [Solved]StlinkV2-1 kernel not detecting the device

    I have a stm32 board which have stlink with it. I installed the stlink and all the necessary udev rules are there. If enumerated properly it will create a serial device  /dev/ttyACMx  and will also show a fat partition.
    When the board is connected and i restart the computer it works fine, serial port is there. But when the computer is running, i remove and insert again the usb cable it is not recognised. I get the following error in dmesg
    [ 355.618200] usb 3-7: new full-speed USB device number 5 using xhci_hcd
    [ 355.792759] usb 3-7: ep 0x84 - rounding interval to 1024 microframes, ep desc says 2040 microframes
    [ 355.793280] usb 3-7: can't set config #1, error -71
    but if i reset all the usb ports using
    # reseting USB2 ports
    for i in $(ls /sys/bus/pci/drivers/ehci_hcd/|grep :)
    do echo $i >/sys/bus/pci/drivers/ehci_hcd/unbind
    echo $i >/sys/bus/pci/drivers/ehci_hcd/bind
    done
    # reseting USB3 ports (if there none you'll get errors)
    for i in $(ls /sys/bus/pci/drivers/xhci_hcd/|grep :)
    do echo $i >/sys/bus/pci/drivers/xhci_hcd/unbind
    echo $i >/sys/bus/pci/drivers/xhci_hcd/bind
    done
    It works fine. I have H97 MSI gamer 3 board.
    lsusb
    Bus 002 Device 002: ID 8087:8001 Intel Corp.
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 001 Device 002: ID 8087:8009 Intel Corp.
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 003 Device 005: ID 0483:374b STMicroelectronics
    Bus 003 Device 003: ID 04d9:1203 Holtek Semiconductor, Inc. Keyboard
    Bus 003 Device 002: ID 15d9:0a4d Trust International B.V. Optical Mouse
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    lspci
    00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)
    00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)
    00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
    00:14.0 USB controller: Intel Corporation 9 Series Chipset Family USB xHCI Controller
    00:16.0 Communication controller: Intel Corporation 9 Series Chipset Family ME Interface #1
    00:1a.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #2
    00:1b.0 Audio device: Intel Corporation 9 Series Chipset Family HD Audio Controller
    00:1c.0 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 1 (rev d0)
    00:1c.2 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 3 (rev d0)
    00:1c.3 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d0)
    00:1d.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #1
    00:1f.0 ISA bridge: Intel Corporation 9 Series Chipset Family H97 Controller
    00:1f.2 SATA controller: Intel Corporation 9 Series Chipset Family SATA Controller [AHCI Mode]
    00:1f.3 SMBus: Intel Corporation 9 Series Chipset Family SMBus Controller
    02:00.0 Ethernet controller: Qualcomm Atheros Killer E220x Gigabit Ethernet Controller (rev 13)
    03:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 03)
    04:02.0 Network controller: Ralink corp. RT5360 Wireless 802.11n 1T/1R
    dmesg
    [ 4.951736] [drm] Replacing VGA console driver
    [ 4.955829] intel_rapl: Found RAPL domain package
    [ 4.955832] intel_rapl: Found RAPL domain core
    [ 4.955833] intel_rapl: Found RAPL domain uncore
    [ 4.955835] intel_rapl: Found RAPL domain dram
    [ 4.968948] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [ 4.968949] [drm] Driver supports precise vblank timestamp query.
    [ 4.968996] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem
    [ 4.983385] ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no)
    [ 4.983659] acpi device:16: registered as cooling_device14
    [ 4.983713] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input19
    [ 4.983788] snd_hda_intel 0000:00:03.0: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
    [ 4.983789] [drm] Initialized i915 1.6.0 20150130 for 0000:00:02.0 on minor 0
    [ 5.009305] fbcon: inteldrmfb (fb0) is primary device
    [ 5.049339] scsi 6:0:0:0: Direct-Access MBED microcontroller 1.0 PQ: 0 ANSI: 2
    [ 5.049833] sd 6:0:0:0: [sdb] 1056 512-byte logical blocks: (540 kB/528 KiB)
    [ 5.050010] sd 6:0:0:0: [sdb] Write Protect is off
    [ 5.050011] sd 6:0:0:0: [sdb] Mode Sense: 03 00 00 00
    [ 5.050151] sd 6:0:0:0: [sdb] No Caching mode page found
    [ 5.050152] sd 6:0:0:0: [sdb] Assuming drive cache: write through
    [ 5.056156] sdb:
    [ 5.056842] sd 6:0:0:0: [sdb] Attached SCSI removable disk
    [ 5.068788] Console: switching to colour frame buffer device 240x67
    [ 5.071377] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
    [ 5.071378] i915 0000:00:02.0: registered panic notifier
    [ 5.119387] Adding 2097148k swap on /dev/sda5. Priority:-1 extents:1 across:2097148k FS
    [ 5.168352] fuse init (API version 7.23)
    [ 5.195473] input: HDA Intel HDMI HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:03.0/sound/card0/input20
    [ 5.195512] input: HDA Intel HDMI HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:03.0/sound/card0/input21
    [ 5.195571] input: HDA Intel HDMI HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:03.0/sound/card0/input22
    [ 5.208053] FAT-fs (sda2): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    [ 5.242831] systemd-journald[177]: Received request to flush runtime journal from PID 1
    [ 7.509192] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2860.bin'
    [ 7.519645] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.34
    [ 8.951338] wlp4s2: authenticate with e8:de:27:f4:9f:e8
    [ 8.959044] wlp4s2: send auth to e8:de:27:f4:9f:e8 (try 1/3)
    [ 8.960912] wlp4s2: authenticated
    [ 8.962265] wlp4s2: associate with e8:de:27:f4:9f:e8 (try 1/3)
    [ 8.966097] wlp4s2: RX AssocResp from e8:de:27:f4:9f:e8 (capab=0x431 status=0 aid=2)
    [ 8.966201] wlp4s2: associated
    [ 8.966235] cfg80211: Calling CRDA to update world regulatory domain
    [ 85.421055] usb 3-7: USB disconnect, device number 4
    [ 89.268764] usb 3-7: new full-speed USB device number 5 using xhci_hcd
    [ 89.443392] usb 3-7: ep 0x84 - rounding interval to 1024 microframes, ep desc says 2040 microframes
    [ 89.443983] usb 3-7: can't set config #1, error -71
    [ 328.016009] xhci_hcd 0000:00:14.0: remove, state 4
    [ 328.016014] usb usb4: USB disconnect, device number 1
    [ 328.016145] xhci_hcd 0000:00:14.0: USB bus 4 deregistered
    [ 328.016149] xhci_hcd 0000:00:14.0: remove, state 1
    [ 328.016152] usb usb3: USB disconnect, device number 1
    [ 328.016153] usb 3-3: USB disconnect, device number 2
    [ 328.051877] usb 3-4: USB disconnect, device number 3
    [ 328.242927] usb 3-7: USB disconnect, device number 5
    [ 328.243395] xhci_hcd 0000:00:14.0: USB bus 3 deregistered
    [ 328.243647] xhci_hcd 0000:00:14.0: xHCI Host Controller
    [ 328.243651] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 3
    [ 328.341680] xhci_hcd 0000:00:14.0: hcc params 0x200077c1 hci version 0x100 quirks 0x00009810
    [ 328.341697] xhci_hcd 0000:00:14.0: cache line size of 64 is not supported
    [ 328.342018] hub 3-0:1.0: USB hub found
    [ 328.342043] hub 3-0:1.0: 14 ports detected
    [ 328.366699] xhci_hcd 0000:00:14.0: xHCI Host Controller
    [ 328.366714] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 4
    [ 328.366981] hub 4-0:1.0: USB hub found
    [ 328.366994] hub 4-0:1.0: 6 ports detected
    [ 328.704933] usb 3-3: new low-speed USB device number 2 using xhci_hcd
    [ 328.881338] usb 3-3: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
    [ 328.883404] input: USB OPTICAL MOUSE as /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/0003:15D9:0A4D.0004/input/input23
    [ 328.883642] hid-generic 0003:15D9:0A4D.0004: input,hidraw0: USB HID v1.11 Mouse [ USB OPTICAL MOUSE] on usb-0000:00:14.0-3/input0
    [ 329.041600] usb 3-4: new low-speed USB device number 3 using xhci_hcd
    [ 329.226073] usb 3-4: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
    [ 329.226076] usb 3-4: ep 0x82 - rounding interval to 64 microframes, ep desc says 80 microframes
    [ 329.234694] input: HID 04d9:1203 as /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/0003:04D9:1203.0005/input/input24
    [ 329.285004] hid-generic 0003:04D9:1203.0005: input,hidraw1: USB HID v1.11 Keyboard [HID 04d9:1203] on usb-0000:00:14.0-4/input0
    [ 329.298893] input: HID 04d9:1203 as /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.1/0003:04D9:1203.0006/input/input25
    [ 329.351641] hid-generic 0003:04D9:1203.0006: input,hidraw2: USB HID v1.11 Device [HID 04d9:1203] on usb-0000:00:14.0-4/input1
    [ 329.511596] usb 3-7: new full-speed USB device number 4 using xhci_hcd
    [ 329.686380] usb 3-7: ep 0x84 - rounding interval to 1024 microframes, ep desc says 2040 microframes
    [ 329.686966] usb-storage 3-7:1.1: USB Mass Storage device detected
    [ 329.687165] scsi host7: usb-storage 3-7:1.1
    [ 329.687382] cdc_acm 3-7:1.2: ttyACM0: USB ACM device
    [ 330.688552] scsi 7:0:0:0: Direct-Access MBED microcontroller 1.0 PQ: 0 ANSI: 2
    [ 330.688935] sd 7:0:0:0: [sdb] 1056 512-byte logical blocks: (540 kB/528 KiB)
    [ 330.689089] sd 7:0:0:0: [sdb] Write Protect is off
    [ 330.689091] sd 7:0:0:0: [sdb] Mode Sense: 03 00 00 00
    [ 330.689284] sd 7:0:0:0: [sdb] No Caching mode page found
    [ 330.689286] sd 7:0:0:0: [sdb] Assuming drive cache: write through
    [ 330.695324] sdb:
    [ 330.696110] sd 7:0:0:0: [sdb] Attached SCSI removable disk
    [ 352.926977] usb 3-7: USB disconnect, device number 4
    [ 355.618200] usb 3-7: new full-speed USB device number 5 using xhci_hcd
    [ 355.792759] usb 3-7: ep 0x84 - rounding interval to 1024 microframes, ep desc says 2040 microframes
    [ 355.793280] usb 3-7: can't set config #1, error -71
    I want that whenever  i insert the stlink board it should enumerate properly and create serial port.
    Last edited by sanjuchopra (2015-05-30 14:44:25)

    I got it working. Actually the cable was faulty. I tried with other cable and it worked fine. But strange thing is that after usb reset old cable works fine.

  • How to repair a bad block on internal hard drive?

    I've just performed a surface test on my internal HD
    It reports back one bad block, at # 1, 118, 671, 700.Filename = N/A.
    1. Should I be concerned about this? I have not noticed any performance issues.
    2. If I wanted to get rid of it anyway, how do I repair that bad block?
    Please advise.
    Many thanks.
    /gh

    Good to know this happens automatically.
    Is that something OS X automatically does on startup, or on shut down, or in background?
    But in this case, that automatic feature seems to have missed this block. Else the bad block would not show up in the utility, with a file in it.
    Or ,,,,perhaps it still shows up as a bad block in the utility, even though it's been mapped out.
    If that's the case, then I guess I need another kind of utility that would report the block has been mapped out....
    Any suggestions?

  • How does the filesystem handle bad blocks?

    Let's suppose your hard drive develops a bad sector on it. What happens?
    I remember early products where the OS would constantly try to store new files right on top of the bad block, find the file couldn't be written/verified, then would write it elsehere... then the next time it would do the same thing again, expecting the block to "heal" I guess
    What happens on MacOS (extended, journaled) if it's writing a file and finds a bad block in freespace? Does the OS know how to "cocoon off" or tag the bad block as bad and not use it?
    Now what happens if the bad block develops underneath an active file? What's the recovery pattern? Or is there none - does it just leave the block bad permanently? Is there any way to fix that?

    Boot your computer from the DVD that came with it, and use Disk Utility to check the status of the disk. Select the disk and look at the S.M.A.R.T. status at the bottom. If it displays anything other than Verified, then the disk isn't going to last much longer.
    Modern hard disks don't develop "bad sectors" that the OS needs to handle. The disk drive itself automatically remaps bad sectors to spare unused sectors in a way that is transparent to the OS. When too many of those bad sectors are remapped, the S.M.A.R.T. status will report an error.
    What you're describing is a failing disk. It's more than likely the early stages of a total failure, rather than just a bunch of bad sectors. Same thing happened to my MacBook a few months ago. After about two hours, it failed completely. I picked up a new drive on the way home, and restored it from Time Machine overnight. The only data that I lost was an iTunes purchase that I made that morning (iTunes Support let me download it again). You have a backup, right?
    It's also possible that you've either run out of free space on the startup disk, or you have a process running that's consuming too much CPU and/or RAM resources. If that's the case, a reboot will clear it (until whatever caused it happens again).

  • Bad Blocks on iMac (9,1) - Should I replace the drive?

    My wife's early 2009 iMac (9,1) started hangs and crashes. DiskWarrior reported hardware problems, TechTool Pro 7.0.4 found thousands of bad blocks on the factory 1TB hard drive.
    After reformatting, there were still hundreds of bad blocks, so I zeroed the drive (one pass only). Now I am left with 98 bad blocks in a range in mid-drive. I can partition the drive and install OS 10.9.3.
    Should this drive be replaced?

    Yes.

  • Suggestions for formatting external drive with bad block?

    I have a OWC Mercury 300 GB external drive.  I wanted to erase it and use it as a backup for one of my laptops.  The drive had been working fine as a Time Machine back up for an old (intel) iMac. I told Disk Utility to erase and reformat.  It erased, but refused to reformat saying there was a bad block on the drive.  Now Disk Utility recognizes the external drive but won't do anything with it.  No Verify. No Repair.  All grayed out.  Any suggestions?

    I wasn't a hard error, that's why. Repartitioning and reformatting will often fix soft errors in the directory structure. Had there been a real, new, bad block on the drive it would not be repairable. A soft bad block error can be fixed by reformatting. The hard block error may be fixable by using Zero Data one pass that may spare out the bad block. But if none of that works then you need to replace the drive.
    You were fortunate that the error probably was spurious and resolved by repartitioning (may have been in the disk's RDB.)

  • Tech Tool Deluxe identifies "Bad Blocks"

    I have two G4's that have been misbehaving. I ultimately erased both hard drives, zeroed out the data, re-installed 10.4, and then ran Tech Tool Deluxe. On my newer G4, the analysis revealed 6 bad blocks. On the older G4, I am only half done and I have 300 bad blocks. One discussion mentioned that "zeroing" the data on the drive would solve the problem - I did that and still have the bad blocks. Should I have ZERO bad blocks - are a few OK?
    Thank you

    So, when I erased my disk, "zeroed" out the data (using Disk Utility), should I have zeroed-out the bad blocks as well (identified them, re-addressed them, etc)?
    Zeroing the data re-writes every block. As you know, it takes hours to complete. This forces IDE/ATA drives to substitute spares for up to 10 blocks known to have problems, IF
    • enough spare blocks are available AND
    • spares are not also bad AND
    • not more than 10 substitutions are required.
    afterward, I did an AHT - no negative result
    AHT checks the Directory data structures for damage. It does not read every block, and cannot detect all Bad Blocks on the drive. Doing that takes almost as long as Zero all Data, and AHT is done in only a few minutes.
    Disk Utility also did not identify any problems (a few Disk Permissions).
    Disk Utility's Repair and Repair Permissions features check the Directory Data Structures and File Permissions for damage and inconsitency. They cannot detect all bad Blocks on the drive. Doing that takes almost as much time as Zero all Data, and AHT is done in only a few minutes.
    It was Tech Tool Deluxe that discovered the bad blocks
    The "Surface Scan" function reads every block. It is the only test you listed that reads every block, but takes a really long time to do so. It can detect Bad Blocks, but does not fix them. Also, when an IDE/ATA drive has Bad Blocks, its "Smartdrive" status is usually something horrible-sounding like "Failed".
    For the drive with 6 bad blocks - what should I do (and in what order) to see if they can be eliminated?
    That requires another initialize with "Zero all Data". If there are enough spares in the right neighborhoods, it may be able to substitute spares to make it 100 percent good blocks. There is a possibility that some of the remaining Bad Blocks cannot be repaired, and that may mean the drive is not in good enough shape to continue using it.

  • ORA-01578 - bad blocks.

    Hello,
    We had a SAN crash last month and with all the confusion I missed that we had some bad blocks after the crash. Our RMAN backups have now aged out so we don't have a RMAN backup. What I do have is a datapump backup from before the event. This is table corruption. Is there a way to either restore the table to a stage location, catalog the table or datafile somehow, then restore the bad block? Otherwise, somehow determine the bad data and get the data from the backed up table and insert it back into the bad table after I re-recreate it without the bad blocks?
    Oracle support is just saying recreate the table skipping the bad blocks but there has to be some way here if the data is on that datapump backup that I can determin what it is then restore it.
    Thanks

    The fix blocks procedure did not work and I have not attempted the skip blocks. If I run the skip corrupt blocks will my query work? Is that worth a shot next?
    select count(*) TRACKING_ID from JEBCS3NM.TRACKABLE_OBJECT t, JEBCS3NM.CONVEYANCE c where c.TRACKABLE_OBJECT_GUID = t.TRACKABLE_OBJECT_GUID and PRIMARY_MOVER_ID is null
    ERROR at line 1:
    ORA-01578: ORACLE data block corrupted (file # 75, block # 1024073)
    ORA-01110: data file 75: '/u02/oradata/bcso/jebcs3nm_d.dbf'
    SELECT OBJECT_NAME, BLOCK_ID, MARKED_CORRUPT
      2       FROM REPAIR_TABLE;
    OBJECT_NAME                      BLOCK_ID MARKED_COR
    CONVEYANCE                        1024073 TRUE
    CONVEYANCE                        1024105 TRUE
    CONVEYANCE                        1024113 TRUE
    SQL> SET SERVEROUTPUT ON
    SQL> DECLARE num_fix INT;
      2  BEGIN
    num_fix := 0;
    DBMS_REPAIR.FIX_CORRUPT_BLOCKS (
         SCHEMA_NAME => 'JEBCS3NM',
      6       OBJECT_NAME=> 'CONVEYANCE',
      7       OBJECT_TYPE => dbms_repair.table_object,
         REPAIR_TABLE_NAME => 'REPAIR_TABLE',
         FIX_COUNT=> num_fix);
    DBMS_OUTPUT.PUT_LINE('num fix: ' || TO_CHAR(num_fix));
    END;
    12  /
    num fix: 0
    PL/SQL procedure successfully completed.

  • How would I fix a bad block on a partition?

    I've been trying to resize a Western Digital 250GB drive that has Windows XP on the primary /dev/hda partition. PartitonMagic reports "Error 1529 while executing batch" & "Error 1529: Information mismatch in directory entry" I've read it up and the solution is supposed to be running "chkdsk /f"but I've run "chkdisk /r & /f" multiple times and I still get this error.
    I also tried to partition form a gparted cd, it tells me that there is at least 1 bad block and it cannot continue. It suggested chkdsk and running ntfsresize with --bad-sectors. I did this with "ntfsresize -b -s182880MB /dev/sda1" it seemed to have worked but when I logged in to Windows I noticed that while my C: was resized to 182GB, no unallocated space was created. (Not sure if I missed a step in this process) So partition magic and other apps show a 250GB+ drive with no unallocated free space. While my C:\ shows up as 182GB.
    I also tried Ultimate Boot Disk, with qtparted & simplyMephis liveCD with qtparted. UBD just said there were errors, simplyMephis said there was at least 1 bad block on the drive. I tried running badblocks commands from Mephis but it looked like it would take days to complete at the speed it was doing it.
    Any more ideas? Has anyone else come across these problems?

    You may try to launch a "cfdisk" from a live CD to see if the partitions are set up correctly and maybe write a proper partition table. Be warned, this is a formatting tool, so you can loose all your data if manipulated incorrectly.
    Moreover, partitionning a drive while the system uses it is not a good idea. Always prefer doing this from a live system (that uses only RAM).

  • TechTool Pro 6 Identified Bad Blocks on HD

    I ran TechTool Pro 6 (Surface Scan) on my iMac and it found 63 bad blocks for 1,953,525,168 blocks scanned. If I reformat my HD and zeroed it can I get rid off these bad blocks?  Or the best option is to get a new HD and restore my data on it? I mean how many bad blocks is the limit to either reformat or get a new drive?
    I would apprreciate any comments/feedback.
    Thanks,
    Rudy

    That seems a bit much, but Zeroing one pass may eliminate them, how old is this dive & what Brand/Model?
    LOL, kind of insulting about his home aren't you?

Maybe you are looking for