[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: linux isn't robust enough to handle bad sector??



	Hi.

On Sun, Sep 20, 2020 at 02:37:32AM +0000, Long Wind wrote:
> i'm creating FS on problem disk 
> though it has passed short and long tests by smart tooli meet bad sector, mkfs complains foreverCtrl+C can't kill it, what should i do NOW??

> [ 2719.089156] ata4.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
> [ 2719.089171] ata4.00: failed command: WRITE DMA EXT
> [ 2719.089185] ata4.00: cmd 35/00:00:18:68:e1/00:08:0c:00:00/e0 tag 0 dma 1048576 out
>                         res 40/00:01:01:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
> [ 2719.089192] ata4.00: status: { DRDY }

That's not a "bad sector". This is a "bad sector":

Jan 29 07:41:01 xxx kernel: [5687751.356991] sd 0:x:x:x: [sdx] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Jan 29 07:41:01 xxx kernel: [5687751.357016] sd 0:x:x:x: [sdx] tag#0 Sense Key : Medium Error [current]
Jan 29 07:41:01 xxx kernel: [5687751.357024] sd 0:x:x:x: [sdx] tag#0 Add. Sense: Unrecovered read error
Jan 29 07:41:01 xxx kernel: [5687751.357030] sd 0:x:x:x: [sdx] tag#0 CDB: Read(10) 28 00 01 0e f0 80 00 00 80 00
Jan 29 07:41:01 xxx kernel: [5687751.357036] blk_update_request: critical medium error, dev sdx, sector 17756288

And you can easily tell one from another. Yours is saying "timeout".
Mine's saying "critical medium error".

What you're seeing is your drive's firmware is hanging on processing a
certain SCSI command. Could be the drive itself, its firmware, or (as
other helpfully suggested) - the SATA cable,

To answer your question - Linux can handle bad sectors just fine. It's
the failing hardware (especially consumer-quality failing hardware) that
it has difficulties with.

Reco


Reply to: