I recently purchased an external disk drive with 3 terabytes (2.72 TiB) of storage capacity.
Now according to Wikipedia's article on MBR, the maximum addressable storage space on a disk formatted using the MBR scheme is restricted to 2TB (1.81 TiB) so it stands to reason that high capacity hard disk drives (>2TB) must be formatted using GUID Partition Table (GPT) scheme to be able to use the entire capacity of the HDD.
Why is then the 3TB WD My Book external disk drive factory formatted with the MBR scheme and even more surprisingly, why does it show up on Windows as a 2.72 TiB drive when MBR can only address upto 1.81 TiB?
Has anyone else with a high-capacity Western Digital (or other brand) hard drive seen this before?
If it helps, the HDD is formatted using NTFS
and the sector size is 4096 bytes
. Also, here are a few screenshots:
EDIT: After I posted my answer, I read this blog post from AnandTech which says:
Now LBAs under MBR partitions are addressed using 32-bit values, the
maximum of which is 2^32 or 4294967296. Each LBA on a hard drive
corresponds to a 512-byte sector value (even on 4K advance format
drives, they still appear as 512-byte sector drives to the OS), so the
largest partition you can have in a MBR partitioned drive is
4294967296 * 512-bytes or 2,199,023,255,552 bytes.
Hard drive manufacturers define 1TB as 1 trillion bytes. If we use
that definition then the largest 32-bit MBR partition would be 2.199TB
(2,199,023,255,552 bytes / 1,000,000,000,000). If we define 1TB as
1024^4 bytes (TiB) then the largest 32-bit MBR partition would be 2TiB
(2,199,023,255,552 bytes / 1,099,511,627,776). Either way, with a 3TB
drive there’s no way we’re getting a single 3TB partition using MBR.
But as you can see, the My Book I own has a single 3TB (2.72 TiB) partition and it's using MBR. The reason why this bothers me is because of this incident where a person claims to have encountered data integrity problems with the drive after transferring more than 2TB of data on the MBR formatted 3TB drive.
Answer
Your USB drive presents itself to the host computer with a logical sector size of 4096 bytes, and that's what enables it to be partitioned with an MBR partition table that can use more than 2 TB of the drive's space, even in Windows XP. MBR partition table entries are 32 bits, which allows a maximum of 2^32 sectors to be used. 2^32 sectors x 4096 bytes/sector = 16 TB. With 512 bytes/sector, only the first 2 TB of a drive could be used by an MBR partition table. (2^32 sectors x 512 bytes/sector = 2 TB)
However, your drive is not 4k native. There are two layers of translation:
- The USB enclosure contains a USB-to-SATA bridge that translates from 4096 bytes per logical sector at the USB interface with the host computer to 512 bytes per logical sector at the SATA interface with the drive inside.
- The drive inside internally translates from 512 bytes per logical sector on its SATA interface to 4096 bytes per physical sector. (That's 512 byte/sector emulation or "512e".)
A SMART query passed though the USB bridge to the SATA drive inside reveals the truth (run here on my own Western Digital My Book 3 TB external USB drive in Windows XP):
C:\Program Files\GSmartControl> smartctl -a -d sat pd11
smartctl 6.5 2016-05-07 r4318 [i686-w64-mingw32-xp-sp3] (sf-6.5-1)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Western Digital Green
Device Model: WDC WD30EZRX-00MMMB0
Serial Number: WD-WCAWZ12xxxxx
LU WWN Device Id: 5 0014ee 2063xxxxx
Firmware Version: 80.00A80
User Capacity: 3,000,592,982,016 bytes [3.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
The internal SATA drive reports 512 bytes per logical sector and 4096 bytes per physical sector: that's 512 byte/sector emulation, or "512e".
However the drive as seen by the host computer connected by USB has a logical sector size of 4096 bytes:
C:\> wmic DISKDRIVE get bytespersector, caption
BytesPerSector Caption
4096 WD My Book 1140 USB Device
and that's how Windows XP is able to use all 3 TB of the drive's space.
If you need more proof than that, you could remove the drive from its enclosure and connect it directly to a motherboard's SATA connector: you'd then find that the drive has a logical sector size of 512 bytes, and the drive's partitions would all appear as 1/8 their previous size and be unreadable due to incorrect partition table entries caused by the sector size mismatch. Plenty of people have done this and then had to fix the problem by rewriting the partition table.
I've checked several different external USB drives and they are all 512e internally despite being configured for Windows XP compatibility with 4096 bytes per logical sector at the USB interface: WD My Book 3 TB, WD Elements 3 TB, HGST Touro 4 TB, WD Easystore 8 TB, WD Easystore 12 TB.
Your drive came with an MBR partition table (or someone changed it to MBR at some point) to make it compatible with Windows XP. Newer drives come with GPT partition tables, which require Windows Vista or later.
The WD Quick Formatter tool can be used to change a Western Digital external USB drive between 512 bytes/sector with a GPT partition table (for Vista and later) and 4096 bytes/sector with an MBR partition table (for Windows XP compatibility).
No comments:
Post a Comment