Re: I'd like to fix read failure issue on Mac OS X

Dan Lukes <[email protected]>
Newsgroups gmane.linux.utilities.smartmontools
Message-ID <[email protected]>
On 12/20/14 15:21, Kimio Miyamura:
> $ hdparm --yes-i-know-what-i-am-doing --write-sector 976783240 /dev/sdc
> /dev/sdc:
> re-writing sector 976783240: FAILED: Input/output error
>
> I don't know why "Input/output error" occurs...


For example because your's disc have 4k physical sector. Write of 512B 
logical sector mean that:
1. physical sector is read into drive's buffer
2. 512B of buffer is rewritten by supplied data
3. physical sector is written into medium

With unreadable physical sector the step 1 will fail. It will abort the 
overall procedure with IO error. No write to medium is performed, so no 
bad sector is relocated.

To relocate physical sector you need to write physical sector.

I observed such behavior on WD disc, but other vendors may have similar 
implementation.

I don't know how to do it with hdparm utility. I used
dd bs=4096 ...
successfully (but block numbers need to be calculated properly according 
the block size selected!)

Dan


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.