# MBR max of 2TiB on each partition or on disk?

A quick point of clarification needed. With the MBR

Maketecheasier.com says

each partition can only go up to a maximum of 2TB in size

The Differences Between MBR and GPT

But IBM's Developerworks says

The MBR layout also limits the maximum size of disk that is supported to approximately 2TB

Learn Linux, 101 : Hard disk layout

Which is correct?

*cross posted on stackoverflow

• i think they both are. mbr can handle <=2Tb, partition cannot exceed physical space so (in mbr disk) <=2Tb too Jan 19 '16 at 5:08
• The system disk is limited to 2TB. Other disks can be partitioned into multiple partitions up to 2TB each. Jan 19 '16 at 13:42

Each partition cannot be longer than 2TB. This is because 2TB (roughly) is the maximum size that can be specified by to bytes 9 through 12, which is the starting sector in LBA format. Then, bytes 13-16 can specify the size, which must be 4,294,967,295 sectors or smaller, which is 2,199,023,255,040 bytes if each sector is 512 bytes (which was the most widely supported standard size for a sector, throughout the time when MBRs were regularly used). 2TB is 2,199,023,255,552 bytes, so the actual limit (with standard sized sectors) is 2TB - 512 bytes. Assuming we accept that approximation, MakeTechEasier.com's claim (mentioned in the question) is correct.

Then, bytes 13-16 of the MBR can specify the size, which similarly must be 2,199,023,255,040 or smaller (making the same assumptions about sector sizes). So the actual limit of what an MBR can specify (using the most common standards) is 4TB - 1KB.

However, a person could not have 4 partitions that are 1TB each, because starting on the 3rd partition would not be possible. That is too confusing for easy marketing, so people generally just refer to 2TB as the limit before potential problems could creep into the mixture. To, to keep the story simple, IBM's Developerworks is probably just saying what is recommended for businesses who just want things to work well, without experiences inconveniences from new limits to keep track of when trying to squeeze out every possible bit. It's far simpler to say: MBR=up to 2TB=okay, bigger is supported by GPT.

Note that the limits I'm referring to are just referring to the values that are stored in the disk structures. I'm not making any particular statements about support by various operating systems or BIOS implementations. Software might use a "signed" number to keep track of things. Such software code would effectively be more likely to have a 2TB limit than a 4TB limit. The idea of having a disk space that is usable by a partition, but which is not able to be the starting location of a partition, might violate some basic assumptions by certain software (like the "fdisk" disk partitioner, and the "setup" operating system's installer), etc. So IBM's statement may also have been trying to describe the likely experience, taking into account the complexity caused by a need to be supported by disk limitations (how much data fits in a certain amount of space), operating systems (including drivers for certain disks), and BIOS implementations. Although the limit stated by IBM can theoretically be worked around, via software, the provided information may be the right advice for someone who wants to avoid problems.

• Thanks for the very thorough answer. I'd give you an upvote, but in SuperUser my reputation is too low. Jan 21 '16 at 8:59
• I calculate myself, wondering why the limitation is 2TiB instead of 4Tib-1Kib, found answer here, thanks very much! Dec 2 '19 at 2:56

Both are correct -- and neither is correct.

First, the "neither" part: The MBR limit is 2^32 sectors. Given the common 512-byte sector sizes, the limit is 512 * 2^32 bytes, which works out to 2 TiB. Note that's TiB, not TB. See here, among other places, for information on the different between IEEE-1541 units (such as TiB) and SI units (such as TB). At the level of TB or TiB, the difference is about 10%, which is enough to cause a lot of confusion. Also, to add another pedantic note, one comment refers to "Tb," which is technically terabits, not terabytes -- that's off by a factor of 8; but I digress....

Worse, some disks have sectors that are not 512 bytes in size. Most commonly, some disks (mostly external USB drives, but also some internal disks) have 4096-byte sectors. On such disks, the MBR limit is raised to 16 TiB. Note that the sector size here is the logical sector size. Most modern hard disks have 4096-byte physical sectors, but since disk I/O and data structures, including partition tables, are handled in terms of logical sectors, it's the logical sector size that's important for this discussion. In any event, the upshot of this is that you might well have a 3 TB, 4 TB, or larger external USB disk that uses MBR and it will be fine.

Second, the "both" part: MBR's data structures are a bit of a mess, but the important part for this discussion is the way partitions are described in logical block address (LBA) form. This is as a start point and a size in sectors, both expressed as 32-bit sector values (hence the 2^32-sector limit). Because of this fact, an MBR disk's maximum partition size is 2^32 sectors (2 TiB, given a 512-byte sector size). This limit can't be overcome except by increasing the sector size or changing the partition table type. Because the partition start point is also a 32-bit value, it's theoretically possible to have 1-3 partitions that reside entirely in the first 2^32 sectors of the disk and then have a final partition of up to 2^32 sectors that starts just before the 2^32nd sector of the disk. Such a configuration would theoretically support disks of up to just under 4 TiB, given a 512-byte sector size. Of course, you'd still be limited to a 2^32-sector partition size, and the placement of the partitions would be extremely important. You couldn't have four 1 TiB partitions on such a disk, for instance. Thus, even this theoretical support for large disks is very limited.

Note that I've emphasized the word "theoretically" several times in the preceding paragraph. The reason is that many OSes and MBR-manipulation tools will flake out once the disk size exceeds 2^32 sectors, since these OSes and tools must still refer to data beyond the 2^32-sector point. Thus, it's not safe to create an MBR data structure in which a partition spans the 2^32-sector point, even though it's possible to create such a data structure. In fact, I ran some tests on this issue (see here for a summary of my results), and I found that the only OSes that worked with an MBR disk with a partition that spans the 2^32-sector value also worked well with GPT. Since GPT is so much more capable than MBR, there's little or no reason to risk using MBR in these situations. Furthermore, my tests did not cover every possible tool; even if you use an OS, like Linux or Windows 7, that can handle a larger-than-normal MBR disk, it's conceivable that you'll run a disk utility that will flake out on such a disk, which might then result in serious data loss.

In sum, you can use larger-than-2TiB disks with MBR if the disk has 4096-byte logical sectors. The most common way to do this is to put it in certain external USB enclosures. Using a larger-than-2TiB disk with 512-byte logical sectors, though, can be safely done only with GPT (or by not using the disk beyond the 2 TiB limit). Most modern OSes support GPT, so this isn't a hardship for most people.

• It might also be noteworthy that even legacy BIOS can boot from GPT. In fact, it doesn’t care about partitions at all, so it’s probably better to say that GPT is BIOS boot compatible. WIndows not being able to do it is a design decision by Microsoft. Jan 20 '16 at 15:59
• True; Linux, FreeBSD, OS X (Hackintosh), and probably others can all boot from GPT disks in BIOS mode. That said, there are occasional quirks and problems, as described on this page of mine. These issues can usually be overcome, but they can be hair-pullers if you're not prepared. Jan 20 '16 at 16:49