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

Tim Small <[email protected]>
Newsgroups gmane.linux.utilities.smartmontools
Message-ID <[email protected]>
On 17/12/14 09:03, Kimio Miyamura wrote:
> Here, I got contradiction.  The LBA provided by short test is bigger
> than fdisk's sector size.  Also, with smratctl -a command, I got 
> different LBA from short test result.
> 
> Even though long test passed, short test fails always.  So I am a bit
> worry about it.  My request is how to fix read failure in Mac OS X.

If there's doubt about what the actual LBA is, then to be on the safe
side, I would try and use dd to read the entire disk:

dd if=/dev/disk5 of=/dev/null bs=512

on Linux I'd also use iflag=direct to stop any OS level buffering, but
don't know how this is done (if at all) on OSX.

You will then confirm where (if anywhere user-addressable) the error
actually is.

Reconfirm using

dd if=/dev/disk5 of=/dev/null bs=512 skip=suspectedLBA count=1

(again adding option for direct I/O if possible).



I'd then use dd with bs=512 if=/dev/zero  count=1 seek=suspectedLBA to
write to the correct disk device, and then confirm pending sector = 0 in
smartctl output.

If you can't find the sector, then maybe the drive is using something
like DCO.  In that case maybe best to use a Linux boot disk (something
like GRML, which includes smartctl and hdparm) to proceed with minimal
risk to your OS install.

Tim.


-- 
South East Open Source Solutions Limited
Registered in England and Wales with company number 06134732.
Registered Office: 2 Powell Gardens, Redhill, Surrey, RH1 1TQ
VAT number: 900 6633 53  http://seoss.co.uk/ +44-(0)1273-808309

------------------------------------------------------------------------------
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.