Overview of FAT, HPFS, and NTFS File Systems

This article was previously published under Q100108
SUMMARY
This article explains the differences between FAT, HPFS, and NTFSunder Windows NT, and their advantages and disadvantages. It isdivided into the following sections:

  • FAT Overview
  • HPFS Overview
  • NTFS Overview
NOTE: HPFS is only supported under Windows NT versions 3.1, 3.5,and 3.51. Windows NT 4.0 does not support and cannot access HPFSpartitions. Also, the FAT32 file system is only supported in the Windows 98/95 and Windows 2000.
MORE INFORMATION

FAT OVERVIEW

FAT is by far the most simplistic of the file systems supported byWindows NT. The FAT file system is characterized by the fileallocation table (FAT), which is really a table that resides at thevery "top" of the volume. To protect the volume, two copies of the FATare kept in case one becomes damaged. In addition, the FAT tables andthe root directory must be stored in a fixed location so that thesystem's boot files can be correctly located.

A disk formatted with FAT is allocated in clusters, whose size aredetermined by the size of the volume. When a file is created, an entryis created in the directory and the first cluster number containingdata is established. This entry in the FAT table either indicates thatthis is the last cluster of the file, or points to the next cluster.

Updating the FAT table is very important as well as time consuming. Ifthe FAT table is not regularly updated, it can lead to data loss. Itis time consuming because the disk read heads must be repositioned tothe drive's logical track zero each time the FAT table is updated.

There is no organization to the FAT directory structure, and files aregiven the first open location on the drive. In addition, FAT supportsonly read-only, hidden, system, and archive file attributes.

FAT Naming Convention

FAT uses the traditional 8.3 file naming convention and all filenamesmust be created with the ASCII character set. The name of a file ordirectory can be up to eight characters long, then a period (.)separator, and up to a three character extension. The name must startwith either a letter or number and can contain any characters exceptfor the following:
   . " / \ [ ] : ; | = ,				
If any of these characters are used, unexpected results may occur. Thename cannot contain any spaces.

The following names are reserved:
   CON, AUX, COM1, COM2, COM3, COM4, LPT1, LPT2, LPT3, PRN, NUL				
All characters will be converted to uppercase.

Advantages of FAT

It is not possible to perform an undelete under Windows NT on any ofthe supported file systems. Undelete utilities try to directly accessthe hardware, which cannot be done under Windows NT. However, if thefile was located on a FAT partition, and the system is restarted underMS-DOS, the file can be undeleted. The FAT file system is best fordrives and/or partitions under approximately 200 MB, because FATstarts out with very little overhead. For further discussion ofFAT advantages, see the following:
  • Microsoft Windows NT Server "Concepts and Planning Guide," Chapter 5, section titled "Choosing a File System"
  • Microsoft Windows NT Workstation 4.0 Resource Kit, Chapter 18, "Choosing a File System"
  • Microsoft Windows NT Server 4.0 Resource Kit "Resource Guide," Chapter 3, section titled "Which File System to Use on Which Volumes"

Disadvantages of FAT

Preferably, when using drives or partitions of over 200 MB the FATfile system should not be used. This is because as the size of thevolume increases, performance with FAT will quickly decrease. It isnot possible to set permissions on files that are FAT partitions.

FAT partitions are limited in size to a maximum of 4 Gigabytes (GB)under Windows NT and 2 GB in MS-DOS. For additional information onthis limitation, please see the following article in the MicrosoftKnowledge Base:
ARTICLE-ID: 118335
TITLE : Maximum Partition Size in MS-DOS
For further discussion of other disadvantages of FAT, see thefollowing:
  • Microsoft Windows NT Server "Concepts and Planning Guide," Chapter 5, section titled "Choosing a File System"
  • Microsoft Windows NT Workstation 4.0 Resource Kit, Chapter 18, "Choosing a File System"
  • Microsoft Windows NT Server 4.0 Resource Kit "Resource Guide," Chapter 3, section titled "Which File System to Use on Which Volumes"

HPFS OVERVIEW

The HPFS file system was first introduced with OS/2 1.2 to allow forgreater access to the larger hard drives that were then appearing onthe market. Additionally, it was necessary for a new file system toextend the naming system, organization, and security for the growingdemands of the network server market. HPFS maintains the directoryorganization of FAT, but adds automatic sorting of the directory basedon filenames. Filenames are extended to up to 254 double bytecharacters. HPFS also allows a file to be composed of "data" andspecial attributes to allow for increased flexibility in terms ofsupporting other naming conventions and security. In addition, theunit of allocation is changed from clusters to physical sectors (512bytes), which reduces lost disk space.

