Re: SATA error while resume

Mark Lord
2007-08-19T14:26:21Z

> Kernel: 2.6.23-rc2 witch patches [1], but older and stable versions also
..
> Sometimes (one in ten, or rarely) I have this error while system resume
> from suspend to disk:
..
> ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
> ata1.00: irq_stat 0x40000001
> ata1.00: cmd 25/00:00:10:0b:f3/00:04:05:00:00/e0 tag 0 cdb 0x0 data
> 524288 in
> res 51/40:a4:6c:0b:f3/00:03:05:00:00/e0 Emask 0x9 (media error)
> ata1.00: configured for UDMA/100
> sd 0:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK
> sd 0:0:0:0: [sda] Sense Key : Medium Error [current] [descriptor]
> Descriptor sense data with sense descriptors (in hex):
> 72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00
> 05 f3 0b 6c
> sd 0:0:0:0: [sda] Add. Sense: Unrecovered read error - auto reallocate
> failed
> end_request: I/O error, dev sda, sector 99814252
> Read-error on swap-device (8:0:99814256)
...

Looks like a bad sector in the swap partition.
You can probably repair it by using this sequence of commands:

swapoff /dev/sdX <--- replace sdX with actual swap partition dev name
sync
cat /dev/zero > /dev/sdX
mkswap /dev/sdX
swapon /dev/sdX

If it recurs after doing that, then it's time for a new drive.

-ml