Is fdisk broken?

mla_strick at mla_strick at
Fri Mar 22 14:33:48 UTC 2013

I recently bought a 4 TB usb disk drive and discovered that it reported
a sector size of 4096 bytes instead of the traditional 512 bytes.  This
is apparently necessary because there may be a 32 bit sector number field
somewhere in the usb mass storage protocols.  It turns out that disk
drive manufacturers have been producing disks with large sector sizes
for some years now.  The feature goes by the name "Advanced Format" and
other things.  Look it up in Wikipedia.

FreeBSD seems to use the sector size information when interpreting MBR
partition offsets and sizes.  Unfortunately, when I try to use fdisk to
print out the partition table on my new disk drive, fdisk just says
"fdisk: could not detect sector size".  Otherwise the MBR partition
table seems to work correctly and newfs seems to have done the right
thing.  (It made the file system fragment size a multiple of the sector
size and I am not getting any weird error messages out of the disk
driver.)  It would be nice if fdisk also worked.  I do have to share
the disk with other operating systems that might not understand other
partition table schemes.

Is may analysis of what is going on essentially correct?
Can fdisk be made happy again?  (At least for a few more years?)

Dan Strick
(mla_strick at

More information about the freebsd-bugs mailing list