Under HPFS, directory entries hold more information than under FAT. Aswell as the attribute file, this includes information about themodification, creation, and access date and times. Instead of pointingto the first cluster of the file, the directory entries under HPFSpoint to the FNODE. The FNODE can contain the file's data, or pointersthat may point to the file's data or to other structures that willeventually point to the file's data.

HPFS attempts to allocate as much of a file in contiguous sectors aspossible. This is done in order to increase speed when doingsequential processing of a file.

HPFS organizes a drive into a series of 8 MB bands, and wheneverpossible a file is contained within one of these bands. Between eachof these bands are 2K allocation bitmaps, which keep track of whichsectors within a band have and have not been allocated. Bandingincreases performance because the drive head does not have to returnto the logical top (typically cylinder 0) of the disk, but to thenearest band allocation bitmap to determine where a file is to bestored.

Additionally, HPFS includes a couple of unique special data objects:

Super Block

The Super Block is located in logical sector 16 and contains a pointerto the FNODE of the root directory. One of the biggest dangers ofusing HPFS is that if the Super Block is lost or corrupted due to abad sector, so are the contents of the partition, even if the rest ofthe drive is fine. It would be possible to recover the data on thedrive by copying everything to another drive with a good sector 16 andrebuilding the Super Block. However, this is a very complex task.

Spare Block

The Spare Block is located in logical sector 17 and contains a tableof "hot fixes" and the Spare Directory Block. Under HPFS, when a badsector is detected, the "hot fixes" entry is used to logically pointto an existing good sector in place of the bad sector. This techniquefor handling write errors is known as hot fixing.

Hot fixing is a technique where if an error occurs because of a badsector, the file system moves the information to a different sectorand marks the original sector as bad. This is all done transparent toany applications that are performing disk I/O (that is, theapplication never knows that there were any problems with the harddrive). Using a file system that supports hot fixing will eliminateerror messages such as the FAT "Abort, Retry, or Fail?" error messagethat occurs when a bad sector is encountered.

Note: The version of HPFS that is included with Windows NT does notsupport hot fixing.

Advantages of HPFS

HPFS is best for drives in the 200-400 MB range. For more discussionof the advantages of HPFS, see the following:
  • Microsoft Windows NT Server "Concepts and Planning Guide," Chapter 5, section titled "Choosing a File System"
  • Microsoft Windows NT Workstation 4.0 Resource Kit, Chapter 18, "Choosing a File System"
  • Microsoft Windows NT Server 4.0 Resource Kit "Resource Guide," Chapter 3, section titled "Which File System to Use on Which Volumes"

Disadvantages of HPFS

Because of the overhead involved in HPFS, it is not a very efficientchoice for a volume of under approximately 200 MB. In addition, withvolumes larger than about 400 MB, there will be some performancedegradation. You cannot set security on HPFS under Windows NT.

HPFS is only supported under Windows NT versions 3.1, 3.5, and 3.51.Windows NT 4.0 cannot access HPFS partitions.

For additional disadvantages of HPFS, see the following:

  • Microsoft Windows NT Server "Concepts and Planning Guide," Chapter 5, section titled "Choosing a File System"
  • Microsoft Windows NT Workstation 4.0 Resource Kit, Chapter 18, "Choosing a File System"
  • Microsoft Windows NT Server 4.0 Resource Kit "Resource Guide," Chapter 3, section titled "Which File System to Use on Which Volumes"

NTFS OVERVIEW

From a user's point of view, NTFS continues to organize files intodirectories, which, like HPFS, are sorted. However, unlike FAT orHPFS, there are no "special" objects on the disk and there is nodependence on the underlying hardware, such as 512 byte sectors. Inaddition, there are no special locations on the disk, such as FATtables or HPFS Super Blocks.

The goals of NTFS are to provide:
  • Reliability, which is especially desirable for high end systems and file servers
  • A platform for added functionality
  • Support POSIX requirements
  • Removal of the limitations of the FAT and HPFS file systems

Reliability

To ensure reliability of NTFS, three major areas were addressed:recoverability, removal of fatal single sector failures, and hotfixing.

NTFS is a recoverable file system because it keeps track oftransactions against the file system. When a CHKDSK is performed onFAT or HPFS, the consistency of pointers within the directory,allocation, and file tables is being checked. Under NTFS, a log oftransactions against these components is maintained so that CHKDSKneed only roll back transactions to the last commit point in order torecover consistency within the file system.

Under FAT or HPFS, if a sector that is the location of one of the filesystem's special objects fails, then a single sector failure willoccur. NTFS avoids this in two ways: first, by not using specialobjects on the disk and tracking and protecting all objects that areon the disk. Secondly, under NTFS, multiple copies (the number dependson the volume size) of the Master File Table are kept.

