Training
Certifications
Books
Special Offers
Community




 
MCSA/MCSE Self-Paced Training Kit (Exam 70-215): Microsoft® Windows® 2000 Server, Second Edition
Author Microsoft Corporation
Pages 1392
Disk 2 Companion CD(s)
Level Int/Adv
Published 08/14/2002
ISBN 9780735617674
Price $59.99
To see this book's discounted price, select a reseller below.
 

More Information

About the Book
Table of Contents
Sample Chapter
Index
Related Series
Related Books
About the Author

Support: Book & CD

Rate this book
Barnes Noble Amazon Quantum Books

 


Chapter 4: Microsoft Windows 2000 File Systems continued


Lesson 2: File Allocation Table (FAT)

Windows 2000 supports two versions of the FAT file system: FAT16 and FAT32. This lesson provides an overview of both file system versions and their use within the Windows 2000 operating system.


After this lesson, you will be able to

  • Describe the Windows 2000 FAT16 file system
  • Describe the Windows 2000 FAT32 file system

Estimated lesson time: 25 minutes


Introduction to the FAT File System

The FAT file system was designed when disks were smaller and folder structures were simple. To protect the file system, two copies of the file allocation table are stored on the volume. In the event that one copy of the table is corrupted, the other table is used. The file allocation table is stored in a specified byte offset so that the files needed to start the system can be located.

FAT16 works the same in Windows 2000 as it does in MS-DOS, Windows 3.x, Windows 95, and Windows 98. FAT32 works the same in Windows 2000 as it does in Windows 95 OSR2 and Windows 98. You can install Windows 2000 on an existing FAT primary partition or logical drive. When running Windows 2000, you can move or copy files between FAT and NTFS volumes.

You cannot use Windows 2000 with any compression or partitioning software that requires disk drivers to be loaded by MS-DOS. Therefore, you cannot use MS-DOS 6.0 DoubleSpace or MS-DOS 6.22 DriveSpace on a FAT primary partition or logical drive that you want to access when running Windows 2000.

The FAT16 File System

The FAT disk format is organized into sectors. Each sector can store 512 bytes of data. This is the smallest unit that is used when reading or writing to or from the disk.

Although the sector is the smallest unit used when transferring data to and from a FAT partition, the cluster (also called an allocation unit) is the smallest unit the operating system uses when allocating file storage space on a FAT partition. The size of the cluster varies from drive to drive, depending on the size of the partition. The default cluster size is determined by the partition size and can be as large as 64 KB.

The file allocation table identifies each cluster in the partition as one of the following:

  • Unused
  • Cluster in use by a file
  • Bad cluster
  • Last cluster in a file

Figure 4.7 illustrates the structure of a FAT16 volume. The root folder contains an entry for each file and folder on the volume. The only difference between the root folder and other folders is that the root folder is on a specified location on the disk and has a fixed size of 512 table entries per disk drive. The number of entries on a floppy disk depends on the size of the disk.

Click to view graphic
Click to view graphic

Figure 4.7 Structure of a FAT16 volume

Folders have a 32-byte entry for each file and folder contained in the folder. The following table lists the components of the file and folder entries:

Entry componentBits
Name8.3 format
Attribute8
Create time24
Create date16
Last access date16
Last modified time16
Last modified date16
Starting cluster number in FAT16
File size32

There is no organization to the FAT folder structure. Files are given the first available location on the volume. The starting cluster number is the address of the first cluster used by the file. Each cluster contains a pointer to the next cluster in the file or a hex indicator (0xFFFF) that this cluster is the end of the file.

The information in the folder is used by all operating systems that support the FAT file system. Windows NT operating systems can store additional time stamps in a FAT folder entry. These time stamps show when the file was created or last accessed; they are used principally by portable operating system interface standard (POSIX) applications.

Because all entries in a folder are the same size, the attribute byte for each entry in a folder describes what kind of entry it is. For example, one bit indicates that the entry is for a subfolder, and another bit marks the entry as a volume label. Normally, only the operating system controls the settings of these bits.

The attribute byte includes four bits that can be turned on or off by the user:

  • Archive file
  • System file
  • Hidden file
  • Read-only file

The FAT16 file system is included in Windows 2000 to support backward compatibility with previous Windows products. In addition, FAT16 offers widespread compatibility with many other non-Microsoft operating systems.

As in previous versions, the maximum FAT16 partition size in Windows 2000 is 4 gigabytes (GB). The default cluster size is determined by the size of the partition. The following table shows the default cluster sizes for FAT16 volumes:

