237fe
![]() |
|
|
|
|
|||||||
| System Hardware Internal storage, motherboards, PCI cards, stuff inside the case. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I just bought 4 Western Digital Caviar Green WD10EARS, which uses 4k sectors: http://www.wdc.com/wdproducts/librar...579-771430.pdf However, diskinfo reports 512byte sectors. I hoped FreeBSD would figure out the sector size stuff. Is there any way to correct this? I am using the disks in a ZFS raidz. Code:
diskinfo -c ad12 ad12 512 # sectorsize 1000204886016 # mediasize in bytes (932G) 1953525168 # mediasize in sectors 1938021 # Cylinders according to firmware. 16 # Heads according to firmware. 63 # Sectors according to firmware. Last edited by DutchDaemon; December 23rd, 2009 at 00:00. |
|
#2
|
|||
|
|||
|
New ada disk driver and `camcontrol identify` on 8-STABLE should support such cases, but this wasn't tested yet, so feedback welcome.
|
| The Following User Says Thank You to mav@ For This Useful Post: | ||
tty23 (December 23rd, 2009) | ||
|
#3
|
|||
|
|||
|
Thanks for the quick reply, I will try that.
Well if I master the kernel compilation stuff
|
|
#4
|
|||
|
|||
|
Hi,
I ran camcontrol identify on the drive, but I cannot see any useful information in the output. Also in the man pages, I did not find anything to resolve the problem. Now I am a newbie when it comes to harddrive details, do I miss something? Diskinfo still reports a 512byte sector size with the new ahci driver. Code:
pass0: <WDC WD10EARS-00Y5B1 80.00A80> ATA/ATAPI-8 SATA 2.x device protocol ATA/ATAPI-8 SATA 2.x device model WDC WD10EARS-00Y5B1 firmware revision 80.00A80 cylinders 16383 heads 16 sectors/track 63 LBA supported 268435455 sectors LBA48 supported 1953525168 sectors PIO supported PIO4 DMA supported WDMA2 UDMA6 overlap not supported Feature Support Enable Value Vendor write cache yes yes read ahead yes yes Native Command Queuing (NCQ) yes 31/0x1F Tagged Command Queuing (TCQ) no no 31/0x1F SMART yes yes microcode download yes yes security yes no power management yes yes advanced power management no no 0/0x00 automatic acoustic management yes no 254/0xFE 128/0x80 |
|
#5
|
|||
|
|||
|
There should be line like:
sector size logical 512, physical 4096, offset 0 Probably it was added after you updated sources last time. But I think disk will still report logical sector size of 512 bytes to keep compatibility with legacy software. The only effect you may get now is that ada driver report physical sector size to GEOM via existing mechanism, allowing upper layers to use it somehow. I have no idea whether ZFS able to use that info. UFS and usual disk partitioning tools doesn't yet. Probably with appearance of such devices, work in this area should activate. |
|
#6
|
|||
|
|||
|
I've just implemented in HEAD some missing parts of the stripe info path from disk via GEOM RAIDs to user-level. Now diskinfo able to report stripe size and offset for any device and partition. I'll merge it later.
Now all questions left to partitioning tools and FS maintainers to make this info used without user interference. It should be easy to implement automatic partitions alignment. |
|
#7
|
|||
|
|||
|
I just installed FREEBSD-8 STABLE and ran
camcontrol identify ada0,it reports 512byte sectors instead of 4k. Maybe this is some kind of compatibility feature of the drive? Or do I need to install CURRENT? Code:
pass0: <WDC WD10EARS-00Y5B1 80.00A80> ATA-8 SATA 2.x device pass0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO size 8192bytes) protocol ATA/ATAPI-8 SATA 2.x device model WDC WD10EARS-00Y5B1 firmware revision 80.00A80 cylinders 16383 heads 16 sectors/track 63 sector size logical 512, physical 512, offset 0 LBA supported 268435455 sectors LBA48 supported 1953525168 sectors PIO supported PIO4 DMA supported WDMA2 UDMA6 overlap not supported Feature Support Enable Value Vendor read ahead yes yes write cache yes yes flush cache yes yes Native Command Queuing (NCQ) yes 31/0x1F Tagged Command Queuing (TCQ) no no 31/0x1F SMART yes yes microcode download yes yes security yes no power management yes yes advanced power management no no 0/0x00 automatic acoustic management yes no 254/0xFE 128/0x80 media status notification no no power-up in Standby yes no write-read-verify no no 0/0x0 unload no no free-fall no no Last edited by DutchDaemon; December 27th, 2009 at 19:12. |
|
#8
|
|||
|
|||
|
Sorry, I just saw that I missed your part on the compatibility stuff. So I will just use the disk as it is and wait for the next release
![]() Is there anything I can do to help you (the FreeBSD developers) on this issue? |
|
#9
|
|||
|
|||
|
Try to apply such a patch to camcontrol to get raw identify information from the drive:
Code:
--- camcontrol.c.prev 2009-11-26 11:44:11.000000000 +0200
+++ camcontrol.c 2009-12-26 23:37:42.000000000 +0200
@@ -1348,6 +1350,13 @@ ataidentify(struct cam_device *device, i
ata_bpack(ident_buf->media_serial, ident_buf->media_serial,
sizeof(ident_buf->media_serial));
+ for (i = 0; i < sizeof(struct ata_params) / 2; i++) {
+ if ((i % 10) == 0)
+ fprintf(stdout, "\n%3d: ", i);
+ fprintf(stdout, "%04x ", (uint16_t)ptr[i]);
+ }
+ fprintf(stdout, "\n");
+
fprintf(stdout, "%s%d: ", device->device_name,
device->dev_unit_num);
ata_print_ident(ident_buf);
|
|
#10
|
|||
|
|||
|
I added the lines manually, I hop I did it right.
# camcontrol identify ada1Code:
0: 427a 3fff c837 0010 0000 0000 003f 0000 0000 0000 10: 4457 572d 4143 3556 3235 3632 3338 0034 0000 0000 20: 0000 0000 0032 3038 302e 4130 3038 4457 2043 4457 30: 3031 4145 5352 302d 5930 4235 0031 0000 0000 0000 40: 0000 0000 0000 0000 0000 0000 0000 8010 0000 2f00 50: 4001 0000 0000 0007 3fff 0010 003f fc10 00fb 0110 60: ffff 0fff 0000 0007 0003 0078 0078 0078 0078 0000 70: 0000 0000 0000 0000 0000 001f 1706 0000 0044 0040 80: 01fe 0000 746b 7f61 4123 7469 bc41 4123 407f 0066 90: 0066 0000 fffe 0000 80fe 0000 0000 0000 0000 0000 100: 6db0 7470 0000 0000 0000 0000 0000 0000 5001 4ee2 110: 5913 e513 0000 0000 0000 0000 0000 0000 0000 4018 120: 4018 0000 0000 0000 0000 0000 0000 0000 0029 0000 130: 0000 0000 0000 16ce 0000 0000 0000 0000 0000 0000 140: 0000 0000 0004 0000 0000 0000 0000 0000 0000 0000 150: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 160: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 170: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 180: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 190: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 200: 0000 0000 0000 0000 0000 0000 3031 0000 0000 0000 210: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 220: 0000 0000 101e 0000 0000 0000 0000 0000 0000 0000 230: 0000 0000 0000 0000 0001 1000 0000 0000 0000 0000 240: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 250: 0000 0000 0000 0000 0000 a4a5 pass1: <WDC WD10EARS-00Y5B1 80.00A80> ATA-8 SATA 2.x device pass1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO size 8192bytes) protocol ATA/ATAPI-8 SATA 2.x device model WDC WD10EARS-00Y5B1 firmware revision 80.00A80 cylinders 16383 heads 16 sectors/track 63 sector size logical 512, physical 512, offset 0 LBA supported 268435455 sectors LBA48 supported 1953525168 sectors PIO supported PIO4 DMA supported WDMA2 UDMA6 overlap not supported Feature Support Enable Value Vendor read ahead yes yes write cache yes yes flush cache yes yes Native Command Queuing (NCQ) yes 31/0x1F Tagged Command Queuing (TCQ) no no 31/0x1F SMART yes yes microcode download yes yes security yes no power management yes yes advanced power management no no 0/0x00 automatic acoustic management yes no 254/0xFE 128/0x80 media status notification no no power-up in Standby yes no write-read-verify no no 0/0x0 unload no no free-fall no no |
|
#11
|
|||
|
|||
|
There should be some jumper on the drive, controlling it's behavior. Haven't you tried to move it?
|
|
#12
|
|||
|
|||
|
Yes, there are some jumpers on the drive, but unfortunately there is no
documentation on what they do (except for one, who should be set for WindowsXP compatibility). |
|
#13
|
|||
|
|||
|
I just googled around a bit, and it seems (as you said), that the drives do not announce the 4k sectors to the OS.
I now opened a support request at WDC. Hopefully they will give some information on the jumper settings. Last edited by tty23; January 4th, 2010 at 21:47. |
|
#14
|
|||
|
|||
|
I don't know if I'm missing the point. But the pdf you posted says:
Quote:
As I said, I'm sorry if I missed the point entirely. And I can see why the question on how to change sector size is still valid, although these drives seem to overcome the issue. |
|
#15
|
|||
|
|||
|
Yes, I think you are right zapher, it seems that with this thread, I missed the point entirely
![]() However, I asked at WDC if it is possible to announce the 4KB sector size to the OS by a jumper setting. So hopefully, this was not all in vain. |
|
#16
|
|||
|
|||
|
Discussion is almost never in vain
![]() Go play with your disk now. It's feeling all lonely and hollow :p |
|
#17
|
|||
|
|||
|
Latest ATA specifications allow drive to announce both logical and physical sector sizes. While logical have to stay 512 bytes for compatibility reasons, physical one can be reported 4K as-is. It would allow OS to self-tune to it better, not just aligning on some "magic" "lucky" offset, as Vista+ do.
|
|
#18
|
|||
|
|||
|
For a similar discussion on the OpenBSD misc mailing list see: http://www.mail-archive.com/misc@ope.../msg84625.html
|
|
#19
|
||||
|
||||
|
Quote:
![]() And there's details on how it all works on anandtech and tomshardware. |
|
#20
|
|||
|
|||
|
Quote:
Quote:
|
|
#21
|
|||
|
|||
|
For those that don't have these drives there's a bit of info on them at:
http://www.theregister.co.uk/2009/12...vanced_format/ sa |
|
#22
|
|||
|
|||
|
I also have a problem with 4096 sector size on Transcend StoreJet 18M external USB drive. I tried to install FreeBSD 8.0 stable on this external drive for easy future maintenance.
The sysinstall fdisk reported 8 times lower size. As I was convinient even with that size I tried to make a slice. Then I partitioned it and tried to write the changes. What I got was an error: Unable to make device node for /dev/da0s1a. I couldn't go any further with install. dmesg reports correct data for the disksize and sector size as does diskinfo. Livefs fdisk exits with error "could not detect sector size". What else should I try or how can I help the developers to fix it? |
|
#23
|
|||
|
|||
|
Maybe it's this "Windows XP compatibility" mode that forces the drive to report 512 byte sectors. Try removing it and see what is reported to camcontrol afterwards.
|
|
#24
|
|||
|
|||
|
I've just compared identify data with and without jumper installed. There is no any difference. Crap!
|
|
#25
|
|||
|
|||
|
Quote:
So, either use XP compatibility with a default partition alignment, or align all your partitions on 1MB boundaries for compatibility with probably every known partitioning and/or raid stripe (including software raid) and remove the XP compatibility jumper. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Adding another harddrive...? | jigglywiggly | General | 23 | December 23rd, 2009 03:00 |
| FreeBSD, ZFS, SSDs, and proper sector alignment. | jnr | System Hardware | 12 | November 18th, 2009 10:17 |
| Installing directly from harddrive? | Grubsnik | Installing & Upgrading | 4 | October 1st, 2009 11:59 |
| Mounting a harddrive | Roberth | General | 11 | January 20th, 2009 03:55 |
| Install to 2nd harddrive? | frito | Installing & Upgrading | 3 | December 30th, 2008 21:10 |