Similar to OS/2 versions of HPFS, NTFS supports hot fixing.

Added Functionality

One of the major design goals of Windows NT at every level is toprovide a platform that can be added to and built upon, and NTFS is noexception. NTFS provides a rich and flexible platform for other filesystems to be able to use. In addition, NTFS fully supports theWindows NT security model and supports multiple data streams. Nolonger is a data file a single stream of data. Finally, under NTFS, auser can add his or her own user-defined attributes to a file.

POSIX Support

NTFS is the most POSIX.1 compliant of the supported file systemsbecause it supports the following POSIX.1 requirements:

Case Sensitive Naming:

Under POSIX, README.TXT, Readme.txt, and readme.txt are alldifferent files.

Additional Time Stamp:

The additional time stamp supplies the time at which the file was lastaccessed.

Hard Links:

A hard link is when two different filenames, which can be located indifferent directories, point to the same data.

Removing Limitations

First, NTFS has greatly increased the size of files and volumes, sothat they can now be up to 2^64 bytes (16 exabytes or18,446,744,073,709,551,616 bytes). NTFS has also returned to the FATconcept of clusters in order to avoid HPFS problem of a fixed sectorsize. This was done because Windows NT is a portable operating systemand different disk technology is likely to be encountered at somepoint. Therefore, 512 bytes per sector was viewed as having a largepossibility of not always being a good fit for the allocation. Thiswas accomplished by allowing the cluster to be defined as multiples ofthe hardware's natural allocation size. Finally, in NTFS all filenames areUnicode based, and 8.3 filenames are kept along with long filenames.

Advantages of NTFS

NTFS is best for use on volumes of about 400 MB or more. This isbecause performance does not degrade under NTFS, as it does under FAT,with larger volume sizes.

The recoverability designed into NTFS is such that a user shouldnever have to run any sort of disk repair utility on an NTFSpartition. For additional advantages of NTFS, see the following:
  • Microsoft Windows NT Server "Concepts and Planning Guide," Chapter 5, section titled "Choosing a File System"
  • Microsoft Windows NT Workstation 4.0 Resource Kit, Chapter 18, "Choosing a File System"
  • Microsoft Windows NT Server 4.0 Resource Kit "Resource Guide," Chapter 3, section titled "Which File System to Use on Which Volumes"

Disadvantages of NTFS

It is not recommended to use NTFS on a volume that is smaller thanapproximately 400 MB, because of the amount of space overhead involvedin NTFS. This space overhead is in the form of NTFS system files thattypically use at least 4 MB of drive space on a 100 MB partition.

Currently, there is no file encryption built into NTFS. Therefore,someone can boot under MS-DOS, or another operating system, and usea low-level disk editing utility to view data stored on an NTFSvolume.

It is not possible to format a floppy disk with the NTFS file system;Windows NT formats all floppy disks with the FAT file system becausethe overhead involved in NTFS will not fit onto a floppy disk.

For further discussion of NTFS disadvantages, see the following:
  • Microsoft Windows NT Server "Concepts and Planning Guide," Chapter 5, section titled "Choosing a File System"
  • Microsoft Windows NT Workstation 4.0 Resource Kit, Chapter 18, "Choosing a File System"
  • Microsoft Windows NT Server 4.0 Resource Kit "Resource Guide," Chapter 3, section titled "Which File System to Use on Which Volumes"

NTFS Naming Conventions

File and directory names can be up to 255 characters long, includingany extensions. Names preserve case, but are not case sensitive. NTFSmakes no distinction of filenames based on case. Names can contain anycharacters except for the following:
   ?  "  /  \  <  >  *  |  :				
Currently, from the command line, you can only create file namesof up to 253 characters.

NOTE: Underlying hardware limitations may impose additional partition size limitations in any file system. Particularly, a boot partition can be only 7.8 GB in size, and there is a 2-terabyte limitation in the partition table.

For more information about the supported file systems for Windows NT, please see the Windows NT Resource Kit.
3.10 3.50 3.51 4.00 prodnt gb eb
Properties

Article ID: 100108 - Last Review: 05/07/2007 21:32:18 - Revision: 5.6

  • Microsoft Windows NT Advanced Server 3.1
  • Microsoft Windows NT Workstation 3.1
  • Microsoft Windows NT Advanced Server 3.1
  • Microsoft Windows NT Workstation 4.0 Developer Edition
  • Microsoft Windows NT Server 3.51
  • kbfaq kbother KB100108
Feedback