Partition sizeSectors per clusterCluster size
0 MB-32 MB1512 bytes (equivalent to the partition sector size)
33 MB-64 MB21024 bytes
65 MB-128 MB42048 bytes
129 MB-256 MB84096 bytes
256 MB-512 MB168192 bytes
512 MB-1024 MB3216 KB
1024 MB-2048 MB6432 KB
2048 MB-4096 MB12864 KB

You can specify a different cluster size if you use the Format utility with the /a:size switch from the command prompt to format the partition. However, default settings are strongly recommended for general use.

The FAT32 File System

The main benefit of FAT32 is its ability to support partitions larger than those handled by FAT16. FAT16 supports partitions up to 4 GB in size, while FAT32 supports partitions up to 2047 GB. However, Windows 2000 FAT32 implementations are limited to creating 32-GB volumes, although existing FAT32 volumes greater than 32 GB can be mounted. Except for this partition-formatting limit, the FAT32 on-disk format and features are the same on Windows 2000 as they are on Windows 95 OSR2 and Windows 98.

To maintain the greatest compatibility possible with existing programs, networks, and device drivers, FAT32 is implemented with as little change as possible to existing FAT16 architecture, internal data structures, application programming interfaces (APIs), and on-disk format.

However, because 4 bytes are now required in the table to store cluster values, many internal and on-disk data structures and published APIs have been revised or expanded. In some cases, existing APIs have been disabled to prevent legacy disk utilities from damaging the FAT32 drive. However, most programs will be unaffected by these changes. Existing FAT tools and drivers should continue to work on FAT32 partitions. MS-DOS operating system disk tools must be revised to support FAT32 drives.

FAT32 Partition Structure

The major benefit of FAT32 over FAT16 is the larger partition sizes it can support. FAT32 breaks the 4-GB partition limit by extending partition capacity. If you format a partition with FAT16, you have to specify at least a 32-KB cluster to support a 4-GB or larger partition.

The largest possible file for a FAT32 drive is 4 GB minus 2 bytes. FAT32 includes 4 bytes per cluster within the file allocation table. This differs from the FAT16 file system, which contains 2 bytes per cluster.

A FAT32 partition must have at least 65,527 clusters, and the partition cluster size cannot be increased. Figure 4.8 illustrates the structure of a FAT32 partition.

Click to view graphic
Click to view graphic

Figure 4.8 Structure of a FAT32 volume

FAT16 and FAT32 file systems do not scale well. As the volume gets bigger, the file allocation table gets bigger. One disadvantage of a large file allocation table is that it dramatically increases the amount of time it takes the operating system to compute how much free space is on the boot volume upon reboot.

The file allocation table is a packed list of 32-bit entries that have a one-to-one mapping with the data clusters. The folder structure of FAT32 is used in the same way that Windows 95 implements long file names. The only difference is the addition of the cluster high-word field in directory entries that access cluster numbers.

File System Limits

The maximum size of a FAT32 volume is limited by the maximum number of FAT entries, the number of sectors per cluster, and the 32-bit sector count in the partition record. (Sectors of 512 bytes each are assumed.)

The following table maps the maximum partition size possible per cluster size:

Cluster sizeMaximum volume size
512 bytes127.9 GB
1 KB255.9 GB
2 KB511.9 GB
4 KB1023.9 GB or 1 Terabyte (TB)
8 KB2047 GB (2 TB)
16 KB2047 GB (2 TB)
32 KB2047 GB (2 TB)

Keep in mind that Windows 2000 limits partition size to 32 GB but will mount larger FAT32 partitions created in other operating systems such as Windows 98.

Lesson Summary

The FAT file system was designed for small disks and simple folder structures. Windows 2000 supports two versions of the FAT file system: FAT16 and FAT32. A partition formatted with FAT16 is divided into 512 byte sectors and files are written to the disk in clusters, also known as allocation units. The default cluster size is determined by the partition size, and it can be as small as 4 KB, or 8 sectors, or as large as 64 KB, or 128 sectors. The main benefit of FAT32 is its ability to support partitions larger than those handled by FAT16. FAT16 supports partitions up to 4 GB in size, while FAT32 can handle partitions as large as 2047 GB in size. Windows 2000 will format a partition with FAT32 only up to 32 GB in size, but it can mount FAT32 partitions that are 2047 GB in size. FAT32 was implemented with as little change as possible to existing FAT16 architecture, internal data structures, application programming interfaces (APIs), and on-disk format.


Previous   |  Table of Contents   |   Next



Last Updated: August 16, 2002
Top of Page