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

Robert S <[email protected]>
Newsgroups gmane.linux.utilities.smartmontools
Message-ID <[email protected]>
On 12/17/2014 3:48 PM, Kimio Miyamura wrote:
> 2014/12/18 3:15, Nathan Stratton Treadway <nathanst <at> ontko.com> wrote:
>
>> On Wed, Dec 17, 2014 at 18:03:04 +0900, Kimio Miyamura wrote:
>>> $ sudo fdisk /dev/disk5
>>> Password:
>>> Disk: /dev/disk5	geometry: 60801/255/63 [976773168 sectors]
>>> Signature: 0xAA55
>>>          Starting       Ending
>>> #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
>>> ------------------------------------------------------------------------
>>> 1: EE 1023 254  63 - 1023 254  63 [         1 -  976773167] <Unknown ID>
>>> 2: 00    0   0   0 -    0   0   0 [         0 -          0] unused
>>> 3: 00    0   0   0 -    0   0   0 [         0 -          0] unused
>>> 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused
>> I'm not sure if this will actually resolve your LBA v.s. size problem,
>> but the id value of "EE" shown above indicates that this disk is using
>> GPT for partitioning, and thus probably the "gpt" command is what you
>> want to be using to see the layout of the actual partitions on that
>> disk....
> Thanks for your advice.  Now I can get partition layout using Mac OS X built-in command.
>
> $ sudo gpt show -l /dev/disk5
>               start                 size      index  contents
>                    0                     1                PMBR
>                    1                     1                Pri GPT header
>                    2                   32                Pri GPT table
>                  34                     6
>                  40           409600      1         GPT part - "EFI System Partition"
>          409640     976101344      2         GPT part - "USB HD 3"
>    976510984           262151
>    976773135                   32                 Sec GPT table
>    976773167                     1                 Sec GPT header
>
> But sadly, the max result  976773167 < 976783240.
> I confirmed (976773167+1)*512=976773168*512=500,107,862,016bytes is exactly same as the bytes number of this hdd on my mac os x.
>
> Is there any wrong with usage or setting of smartctl?
> In addition, I'm using OS-X-SAT-SMART-Driver ver. 0.10 to enable S.M.A.R.T capability of external hdd.  Is this related with this mismatch of LBA?
>
> I have re-compiled smartmontools ver.6.3 but the result is same...
>
> Note: Currently all data on this hdd were taken shelter.  So I can do anything on this hdd...
>
>
Been mostly lurking in this conversation, but I can think of several 
possible reasons the sector size could be different:

1) The drive is using HPA or DCO to hide some sectors. I've never 
encountered DCO in the wild, but I have seen HPA twice. You can use 
hdparm to check for both. For HPA, hdparm -N /dev/<disk id> and for DCO, 
hdparm --dco-identify /dev/<disk id> . I'd check this first as it the 
most likely to be correct. The rest of the reasons below are *probably* 
not the cause of your issue.

2) The drive is an AF drive and the tools you are using are pre-AF drive 
tools. Most tools were updated years ago, so this is probably not the 
correct answer unless you are using really old tools.

3) You have mentioned this is an external drive, but didn't say which 
one. I have encountered a Seagate external where the controller 
scrambles the data as it puts it on the drive and descrambles as it 
reads it back. This is by design on some models. I learned of this when 
the controller went bad and I tried to read the drive's data without it 
(and talking with a Seagate Engineer). Possible the controller is 
screwing with the data, although this is probably not the problem.

4) The GPT specification explicitly requires its EFI GPT (0xEE) 
partition in the protective MBR to have CHS values that aren't 
technically legal.

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