Opened 15 years ago

Closed 14 years ago

#62 closed enhancement (fixed)

4K info from IDENTIFY DEVICE

Reported by: tomk007 Owned by: Christian Franke
Priority: major Milestone: Release 5.41
Component: smartctl Version:
Keywords: Cc: virtuousfox, trunneml, haidinger

Description

I checked the ATA/ATAPI specification and it seems it may be possible to find real HW sector size from word 106 of IDENTIFY DEVICE command. Would it be possible to check this and propagate this information to user-space via smartctl? It will allow semi-automatic creation of properly aligned partitions on devices like WD6400AARS.

Attachments (1)

sdb.hexdump (14.5 KB ) - added by tomk007 15 years ago.

Download all attachments as: .zip

Change History (16)

in reply to:  description comment:1 by Christian Franke, 15 years ago

Owner: changed from somebody to Christian Franke
Status: newaccepted

Replying to tomk007:

... devices like WD6400AARS.

Could you please provide a hexdump of the ATA IDENTIFY data from such a device (output of smartctl -r ioctl,2 -i /dev/ice or hdparm --Istdout /dev/ice).

by tomk007, 15 years ago

Attachment: sdb.hexdump added

comment:2 by tomk007, 15 years ago

Do you need anything else from me to check this?

comment:3 by Christian Franke, 15 years ago

The IDENTIFY data from the attachment does not contain valid info in word 106:

===== [IDENTIFY DEVICE] DATA START (BASE-16) =====
...
208-223: 00 00 00 00 00 00 00 00 01 50 e2 4e b5 ae 3e 03
           word106...^^ ^^

Device has no long physical sectors or it violates ATA-8 ACS.

BTW: On Linux, hdparm -I /dev/ice prints logical/physical sector size from word 106 since hdparm 9.12.

comment:4 by tomk007, 15 years ago

OK, thanks, I will try to contact WD for their solution for this. From the specs I got an idea, there may be several places to look for this information, but this one should be default. Please do not close this ticket yet, will refer about WD's response.

in reply to:  4 ; comment:5 by Christian Franke, 15 years ago

Replying to tomk007:

OK, thanks, I will try to contact WD for their solution for this.

Any results so far?

Info from Linux ATA wiki:

Some of the existing BIOSs and/or drivers can't cope with drives which report 4KiB physical sector size. To work around this, some drive models lie that its physical sector size is 512 bytes when the actual configuration is 4KiB without offsetting.

in reply to:  5 ; comment:6 by tomk007, 15 years ago

Replying to chrfranke:

Any results so far?

Got:

...I will escalate your question to our second line support, as soon as i have an answer from them I will contact you back. Only reply to this e-mail if you do not get an answer from us in five working days...

from WD, will wait few more days and ask them about the state of my query.

in reply to:  6 comment:7 by tomk007, 15 years ago

Replying to tomk007:

from WD, will wait few more days and ask them about the state of my query.

Got this from WD support:

Response (Eric) - 04/09/2010 01:47 AM
Dear Tomas,

The drives are not highly tested on linux there for the info is limited.
But this i can provide

106

Physical sector size / Logical Sector Size
Bit 15: Shall be cleared to zero
Bit 14: Shall be set to one
Bit 13: If set, Device has multiple logical sectors per physical sector.
Bit 12: If set, Device Logical Sector Longer than 256 Words
Bit 11-4: Reserved
Bit 3-0: 2PX logical sectors per physical sector

Seems like it should provide the info in word 106, but it does not. I may try to check some Win tool to get data from ATA IDENTIFY so I can argue it does not depend on Linux at all.

comment:8 by tomk007, 15 years ago

There seems to be no other response from WD. They probably do not want to disclose the truth, either say that the device does not conform to standards or whatever. If there is no other interest I propose to close this ticket and maybe we can try some time later if the situation changes.

in reply to:  8 comment:9 by Christian Franke, 15 years ago

Summary: 4K info from IDENTIFY DEVICE4K info from IDENTIFY DEVICE (waiting for testcase)

Replying to tomk007:

There seems to be no other response from WD. They probably do not want to disclose the truth, either say that the device does not conform to standards or whatever.

According to this thread from OSNews the truth is probably that engineering sample drives were OK, but drives shipped later are not.

If there is no other interest I propose to close this ticket and maybe we can try some time later if the situation changes.

Let's keep the ticket open, I will add this feature when a real-world testcase is available.

comment:10 by virtuousfox, 14 years ago

Cc: virtuousfox added

comment:11 by trunneml, 14 years ago

Cc: trunneml added

comment:12 by Christian Franke, 14 years ago

The Samsung HD204UI (with buggy firmware 1AQ10001) has 4KiB physical sectors. It also returns an incorrect value in word 106:

208-223: 00 00 00 00 00 40 00 00 02 50 90 4e 41 04 e2 37
           word106...^^ ^^

0x4000 means 512 byte logical and physical sectors:

0100 0000 0000 0000
               ^^^^ (invalid)
  ^ 0b = one logical sector per physical sector, bits (3:0) are invalid
^^ 01b = this word is valid

IMO it should be 0x6003:

0110 0000 0000 0011
               ^^^^ 11b = 8 logical sectors per physical sector
  ^ 1b = bits (3:0) are valid
^^ 01b = this word is valid

comment:13 by haidinger, 14 years ago

Cc: haidinger added

comment:14 by Christian Franke, 14 years ago

Milestone: Release 5.41
Summary: 4K info from IDENTIFY DEVICE (waiting for testcase)4K info from IDENTIFY DEVICE

The 3TB drive WDC WD30EZRS-00J99B0 (firmware 80.00A80) returns the correct value 0x6003 (4KiB LPS) in word 106:

208-223: 00 00 00 00 03 60 00 00 01 50 e0 4e 7a 02 70 a3
           word106...^^ ^^

comment:15 by Christian Franke, 14 years ago

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.