# [solved] USB hd read errors - how to handle them

## toralf

From time to time I get from an external usb 2.0 hd :

```
Oct 11 11:52:05 n22 kernel: sd 6:0:0:0: [sdb] Unhandled sense code

Oct 11 11:52:05 n22 kernel: sd 6:0:0:0: [sdb]  

Oct 11 11:52:05 n22 kernel: Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE

Oct 11 11:52:05 n22 kernel: sd 6:0:0:0: [sdb]  

Oct 11 11:52:05 n22 kernel: Sense Key : Medium Error [current] 

Oct 11 11:52:05 n22 kernel: sd 6:0:0:0: [sdb]  

Oct 11 11:52:05 n22 kernel: Add. Sense: Unrecovered read error

Oct 11 11:52:05 n22 kernel: sd 6:0:0:0: [sdb] CDB: 

Oct 11 11:52:05 n22 kernel: Read(10): 28 00 02 0e 30 1a 00 00 08 00

Oct 11 11:52:05 n22 kernel: end_request: critical target error, dev sdb, sector 34484250

Oct 11 11:52:07 n22 kernel: sd 6:0:0:0: [sdb] Unhandled sense code

Oct 11 11:52:07 n22 kernel: sd 6:0:0:0: [sdb]  

Oct 11 11:52:07 n22 kernel: Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE

Oct 11 11:52:07 n22 kernel: sd 6:0:0:0: [sdb]  

Oct 11 11:52:07 n22 kernel: Sense Key : Medium Error [current] 

Oct 11 11:52:07 n22 kernel: sd 6:0:0:0: [sdb]  

Oct 11 11:52:07 n22 kernel: Add. Sense: Unrecovered read error

Oct 11 11:52:07 n22 kernel: sd 6:0:0:0: [sdb] CDB: 

Oct 11 11:52:07 n22 kernel: Read(10): 28 00 02 0d ab 22 00 00 08 00

Oct 11 11:52:07 n22 kernel: end_request: critical target error, dev sdb, sector 34450210

Oct 11 11:52:39 n22 kernel: sd 6:0:0:0: [sdb] Unhandled sense code

...
```

I'm wondering if and how I do mark such sectors as "wrong"Last edited by toralf on Sat Oct 12, 2013 9:26 pm; edited 1 time in total

----------

## frostschutz

What does smartctl say? Writing to those sectors should cause the HDD to reallocate them. But chances are the thing is just broken.

----------

## toralf

 *frostschutz wrote:*   

> What does smartctl say? Writing to those sectors should cause the HDD to reallocate them. But chances are the thing is just broken.

 hhm, 

```
n22 ~ # smartctl -a /dev/sdb | wgetpaste
```

gives http://bpaste.net/show/139610/

----------

## frostschutz

Well, it has a lot of reallocated sectors already. Don't trust this disk with important data anymore.

You could run a self test (smartctl -t long) and if that fails (read error at xy) you could overwrite the entire disk (using shred or dd) to force it to reallocate everything else that is damaged.

If that fails also, you just have to get a new one...

----------

## toralf

Well, the self test gave

```
Oct 12 23:01:17 n22 smartd[5964]: Device: /dev/sdb [USB Sunplus], 2 Offline uncorrectable sectors

Oct 12 23:01:17 n22 smartd[5964]: Device: /dev/sdb [USB Sunplus], previous self-test completed with error (read test element)

Oct 12 23:01:17 n22 smartd[5964]: Device: /dev/sdb [USB Sunplus], Self-Test Log error count increased from 0 to 1

```

in the syslog and smartctl -a shows http://bpaste.net/show/140004/ but I think not worth to get into panic, or ?

----------

## Jaglover

```
  5 Reallocated_Sector_Ct   0x0033   100   100   050    Pre-fail  Always       -       3632

# 1  Extended offline    Completed: read failure       00%      6726         34450210
```

I'd be worried.

----------

## frostschutz

No need for panic - just get a new disk. This one is bad...

----------

## toralf

Just to clarify - the whole disk has or "just a particular partition on int (I do have much more and rarely used space space on it at a different partition) ?

----------

