Sarasota PC Monitor


Tech Talk (04/04)

Whys & Wherefores of Partitioning Hard Drives (Part 2)

by Brian K. Lewis, Ph.D.*
Member of the Sarasota Personal Computer Users Group, Inc.

Last month's article took a detailed look at the partitioning of drives using the FAT32 file system. This month I want to look at the differences between FAT32 and NTFS. I also want to apologize for the figures that failed to show up in the printed article. I note that they are also missing from the on-line version. Therefore, I have added them in at the end of this article.

There are similarities between the FAT32 and NTFS partitions as well as differences. The similarities allow the PC boot process to work equally well with either type of partition. There are primary and logical partitions for NTFS just as there are for FAT partitions. One of the really major differences is the size of the maximum partition that can be used by NTFS. The maximum size is 2 to the 64th power, or 18 Billion Gigabytes! (That amount of storage would probably handle all of the books ever published.) It is worth noting that in the current implementation of Windows XP the practical limit, using 4 KB clusters, is 16 terabytes. I suspect this will be ample storage space for a few years, at least until the next revision of Windows.

Although FAT32 can access up to 2 Terabytes, there is a lot of space wasted due to the large cluster size required in drive greater than 32 GB in size. FAT32 uses a 32 KB cluster in drives of this size while NTFS uses a 4 KB cluster. This smaller cluster greatly reduces the wasted space or "slack" on a large drive. This waste is caused by placing files of variable size in clusters of a fixed size. In other words, with FAT32, any file or portion of a file less than 32 KB in size will still use an entire cluster. Two files cannot occupy the same cluster.

One of the reasons that NTFS uses a 4 KB cluster is that Windows 2000/XP use a built-in file compression system. This compression does not work on systems where the cluster size is greater than 4 KB. Therefore, the default cluster size is set to be 4 KB so that file compression may be used in both Windows 2000 and XP.

In an NTFS system, virtually every structure is a file. This includes the information that manages the partition and the control structure. The control information is contained in a set of files that are created when the disk is partitioned. These are called "metadata" files and include such items as volume information, cluster allocations and lists of files on the partition. The only structure that is not a file is the volume boot sector.

When an NTFS partition is created, the first structure is the volume boot sector. Although called a "sector", it can be up to 16 sectors in length. Also, the terminology is not exact. The volume boot sector may also be referred to as the partition boot sector or volume boot record. However, it always begins in the first sector of the partition and consists of two sub-structures. The first is the BIOS parameter block that contains the fundamental data about the volume. This includes the NTFS identifier, the volume label and partition size. It can also contain information on the location of the key "metadata" files.

The second sub-structure is the volume boot code. This program code instructs the system on how to load the operating system, generally by loading NTLDR. Then control is turned over to NTLDR to load the remainder of the operating system.

The first file in an NTFS partition is the Master File Table (MFT). Every file on the drive has a record in the MFT. The first 16 records are reserved for special purposes. For example, the first record describes the master file table. This is followed by a mirror record of the MFT. The locations for both the MFT and the mirror record are recorded in the boot sector of the drive. A duplicate of the boot sector is stored in the logical center of the drive.

The third record of the MFT is the log file. This is used to record file transactions. If a computer crash occurs before a file has been completely written, an NTFS system can use the log file to roll back the transaction preventing lost clusters. This does not mean there will be no data lost. Whatever file was being written at the time of the crash will be lost, but the integrity of the drive structures will be retained and you will be able to access all of your other files.

Following the log file section, the MFT allocates space for each file record. If the file is smaller than 1500 bytes, it can be contained entirely within the MFT. This increases the speed of access of small files. Directory records are also stored in the MFT. As with files, small directories can be stored completely within the MFT. The net result of the differences between the MFT and FAT32 file systems is that NTFS is much faster in accessing files.

Now, we have seen that partitioning results in the writing of a partition table to the drive that also contains the information on the type of partition (active, primary, logical or extended). It also writes the master boot record and the volume boot record. So, the next step is the formatting of the drive. With Windows XP you have the choice of the type of file system to be used; FAT, FAT32 or NTFS. This selection will determine the default cluster size, write a file allocation table or a master file table, and install the operating system boot files. The format process also tests for bad sectors on the hard drive and writes a bad block table if needed. It can also write a volume label to the drive. So in order to prepare any hard drive for use, partitioning and formatting are required operations.

I hope these two articles have answered some of your questions on this process.

Missing figures from part I:
{short description of image}

Figure 2: cylinder diagram

{short description of image}

Figure 3: zoned bit recording uses constant sector size with more sectors on the outside. :

*Dr. Lewis is a former university & medical school professor. He has been working with personal computers for more than thirty years. He can be reached via e-mail at bwsail@yahoo.com

Return to Brian Lewis' Index

Return to Columnist's Index


Copyright 2004. This article is from the April 2004 issue of the Sarasota PC Monitor, the official monthly publication of the Sarasota Personal Computer Users Group, Inc., P.O. Box 15889, Sarasota, FL 34277-1889. Permission to reprint is granted only to other non-profit computer user groups, provided proper credit is given to the author and our publication. We would appreciate receiving a copy of the publication the reprint appears in, please send to above address, Attn: Editor. For further information about our group, email: admin@spcug.org/ Web: http://www.spcug.org/

The Sarasota Personal Computer Users Group, Inc. has 1,100+ members and was established in 1982. We are members of the Assoc. of PC User Groups (APCUG), the Florida Assoc. of PC Users Groups, Inc., and we are members of the America Online Ambassador Program.

See http://www.spcug.org for all reviews from the Sarasota PC Monitor, go to the Newsletter Section.