Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ata [2017/07/22 23:41]
ata [2022/04/16 12:22] (current)
Line 1: Line 1:
 +
 +===== HELP =====
 +
 +http://rzr.online.fr/q/ata : how to #[[recover]] a #[[harddisk]] #[[failure]] "end_request: I/O error, dev sda, sector 0" is #demsg is scaring !linux ?
 +
 +@[[tag]]: [[scsi]] [[driver]] [[sector]] [[error]] [[io]] [[wd]] [[Western]] [[wdc]]
 +
 +@[[feedback]] :
 +
 +  * http://forum.ubuntu-fr.org/viewtopic.php?pid=3918054#p3918054 #  (invalid argument)
 +  * http://forum.ubuntu-fr.org/viewtopic.php?pid=3917917#p3917917 # [[freeze]]
 +  * http://forum.ubuntu-fr.org/viewtopic.php?pid=3917901#p3917901
 +  * http://forum.hddguru.com/two-weaks-could-not-find-wd400bb-00ccb0-t7596.html#p121085
 +  * http://identi.ca/tag/dmesg
 +  * http://www.ge.ubuntuforums.org/showthread.php?p=9882911#post9882911
 +
 +  * http://superuser.com/questions/141770/ubuntu-login-takes-15-seconds-i-o-error-dev-fd0-sector-0/192452#192452
 +
 +
 +==== ToDo ====
 +
 +Does  WDC WD400BB-00CCB0  support [[SMART]] ? if yes how to set it on ?
 +
 +
 +  * http://sourceforge.net/apps/trac/smartmontools/wiki/FAQ
 +  * [[selfscan]] : http://www.datarecoverytools.co.uk/tag/self-scan-modules/
 +  * http://www.ultimatebootcd.com/
 +  * [[firmware]] : http://forum.hddguru.com/firmware-wd400bb-00aua1-t16457.html#p121089
 +  * http://files.hddguru.com/download/PC-3000%20Support/Firmware/Western%20Digital/BB/
 +  * MHDD : http://forum.hddguru.com/wd400-spins-but-keeps-being-idle-t14544.html#p121090
 +kvm -hda /dev/sdb -cdrom mhdd32ver4.6.iso  -boot d
 +  * http://kwar.vndv.com/workshop.html "HDD repair 2.0/REPAIR.EXE" can it run on linux ??
 +
 +  * https://ata.wiki.kernel.org/index.php/ATA_Secure_Erase
 +  * http://en.wikipedia.org/wiki/Hdparm
 +
 +  * http://forum.hddguru.com/reading-data-with-mhdd-scripts-t11452.html
 +
 +  count=100 # sectors
 +  read=$20 # ata read
 +  mode=$e0 # STANDBY IMMEDIATE 
 +
 +  regs = 00 ${count} 00 00 00 ${mode} ${read}
 +  waitnbsy
 +  checkerr
 +  checkdrq
 +  sectorsto = lba0-99.bin
 +
 +http://kwar.vndv.com/workshop.html
 +
 +
 +==== NEWS ====
 +
 +was able to read the partition table not damaged but now i am trying to dump a [[ext3]] or 2 partition, see 
 +
 +http://rzr.online.fr/q/ext3
 +
 +All my thanks go to the HDDGURU group, if you some service ask for some real expert there first !!!
 +
 +Especialy  http://forum.hddguru.com/member7100.html !
 +
 +
 +
 +
 +
 +==== ERROR : ATA : UNC : Uncorrectable error - often due to bad sectors on the disk  ====
 +
 +
 +  sudo time ddrescue -r 5 -v   /dev/sdb WD-WMA9T1216760.img ddrescue.log
 +  #| 
 +  #| About to copy 40020 MBytes from /dev/sdb to WD-WMA9T1216760.img
 +  #|     Starting positions: infile = 0 B,  outfile = 0 B
 +  #|     Copy block size: 128 hard blocks
 +  #| Hard block size: 512  bytes
 +  #| Max_retries: 5    
 +  #| Direct: no    Sparse: no    Split: yes    Truncate: no
 +  #| 
 +  #| Press Ctrl-C to interrupt
 +  #| Initial status (read from logfile)
 +  #| rescued:    40018 MB,  errsize:   2236 kB,  errors:      73
 +  #| Current status
 +  #| rescued:    40018 MB,  errsize:   2236 kB,  current rate:        0 B/s
 +  #|    ipos:    19629 MB,   errors:      73,    average rate:        0 B/s
 +  #|    opos:    19629 MB,     time from last successful read:       0 s
 +  #| Splitting failed blocks...
 +
 +
 +<code>
 +cd /home/local/backup/WD-WMA9T1216760/ 
 +sudo time ddrescue -r 5 -v -n -d -C -R  /dev/sdb WD-WMA9T1216760.img ddrescue.log && dmesg | tail
 +
 +About to copy 40020 MBytes from /dev/sdb to WD-WMA9T1216760.img
 +    Starting positions: infile = 0 B,  outfile = 0 B
 +    Copy block size: 128 hard blocks
 +Hard block size: 512  bytes
 +Max_retries: 5    
 +Direct: yes    Sparse: no    Split: no    Truncate: no
 +Complete only
 +
 +Press Ctrl-C to interrupt
 +Initial status (read from logfile)
 +rescued:    40018 MB,  errsize:   2128 kB,  errors:      72
 +Current status
 +rescued:    40018 MB,  errsize:   1975 kB,  current rate:     1664 B/s
 +   ipos:    32397 MB,   errors:      65,    average rate:     4502 B/s
 +   opos:    32397 MB,     time from last successful read:       0 s
 +Trimming failed blocks...
 +
 +
 +dmesg
 +[34829.324381] ata2: EH complete
 +[34832.313591] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
 +[34832.313604] ata2.00: BMDMA stat 0x65
 +[34832.313621] ata2.00: cmd c8/00:01:65:1a:66/00:00:00:00:00/e2 tag 0 dma 512 in
 +[34832.313624]          res 51/40:01:65:1a:66/00:00:00:00:00/e2 Emask 0x9 (media error)
 +[34832.313630] ata2.00: status: { DRDY ERR }
 +[34832.313635] ata2.00: error: { UNC }
 +[34832.337683] ata2.00: configured for UDMA/33
 +[34832.352453] ata2.01: configured for UDMA/33
 +[34832.352489] ata2: EH complete
 +[34835.305724] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
 +[34835.305737] ata2.00: BMDMA stat 0x65
 +[34835.305754] ata2.00: cmd c8/00:01:65:1a:66/00:00:00:00:00/e2 tag 0 dma 512 in
 +[34835.305757]          res 51/40:01:65:1a:66/00:00:00:00:00/e2 Emask 0x9 (media error)
 +[34835.305764] ata2.00: status: { DRDY ERR }
 +[34835.305768] ata2.00: error: { UNC }
 +[34835.329727] ata2.00: configured for UDMA/33
 +[34835.344485] ata2.01: configured for UDMA/33
 +[34835.344529] ata2: EH complete
 +</code>
 +
 +
 +
 +==== EXT3 ====
 +
 +<code>
 + LANG=C  sudo time fsck -v /dev/sdb5
 +fsck from util-linux-ng 2.16
 +e2fsck 1.41.9 (22-Aug-2009)
 +Error reading block 2162689 (Attempt to read block from filesystem resulted in short read) while reading inode and block bitmaps.  Ignore error<y>? yes
 +
 +Force rewrite<y>? yes
 +
 +Error reading block 2260992 (Attempt to read block from filesystem resulted in short read) while reading inode and block bitmaps.  Ignore error<y>? yes
 +
 +Force rewrite<y>? yes
 +
 +Error reading block 2326528 (Attempt to read block from filesystem resulted in short read) while reading inode and block bitmaps.  Ignore error<y>? yes
 +
 +Force rewrite<y>? yes
 +
 +Clearing orphaned inode 907996 (uid=1000, gid=1000, mode=0100644, size=32768)
 +Clearing orphaned inode 907990 (uid=1000, gid=1000, mode=0100600, size=21492)
 +p5: clean, 136155/1291808 files, 4137506/5174977 blocks
 +0.02user 0.06system 2:32.59elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
 +5114inputs+2584outputs (0major+930minor)pagefaults 0swaps
 +</code>
 +
 +
 +
 +
 +
 +
 +==== ID : WDC WD400BB-00CCB0  ====
 +
 +http://support.wdc.com/product/install.asp?modelno=WD400BB-00CCB0&x=0&y=0
 +
 +http://wdc.custhelp.com/cgi-bin/wdc.cfg/php/enduser/std_adp.php?p_faqid=715&p_created=&p_cats=185&p_cv=1.185&p_pv=2.295&p_prods=227%2C295#jumper
 +
 +<code>
 +sudo hdparm -igtT /dev/sdb 
 +
 +/dev/sdb:
 + geometry      = 4865/255/63, sectors = 78165360, start = 0
 +
 + Model=WDC, FwRev=22.04A22, SerialNo=WD-WMA9T1216760
 + Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
 + RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=40
 + BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=off
 + CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=78165360
 + IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 + PIO modes:  pio0 pio1 pio2 pio3 pio4 
 + DMA modes:  mdma0 mdma1 mdma2 
 + UDMA modes: udma0 udma1 *udma2 udma3 udma4 udma5 
 + AdvancedPM=no WriteCache=enabled
 + Drive conforms to: Unspecified:  ATA/ATAPI-1,2,3,4,5
 +
 + * signifies the current active mode
 +
 +read() failed: Input/output error
 + Timing buffered disk reads:  read() failed: Input/output error
 +
 +hdparm -I /dev/sdb
 +
 +/dev/sdb:
 +
 +ATA device, with non-removable media
 + Model Number:       WDC WD400BB-00CCB0                      
 + Serial Number:      WD-WMA9T1216760
 + Firmware Revision:  22.04A22
 +Standards:
 + Supported: 5 4 3 
 + Likely used: 6
 +Configuration:
 + Logical max current
 + cylinders 16383 16383
 + heads 16 16
 + sectors/track 63 63
 + --
 + CHS current addressable sectors:   16514064
 + LBA    user addressable sectors:   78165360
 + Logical/Physical Sector size:           512 bytes
 + device size with M = 1024*1024:       38166 MBytes
 + device size with M = 1000*1000:       40020 MBytes (40 GB)
 + cache/buffer size  = 2048 KBytes (type=DualPortCache)
 +Capabilities:
 + LBA, IORDY(can be disabled)
 + bytes avail on r/w long: 40
 + Standby timer values: spec'd by Standard, with device specific minimum
 + R/W multiple sector transfer: Max = 16 Current = 0
 + Recommended acoustic management value: 128, current value: 254
 + DMA: mdma0 mdma1 mdma2 udma0 udma1 *udma2 udma3 udma4 udma5 
 +      Cycle time: min=120ns recommended=120ns
 + PIO: pio0 pio1 pio2 pio3 pio4 
 +      Cycle time: no flow control=120ns  IORDY flow control=120ns
 +Commands/features:
 + Enabled Supported:
 +     SMART feature set
 +     Security Mode feature set
 +    * Power Management feature set
 +    * Write cache
 +    * Look-ahead
 +    * Host Protected Area feature set
 +    * WRITE_BUFFER command
 +    * READ_BUFFER command
 +    * DOWNLOAD_MICROCODE
 +     SET_MAX security extension
 +     Automatic Acoustic Management feature set
 +Security: 
 + supported
 + not enabled
 + not locked
 + not frozen
 + not expired: security count
 + not supported: enhanced erase
 +HW reset results:
 + CBLID- above Vih
 + Device num = 0 determined by CSEL
 +Checksum: correct
 +
 +</code>
 +
 +
 +==== ERROR : IDNF: IDentity Not Found ====
 +
 +
 +
 +<code>
 +sudo hdparm --read-sector 0 /dev/sdb ; dmesg | tail -n 9
 +
 +/dev/sdb:
 +reading sector 0: FAILED: Input/output error
 +[ 8654.038816] ata2: EH complete
 +[ 8670.916193] ata2.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
 +[ 8670.916223] ata2.01: cmd 20/00:01:00:00:00/00:00:00:00:00/f0 tag 0 pio 512 in
 +[ 8670.916226]          res 51/10:01:00:00:00/00:00:00:00:00/f0 Emask 0x81 (invalid argument)
 +[ 8670.916233] ata2.01: status: { DRDY ERR }
 +[ 8670.916237] ata2.01: error: { IDNF }
 +[ 8670.948590] ata2.00: configured for UDMA/33
 +[ 8670.977429] ata2.01: configured for UDMA/33
 +[ 8670.977511] ata2: EH complete
 +
 +sudo hdparm --read-sector 63 /dev/sdb ; dmesg | tail -n 9
 +
 +/dev/sdb:
 +reading sector 63: FAILED: Input/output error
 +[10746.560308] ata2: EH complete
 +[10754.260724] ata2.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
 +[10754.260750] ata2.01: cmd 20/00:01:3f:00:00/00:00:00:00:00/f0 tag 0 pio 512 in
 +[10754.260754]          res 51/10:01:3f:00:00/00:00:00:00:00/f0 Emask 0x81 (invalid argument)
 +[10754.260760] ata2.01: status: { DRDY ERR }
 +[10754.260765] ata2.01: error: { IDNF }
 +[10754.300579] ata2.00: configured for UDMA/33
 +[10754.326685] ata2.01: configured for UDMA/33
 +[10754.326768] ata2: EH complete
 +</code>
 +
 +DRDY : Disk ReaDY
 +
 +https://ata.wiki.kernel.org/index.php/Libata_error_messages
 +
 +Emask 0x81 (invalid argument) : AC_ERR_0x81
 +
 +http://www.deepspar.com/pdf/DeepSparDiskImagingWhitepaper3.pdf p7
 +
 +
 +MHDD translator
 +.wdctrans
 +
 +==== DMA ====
 +
 +<code>
 +hdparm -d0 /dev/sdb
 +
 +/dev/sdb:
 + setting using_dma to 0 (off)
 + HDIO_SET_DMA failed: Inappropriate ioctl for device
 + HDIO_GET_DMA failed: Inappropriate ioctl for device
 +
 +hdparm -b /dev/sdb
 +
 +/dev/sdb:
 + HDIO_GET_BUSSTATE failed: Inappropriate ioctl for device
 +
 + hdparm -B 254 /dev/sdb
 +
 +/dev/sdb:
 + setting Advanced Power Management level to 0xfe (254)
 + HDIO_DRIVE_CMD failed: Input/output error
 + APM_level      = not supported
 +
 +
 +hdparm -C /dev/sdb
 +
 +/dev/sdb:
 + drive state is:  active/idle
 +
 +hdparm --dco-identify  /dev/sdb
 +
 +/dev/sdb:
 + HDIO_DRIVE_CMD(dco_identify) failed: Input/output error
 + hdparm -I   /dev/sdb
 +
 +/dev/sdb:
 +
 +ATA device, with non-removable media
 +        Model Number:       WDC WD400BB-00CCB0
 +        Serial Number:      WD-WMA9T1216760
 +        Firmware Revision:  22.04A22
 +Standards:
 +        Supported: 5 4 3
 +        Likely used: 6
 +Configuration:
 +        Logical         max     current
 +        cylinders       16383   16383
 +        heads           16      16
 +        sectors/track   63      63
 +        --
 +        CHS current addressable sectors:   16514064
 +        LBA    user addressable sectors:   78165360
 +        Logical/Physical Sector size:           512 bytes
 +        device size with M = 1024*1024:       38166 MBytes
 +        device size with M = 1000*1000:       40020 MBytes (40 GB)
 +        cache/buffer size  = 2048 KBytes (type=DualPortCache)
 +Capabilities:
 +        LBA, IORDY(can be disabled)
 +        bytes avail on r/w long: 40
 +        Standby timer values: spec'd by Standard, with device specific minimum
 +        R/W multiple sector transfer: Max = 16  Current = 0
 +        Recommended acoustic management value: 128, current value: 254
 +        DMA: mdma0 mdma1 mdma2 udma0 udma1 *udma2 udma3 udma4 udma5
 +             Cycle time: min=120ns recommended=120ns
 +        PIO: pio0 pio1 pio2 pio3 pio4
 +             Cycle time: no flow control=120ns  IORDY flow control=120ns
 +Commands/features:
 +        Enabled Supported:
 +                SMART feature set
 +                Security Mode feature set
 +           *    Power Management feature set
 +                Write cache
 +           *    Look-ahead
 +           *    Host Protected Area feature set
 +           *    WRITE_BUFFER command
 +           *    READ_BUFFER command
 +           *    DOWNLOAD_MICROCODE
 +                SET_MAX security extension
 +                Automatic Acoustic Management feature set
 +Security:
 +                supported
 +        not     enabled
 +        not     locked
 +        not     frozen
 +        not     expired: security count
 +        not     supported: enhanced erase
 +HW reset results:
 +        CBLID- above Vih
 +        Device num = 0 determined by CSEL
 +Checksum: correct
 +
 +blktool /dev/sdb  version
 +blktool version 4
 +
 +
 +
 + blktool /dev/sdb dma off
 +HDIO_SET_DMA: Inappropriate ioctl for device
 +
 + blktool /dev/sdb id
 +scsi-version: 5
 +vendor-id: ATA     
 +product-id: WDC WD400BB-00CC
 +product-rev: 22.0
 +device-type: direct-access
 +sectors: 78165360
 +sector-size: 512
 +
 +blktool /dev/sdb geometry
 +head 255 sect 63 cyl 4865 start 0
 +
 +</code>
 +
 +===== SMART =====
 +
 +  * https://wiki.archlinux.org/index.php/S.M.A.R.T.
 +
 +<code>
 +sudo smartctl -a /dev/sdb
 +#| smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen
 +#| Home page is http://smartmontools.sourceforge.net/
 +#| 
 +#| === START OF INFORMATION SECTION ===
 +#| Model Family:     Western Digital Caviar family
 +#| Device Model:     WDC WD400BB-00CCB0
 +#| Serial Number:    WD-WMA9T1216760
 +#| Firmware Version: 22.04A22
 +#| User Capacity:    40,020,664,320 bytes
 +#| Device is:        In smartctl database [for details use: -P show]
 +#| ATA Version is:   5
 +#| ATA Standard is:  Exact ATA specification draft version not indicated
 +#| Local Time is:    Sun Dec 26 15:58:24 2010 CET
 +#| SMART support is: Available - device has SMART capability.
 +#| SMART support is: Disabled
 +
 +smartctl -T permissive  -s on /dev/sdb
 +#| smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen
 +#| Home page is http://smartmontools.sourceforge.net/
 +#| === START OF ENABLE/DISABLE COMMANDS SECTION ===
 +#| Error SMART Enable failed
 +#| Smartctl: SMART Enable Failed.
 +#| SMART Disabled. Use option -s with argument 'on' to enable it.
 +
 +sudo smartctl -l selftest /dev/sdb
 +
 +
 +sudo hdsentinel
 +#| HDD Device  1: /dev/sdb
 +#| HDD Model ID : WDC     WD400BB-00CCB0
 +#| HDD Serial No: ?
 +#| HDD Revision : 22.0
 +#| HDD Size     : 38166 MB
 +#| Interface    : SCSI
 +#| Temperature  : Unknown °C
 +#| Health       : Unknown %
 +#| Performance  : Unknown %
 +#| Power on time: 
 +#| Est. lifetime: 
 +</code>
 +
 +
 +
 +
 +==== LOG / DMESG : as 1st master ====
 +
 +  sd 0:0:0:0: Attached scsi generic sg0 type 0
 +  sd 0:0:0:0: [sda] 78165360 512-byte logical blocks: (40.0 GB/37.2 GiB)
 +  sd 0:0:0:0: [sda] Write Protect is off
 +  sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
 +  sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 +  sda:
 +  sd 0:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
 +  sd 0:0:0:0: [sda] Sense Key : Aborted Command [current] [descriptor]
 +  sd 0:0:0:0: [sda] Add. Sense: Recorded entity not found
 +  end_request: I/O error, dev sda, sector 0
 +  Buffer I/O error on device sda, logical block 0
 +  sd 0:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
 +  (... loop prev lines ...) 
 +
 +
 +==== LOG / DMESG : as 2d master ====
 +
 +<code>
 +dmesg | grep ata2 | less
 +[    0.992258] ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0xd408 irq 15
 +[    1.421490] ata2.00: ATA-5: WDC WD400BB-00CCB0, 22.04A22, max UDMA/100
 +[    1.421497] ata2.00: 78165360 sectors, multi 0: LBA
 +[    1.421535] ata2.00: limited to UDMA/33 due to 40-wire cable
 +[    1.437374] ata2.00: configured for UDMA/33
 +[    1.440062] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
 +[    1.440070] ata2.00: BMDMA stat 0x25
 +[    1.440085] ata2.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 0 dma 4096 in
 +[    1.440094] ata2.00: status: { DRDY ERR }
 +[    1.440098] ata2.00: error: { IDNF }
 +[    1.465373] ata2.00: configured for UDMA/33
 +[    1.465505] ata2: EH complete
 +
 +hexdump /dev/sdb | head ; dmesg
 +[  536.173560] ata2: EH complete
 +[  536.175151] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
 +[  536.175161] ata2.00: BMDMA stat 0x25
 +[  536.175178] ata2.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 0 dma 4096 in
 +[  536.175180]          res 51/10:08:00:00:00/00:00:00:00:00/e0 Emask 0x81 (invalid argument)
 +[  536.175187] ata2.00: status: { DRDY ERR }
 +[  536.175191] ata2.00: error: { IDNF }
 +[  536.197377] ata2.00: configured for UDMA/33
 +[  536.197420] sd 1:0:0:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
 +[  536.197429] sd 1:0:0:0: [sdb] Sense Key : Aborted Command [current] [descriptor]
 +[  536.197439] Descriptor sense data with sense descriptors (in hex):
 +[  536.197444]         72 0b 14 00 00 00 00 0c 00 0a 80 00 00 00 00 00 
 +[  536.197460]         00 00 00 00 
 +[  536.197467] sd 1:0:0:0: [sdb] Add. Sense: Recorded entity not found
 +[  536.197478] end_request: I/O error, dev sdb, sector 0
 +[  536.197492] Buffer I/O error on device sdb, logical block 0
 +[  536.197538] ata2: EH complete
 +
 +</code>
 +
 +==== LOG / DMESG : as 1st slave ====
 +
 +<code>
 +[  130.741322] sd 2:0:0:0: Attached scsi generic sg1 type 0
 +[  130.764419] sd 2:0:0:0: [sdb] 78165360 512-byte logical blocks: (40.0 GB/37.2 GiB)
 +[  130.773360] sd 2:0:0:0: [sdb] Write Protect is off
 +[  130.773375] sd 2:0:0:0: [sdb] Mode Sense: 53 00 00 08
 +[  130.773381] sd 2:0:0:0: [sdb] Assuming drive cache: write through
 +[  130.786231] sd 2:0:0:0: [sdb] Assuming drive cache: write through
 +[  130.786251]  sdb:
 +[  130.794265] sd 2:0:0:0: [sdb] Device not ready
 +[  130.794279] sd 2:0:0:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
 +[  130.794288] sd 2:0:0:0: [sdb] Sense Key : Not Ready [current] 
 +[  130.794297] sd 2:0:0:0: [sdb] Add. Sense: Logical unit not ready, cause not reportable
 +[  130.794308] end_request: I/O error, dev sdb, sector 0
 +[  130.794322] Buffer I/O error on device sdb, logical block 0
 +</code>
 +
 +==== LOG / DMESG : as 2st slave ====
 +
 +<code>
 +$ sudo hexdump /dev/sdb | head
 +
 +[ 7828.984178] ata2.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
 +[ 7828.984192] ata2.01: BMDMA stat 0x65
 +[ 7828.984209] ata2.01: cmd c8/00:08:00:00:00/00:00:00:00:00/f0 tag 0 dma 4096 in
 +[ 7828.984212]          res 51/10:08:00:00:00/00:00:00:00:00/f0 Emask 0x81 (invalid argument)
 +[ 7828.984218] ata2.01: status: { DRDY ERR }
 +[ 7828.984223] ata2.01: error: { IDNF }
 +[ 7829.020458] ata2.00: configured for UDMA/33
 +[ 7829.044133] ata2.01: configured for UDMA/33
 +[ 7829.044183] sd 1:0:1:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
 +[ 7829.044191] sd 1:0:1:0: [sdb] Sense Key : Aborted Command [current] [descriptor]
 +[ 7829.044202] Descriptor sense data with sense descriptors (in hex):
 +[ 7829.044206]         72 0b 14 00 00 00 00 0c 00 0a 80 00 00 00 00 00 
 +[ 7829.044223]         00 00 00 00 
 +[ 7829.044230] sd 1:0:1:0: [sdb] Add. Sense: Recorded entity not found
 +[ 7829.044241] end_request: I/O error, dev sdb, sector 0
 +[ 7829.044254] Buffer I/O error on device sdb, logical block 0
 +[ 7829.044308] ata2: EH complete
 +</code>
 +
 +http://www.linuxquestions.org/questions/linux-hardware-18/can-i-save-this-hdd-413850/page2.html
 +
 +
 +
 +==== DUMP ====
 +
 +  hexdump /dev/sdb | head
 +  #|
 +
 +  dd if=/dev/sdb count=1 bs=1 | hexdump
 +  #| dd: reading `/dev/sdb': Input/output error
 +  #| 0+0 records in
 +  #| 0+0 records out
 +  #| 0 bytes (0 B) copied, 0.17308 s, 0.0 kB/s
 +
 +
 +
 +
 +==== PARTITIONS ===
 +
 +<code>
 +sudo /sbin//fdisk -l /dev/sdb
 +#|
 +
 +LANG=C sudo /sbin//sfdisk -l /dev/sdb         
 +#| 
 +#| Disk /dev/sdb: 4865 cylinders, 255 heads, 63 sectors/track
 +#| read: Input/output error
 +#| 
 +#| sfdisk: read error on /dev/sdb - cannot read sector 0
 +#|  /dev/sdb: unrecognized partition table type
 +#| No partitions found
 +
 +LANG=C sudo parted /dev/sdb -s print
 +#| Error: /dev/sdb: unrecognised disk label
 +</code>
 +
 +
 +
 +
 +===== BADBLOCKS =====
 +
 +<code>
 +sudo badblocks -v /dev/sdb
 +Checking blocks 0 to 39082679
 +Checking for bad blocks (read-only test): 0 0.00% done, 0:00 elapsed
 +1
 +2
 +3
 +4
 +5
 +6
 +7
 +8
 +9
 +10
 +11
 +12
 +13
 +14
 +15
 +16
 +17
 +18
 +190.00% done, 0:01 elapsed
 +20
 +</code>
 +
 +  * https://linoxide.com/linux-how-to/how-to-fix-repair-bad-blocks-in-linux/# BadBlocks
 +
 +
 +
 +
 +==== QEMU/KVM ====
 +
 +<code>
 +sudo kvm -ncurses /dev/sdb
 +
 +  QEMU BIOS - build: 11/02/09                                                     
 +                              $Revision: 1.182 $ $Date: 2007/08/01 17:09:51 $                                 
 +                              Options: apmbios pcibios eltorito rombios32                                     
 +                                                                                                              
 +                              ata0 master: QEMU HARDDISK ATA-7 Hard-Disk (38166 MBytes)                       
 +                              ata1 master: QEMU DVD-ROM ATAPI-4 CD-Rom/DVD-Rom                                
 +                                                                                                              
 +                              Booting from Hard Disk...                                                       
 +                              Boot failed: could not read the boot disk                                       
 +                                                                                                              
 +                              Booting from Floppy...                                                          
 +                              Boot failed: could not read the boot disk                                       
 +                                                                                                              
 +                              Booting from CD-Rom...                                                          
 +                              CDROM boot failure code : 0003                                                  
 +                              Boot failed: could not read the boot disk                                       
 +                                                                                                              
 +                              FATAL: No bootable device.                                                      
 +                                                                 
 +</code>
 +
 +
 +==== DBENCH ====
 +
 +<code>
 +sudo apt-get install dbench
 +dbench 1
 +dbench version 4.00 - Copyright Andrew Tridgell 1999-2004
 +
 +Running for 600 seconds with load '/usr/share/dbench/client.txt' and minimum warmup 120 secs
 +failed to create barrier semaphore 
 +1 of 1 processes prepared for launch   0 sec
 +releasing clients
 +   1       664    21.16 MB/sec  warmup   1 sec  latency 678.136 ms
 +</code>
 +
 +
 +===== FS : Input/output error =====
 +
 +<code>
 +find . > /dev/null
 +Input/output error
 +
 +stat $dir
 +stat: cannot stat '$dir': Input/output error
 +sudo mkdir -p ../lost+found/local/tmp/$PWD/$dir.tmp
 +sudo mv $dir ../lost+found/local/tmp/$PWD/$dir.tmp # mv: cannot stat '$file': Input/output error
 +
 +
 +[334584.007637] sd 8:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
 +[334584.007640] sd 8:0:0:0: [sdd] tag#0 Sense Key : Medium Error [current] 
 +[334584.007642] sd 8:0:0:0: [sdd] tag#0 Add. Sense: Unrecovered read error
 +[334584.007643] sd 8:0:0:0: [sdd] tag#0 CDB: Read(10) 28 00 47 ae fb 24 00 00 08 00
 +[334584.007645] blk_update_request: critical medium error, dev sdd, sector 1202649892
 +[334586.833312] sd 8:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
 +[334586.833316] sd 8:0:0:0: [sdd] tag#0 Sense Key : Medium Error [current] 
 +[334586.833318] sd 8:0:0:0: [sdd] tag#0 Add. Sense: Unrecovered read error
 +[334586.833320] sd 8:0:0:0: [sdd] tag#0 CDB: Read(10) 28 00 47 ae fb 2c 00 00 08 00
 +[334586.833322] blk_update_request: critical medium error, dev sdd, sector 1202649900
 +[334589.662247] sd 8:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
 +[334589.662251] sd 8:0:0:0: [sdd] tag#0 Sense Key : Medium Error [current] 
 +[334589.662254] sd 8:0:0:0: [sdd] tag#0 Add. Sense: Unrecovered read error
 +[334589.662256] sd 8:0:0:0: [sdd] tag#0 CDB: Read(10) 28 00 47 ae fb 34 00 00 d8 00
 +[334589.662258] blk_update_request: critical medium error, dev sdd, sector 1202649908
 +[334592.487807] sd 8:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
 +[334592.487811] sd 8:0:0:0: [sdd] tag#0 Sense Key : Medium Error [current] 
 +[334592.487814] sd 8:0:0:0: [sdd] tag#0 Add. Sense: Unrecovered read error
 +[334592.487816] sd 8:0:0:0: [sdd] tag#0 CDB: Read(10) 28 00 47 ae fb 3c 00 00 d0 00
 +[334592.487818] blk_update_request: critical medium error, dev sdd, sector 1202649916
 +[334592.487848] EXT4-fs error (device sdd5): __ext4_get_inode_loc:4093: inode #33557989: block 134217982: comm stat: unable to read itable block
 +
 +sudo smartctl -a $disk | grep -i reallocated
 +
 +  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
 +196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
 +
 +sudo hdparm --read-sector $sector $disk
 +
 +</code>
 +
 +
 +  * http://www.sj-vs.net/forcing-a-hard-disk-to-reallocate-bad-sectors/
 +===== MISC =====
 +
 +  sudo kvm -hda /dev/sdb -cdrom ubcd503.iso -boot d
 +
 +http://www.ultimatebootcd.com/# MHDD32 4.6
 +
 +
 +
 +===== SPIN =====
 +
 +  dmesg
 +  [14751.124982] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
 +  [14754.052499] ata3.00: configured for UDMA/133
 +
 +
 +  * https://github.com/rickysarraf/laptop-mode-tools#
 +  * https://github.com/rickysarraf/laptop-mode-tools/wiki/FAQ#
 +  * https://unix.stackexchange.com/questions/129454/how-to-prevent-the-linux-kernel-from-waking-a-secondary-hdd-from-sleep#
 +
 +===== MORE =====
 +
 +@TaG: [[IDE]] [[HardDisk]] [[hdd]] [[CDROM]] [[DVD]] [[Dell]] [[SATA]] [[PATA]] [[SeaGate]] [[sg]] [[sd]] [[wd]] [[atapi]] [[smart]] [[wdc]] [[ext3]] SsD
 +
 +
 +{{http://belint.info/images/PCB.WD.40GB.JPG}}
 +
 +{{http://forum.hddguru.com/download/file.php?id=35&mode=view#.jpg}}
  
ata.txt · Last modified: 2022/04/16 12:22 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki