This article describes hard disk size constraints under Windows NT andWindows NT Advanced Server. To understand these constraints, it isnecessary to understand both the data structures that define the diskpartitions and the interactions between Windows NT and the system BIOSinterface used during the hardware and operating system's boot process.
The Partition Table
The data structure that describes the hard disk's partitions is knownas the partition table. It consists of a maximum of four 16-byte entries.Each entry has 10 fields that describe the following attributes of apartition:
FIELD SIZE ----------------- -------- Boot Flag 1 byte Starting Side 1 byte Starting Cylinder 10 bits Starting Sector 6 bits System Indicator 1 byte Ending Side 1 byte Ending Cylinder 10 bits Ending Sector 6 bits Relative Sectors 4 bytes Number of sectors 4 bytes
The System Indicator is used to specify the type of file system that iscontained in the partition. Some common values include:
VALUE FILE SYSTEM ----- ----------- 0x0B Primary Fat32 Partitions up to 2047 GB 0x0C Same as 0x0B, uses Logical Block Address Int 0x13 extensions 0x0E Same as 0x06, uses Logical Block Address Int 0x13 extensions 0x0F Same as 0x05, uses Logical Block Address Int 0x13 extensions 0x05 Extended partition 0x06 BIGDOS File Allocation Table (FAT) format. 0x07 Installable File System (IFS), eg: HPFS and NTFS
When a partition is a part of a Fault Tolerant (FT) set, Windows NT setsthe high bit of the System Indicator to distinguish it from non-FTpartition of the same type. For example, an FT FAT partition has a SystemIndicator value of 0x86 and an FT NTFS partition has a System Indicatorvalue of 0x87.
When a member of an FT set is disabled, Windows NT sets the two highestbits. For example, a disabled FAT partition has a System Indicator valueof 0xC6 and a disabled FT NTFS partition has a System Indicator value of0xC7.
The Boot Flag indicates which partition is active or bootable. Only onepartition on a disk can be active. The Boot Flag value for the activepartition is set to 0x80. Other partitions on the disk are set to 0x00. TheMaster Boot Record (described later in more detail) searches for this flagto locate the active boot sector.
Starting and Ending Side, Cylinder, and Sector
The Starting and Ending Side, Cylinder and Sector fields are very importantwith respect to how Windows NT interacts with the disk.
The maximum number of Sides (read/write heads) that can be represented with1 byte is 256. The maximum number of Cylinders that can be represented with10 bits is 1024. The maximum number of Sectors that can be represented with6 bits is 63 because Sectors start counting with 1 (versus Cylinders andSides which start counting with 0).
The Cylinder value, represented by 10 bits, is too large to fit into asingle byte. To store 10 bits, two bits are taken from the byte whichstores the 6 bit Sector value.
With a standard sector size of 512 bytes, the 24 bits used to record thestarting and ending sector addresses translates into a maximum possiblepartition size of 7.8GB (8,455,716,864 bytes) which can be described withthese fields. This is particularly important because the same field sizesare employed by the INT 13 BIOS interface which defines how the system BIOSinteracts with the hard disk.
The Relative Sectors represents the offset from the beginning of thepartition table to the beginning of the partition, counting by sectors.
Number of Sectors
The Number of Sectors represents the total number of sectors in thepartition.
NOTE: The Relative Sectors and Number of Sectors fields are each 32 bits insize. Under most conditions, together they contain the same information asStarting and End Side, Cylinder, and Sector values that are representedwith a total of 24 bits for Starting and 24 bits for Ending.
Windows NT Boot Process
On Intel-based computers, the system BIOS controls the initial operatingsystem boot process. After the initial Power On Self Test (POST) whenhardware components are initialized, the system BIOS identifies the bootdevice. Typically, this is a floppy disk or a hard disk. In the case of thehard disk, the BIOS reads the first physical sector on the disk, called theMaster Boot Sector, and loads an image of it into memory. The BIOS thentransfers execution to that image of the Master Boot Sector.
The Master Boot Record contains the partition table and a small amount ofexecutable code. The executable code examines the partition table andidentifies the active (or bootable) partition. The Master Boot Record thenfinds the active partition's starting location on the disk and loads animage of its first sector, called the Boot Sector, into memory. The MasterBoot Record then transfers execution to that Boot Sector image.
Whereas the Master Boot Record is generally operating system independent,the Boot Sector of the active partition is dependent on both the operatingsystem and the file system. In the case of Windows NT and Windows NTAdvanced Server, the Boot Sector is responsible for locating the executablefile, NTLDR, which continues the boot process. The only disk servicesavailable to the Boot Sector code at this stage of system boot up areprovided by the BIOS INT 13 interface. The Boot Sector code must be able tofind NTLDR and file system data structures such as the root directory, theFile Allocation Table (FAT) in the case of an MS-DOS FAT volume or theMaster File Table in the case of an NTFS volume. These must be presentwithin the area of the disk addressable by the 24-bit side, cylinder,sector structure used by the BIOS INT 13 interface and the partition table.This limits the size of the system partition to 7.8 gigabytes regardless ofwhich file system is used.NOTE
: Other constraints may apply depending on the computer hardware andfile system. Some of these constraints are discussed below.
In order to accommodate partitions larger than 7.8 gigabytes, Windows NTignores the values in the Starting and Ending sector address fields of thepartition table in favor of the Relative Offset and Number Of Sectorsfields. This provides eight additional bits to represent sectors. Theseadditional bits allow partitions to be described with up to 2^32 sectors.
With a standard sector size of 512 bytes, the 32 bits used to represent theRelative Offset and Number of Sectors translates into a maximum possiblepartition size of 2 terabytes or (2,199,023,255,552 bytes).
When partitioning a disk, Windows NT will write the correct values to thepartition table fields whenever possible. When the total number of sectorsin a partition exceeds the number which can be described in Side, Cylinder,Sector notation, Windows NT writes the maximum permitted values to thesefields in the partition table. This prevents the system BIOS fromattempting to calculate the Starting and Ending addresses based onerroneous data.
For example, assume you have a 3.5GB SCSI drive attached to an Adaptec 154xseries SCSI controller. If the extended sector translation feature isdisabled on the adapter, it might report the following disk characteristicsto the system BIOS:
Cylinders: 1023, Sides: 64, Sectors: 32
which translates to about 1 gigabyte. With the extended translationenabled, the device might be reported as having these characteristics:
Cylinders: 435, Sides: 255, Sectors: 63
which translates to about 3.5GB.
Once Windows NT is up and running, it uses its SCSI drivers to directlyinteract with the disk without using the BIOS INT 13 interface. So, duringnormal operation the BIOS parameters are largely unimportant. However, thedifferences are critical if the disk is to be formatted with a singlepartition and used as the boot drive.
Without extended translation, Windows NT notices that the disk is largerthan the BIOS parameters indicate. When Windows NT partitions the driveduring initial installation, the starting and ending sector addresses willbe filled in with their maximum possible values. This makes it impossiblefor the Master Boot Record code to function correctly despite the fact thatthe drive is less than 7.8 gigabytes.
With extended translation, Windows NT will be able to write valid valuesfor the starting and ending addresses into the partition table, and thus,the partition remains bootable.
These error messages may appear when extended translation is not enabledand the Master Boot Record is unable to locate the Boot Sector of theactive partition:
Error loading operating system.
Missing operating system.
FAT and HPFS both have internal limits of 4 GB due to the fact that theyuse 32-bit fields to store file sizes. NTFS uses 64-bit fields for allsizes, permitting its data structures to handle volumes up to 2^64 bytes(16 exabytes or 18,446,744,073,709,551,616 bytes).
This value is the theoretical limit for the NTFS file system. Practicallimits having to do with the maximum allowable partition size describedabove limit the size of an NTFS partition to approximately 2 terabytes.Because the 32-bit fields of the partition table refer to the number ofsectors in the partition, disks with larger sector sizes translate intolarger permissible partition sizes. Currently Windows NT supports sectorsizes up to 4 Kilobytes. With 4KB sectors, Windows NT can support a 16terabyte partition. As new hardware or software schemes become available,NTFS will be able to handle substantially larger volume sizes.
Drive and Controller Types
IDE drives use a different data structure for representing the number ofcylinders, heads, and sectors per track than the partition table and BIOSINT 13 interface. According to the IDE specifications, the maximum numberof cylinders is 65536, the maximum number of heads is 16, and the maximumnumber of sectors per track is 255. This yields a maximum of 136.9gigabytes, but because the BIOS/IDE interface has been constrained to usethe lowest common denominator, the result is a limit of about 528MB for anIDE drive on an Intel-based ISA bus computer. There are new drives anddrivers which use an "Enhanced Drive Parameter Table" to translate betweenthe logical sector layout internal to the IDE drive and the logical sectorlayout addressable by the BIOS INT 13 interface. These drivers and devicescan support larger disks.The SCSI II command set uses its own form of sector addressing whichcurrently supports disks as large as approximately 7 gigabytes.
Windows NT Fault Tolerant Volumes
Through the use of volume sets and stripe sets, Windows NT and Windows NTAdvanced Server permit the construction of logical volumes from multiplephysical disk partitions. This technique permits Windows NT to overcome thephysical hardware limitations imposed by various disk controllers andconstruct a logical volume larger than a single disk can support by itself.NOTE
: A logical volume is constructed to look just like a physical disk partition and it still must conform to the partition table layout described above. This means that a fault tolerant construct, such as a volume set, must have no more than a total of 2^32 sectors (or 2 terabytes at 512 bytes per sector).