# HDDs with 4KB sector size



## dbi (Feb 15, 2010)

Apparently Linux and the corresponding partitioning tools were not prepared to deal automatically with disks that have 4KB sectors. It appears the default partitioning (1st partition starting at sector 63) puts this kind of disks in compatibility mode leading to tremendous speed decreases in Linux systems.

Employing schemas with partition starting points and lengths multiple of 8 sectors works around the problem for Linux-based systems.
(8 sectors of 512 bytes = 1 sector of 4 KBytes)

So, two questions:
 1) Does the same apply to FreeBSD?
 2) How does ZFS deal with this problem (does it at all) when zfs pools are created of whole disks?

P.S.
Here is a link to the most complete (Linux-centric) discussion on the subject I was able to find:
http://thread.gmane.org/gmane.linux.gentoo.user/225974


----------



## mav@ (Feb 15, 2010)

The main problem is that these WD disks doesn't report their physical sector size to the driver. That turns partition alignment into a kind of magic.

FreeBSD already has parts required to manage partition alignment, but they are not used by partitioning tools at this moment.


----------



## dbi (Feb 15, 2010)

*mav@*, thank you for the fast reply!

So, FreeBSD people have to be careful when creating the disk layout on those drives too, right?
How about ZFS using entire disks?


----------



## jem (Feb 15, 2010)

You might consider using GPT partitioning instead of the old MBR partition+bsdlabel scheme.  It makes it very simple to put your partitions exactly where you want them.  FreeBSD supports booting from GPT even on systems that don't have a UEFI BIOS.

As for ZFS' interaction with Advanced Format disks, this is something I'd like an answer to also.


----------



## hopla (Mar 10, 2010)

jem said:
			
		

> As for ZFS' interaction with Advanced Format disks, this is something I'd like an answer to also.


Adding a 'Me too!' here


----------



## tralafiti (Mar 21, 2010)

you can read about that at http://opensolaris.org/jive/thread.jspa?messageID=467368

in short: it does align wrong since the drive isn't reporting it's actual sector-size. in opensolaris it seems to be possible to set it manuel since build 120



> For disks that don't support reporting LOGICAL BLOCKS PER PHYSICAL BLOCK
> EXPONENT, customers can edit sd-config-list in sd.conf to config the
> logical blocks per physical block exponent to let sd report the configured
> value to DKIOCGMEDIAINFO. This configuration is per device type. Refer to
> PSARC 2008/465 for sd-config-list.



http://arc.opensolaris.org/caselog/PSARC/2008/769/final_spec.txt


----------



## tonyalbers (Apr 6, 2011)

*solution*

Check this page out:

http://blog.monsted.dk/?q=node/1

/tony


----------



## AndyUKG (Apr 6, 2011)

Also see here:

http://forums.freebsd.org/showthread.php?t=21644

ta Andy.


----------

