Choosing Between File Systems

Archived content. No warranty is made as to technical accuracy. Content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Published: October 15, 1999

By Brien M. Posey, MCSE for TechRepublic.com

flaglogo

If you're new to Microsoft® Windows®, you may not completely understand the intricacies of the various types of file systems. As you may have heard, there are times when it's appropriate to use the FAT file system, other times when it's more appropriate to use NTFS, and still other times when you'll want to use FAT32. In this article, I'll discuss the differences between these file systems and explain how to gain the maximum benefit from them.

On This Page

What's FAT?
What About VFAT?
FAT32
What's NTFS?
Compatibility
Volume Size
Fault Tolerance
Security
File Compression
The System Partition
Converting to NTFS
Converting to FAT32

What's FAT?

FAT may sound like a strange name for a file system, but it's actually an acronym for File Allocation Table. Introduced in 1981, FAT is ancient in computer terms. Because of its age, most operating systems, including Microsoft Windows NT®, Windows 98, the Macintosh OS, and some versions of UNIX, offer support for FAT.

The FAT file system limits filenames to the 8.3 naming convention, meaning that a filename can have no more than eight characters before the period and no more than three after. Filenames in a FAT file system must also begin with a letter or number, and they can't contain spaces. Filenames aren't case sensitive.

What About VFAT?

Perhaps you've also heard of a file system called VFAT. VFAT is an extension of the FAT file system and was introduced with Windows 95. VFAT maintains backward compatibility with FAT but relaxes the rules. For example, VFAT filenames can contain up to 255 characters, spaces, and multiple periods. Although VFAT preserves the case of filenames, it's not considered case sensitive.

When you create a long filename (longer than 8.3) with VFAT, the file system actually creates two different filenames. One is the actual long filename. This name is visible to Windows 95, Windows 98, and Windows NT (4.0 and later). The second filename is called an MS-DOS® alias. An MS-DOS alias is an abbreviated form of the long filename. The file system creates the MS-DOS alias by taking the first six characters of the long filename (not counting spaces), followed by the tilde [~] and a numeric trailer. For example, the filename Brien's Document.txt would have an alias of BRIEN'~1.txt.

An interesting side effect results from the way VFAT stores its long filenames. When you create a long filename with VFAT, it uses one directory entry for the MS-DOS alias and another entry for every 13 characters of the long filename. In theory, a single long filename could occupy up to 21 directory entries. The root directory has a limit of 512 files, but if you were to use the maximum length long filenames in the root directory, you could cut this limit to a mere 24 files. Therefore, you should use long filenames very sparingly in the root directory. Other directories aren't affected by this limit.

You may be wondering why we're discussing VFAT. The reason is it's becoming more common than FAT, but aside from the differences I mentioned above, VFAT has the same limitations. When you tell Windows NT to format a partition as FAT, it actually formats the partition as VFAT. The only time you'll have a true FAT partition under Windows NT 4.0 is when you use another operating system, such as MS-DOS, to format the partition.

FAT32

FAT32 is actually an extension of FAT and VFAT, first introduced with Windows 95 OEM Service Release 2 (OSR2). FAT32 greatly enhances the VFAT file system but it does have its drawbacks.

The greatest advantage to FAT32 is that it dramatically increases the amount of free hard disk space. To illustrate this point, consider that a FAT partition (also known as a FAT16 partition) allows only a certain number of clusters per partition. Therefore, as your partition size increases, the cluster size must also increase. For example, a 512-MB FAT partition has a cluster size of 8K, while a 2-GB partition has a cluster size of 32K.

This may not sound like a big deal until you consider that the FAT file system only works in single cluster increments. For example, on a 2-GB partition, a 1-byte file will occupy the entire cluster, thereby consuming 32K, or roughly 32,000 times the amount of space that the file should consume. This rule applies to every file on your hard disk, so you can see how much space can be wasted.

Converting a partition to FAT32 reduces the cluster size (and overcomes the 2-GB partition size limit). For partitions 8 GB and smaller, the cluster size is reduced to a mere 4K. As you can imagine, it's not uncommon to gain back hundreds of megabytes by converting a partition to FAT32, especially if the partition contains a lot of small files.

As I mentioned, FAT32 does have limitations. Unfortunately, it isn't compatible with any operating system other than Windows 98 and the OSR2 version of Windows 95. However, Windows 2000 will be able to read FAT32 partitions. The other disadvantage is that your disk utilities and antivirus software must be FAT32-aware. Otherwise, they could interpret the new file structure as an error and try to correct it, thus destroying data in the process.

Finally, I should mention that converting to FAT32 is a one-way process. Once you've converted to FAT32, you can't convert the partition back to FAT16. Therefore, before converting to FAT32, you need to consider whether the computer will ever be used in a dual-boot environment. I should also point out that although other operating systems such as Windows NT can't directly read a FAT32 partition, they can read it across the network. Therefore, it's no problem to share information stored on a FAT32 partition with other computers on a network that run older operating systems.

What's NTFS?

Now that I've discussed the FAT, VFAT, and FAT32 file systems, let's examine the NTFS file system. NTFS stands for New Technology File System. Microsoft created NTFS to compensate for the features it felt FAT was lacking. These features include such things as increased fault tolerance and enhanced security. Now that you know a little about these file systems, let's compare how each performs in various situations.

Compatibility

Before you decide what type of file system to use on a partition, you should consider compatibility. If multiple operating systems will access the partition, you must use a file system that all operating systems can read. Usually, this means using FAT because of its universal compatibility. Only Windows NT supports NTFS partitions.

Keep in mind, however, that this limitation only applies to the local machine. For example, if you have Windows NT and Windows 98 loaded on the same machine and both operating systems require access to a common partition, you must format that partition as FAT. However, if Windows NT is the only operating system on the PC, you can format the partition as NTFS, even if computers running other operating systems will access the partition across the network.

Volume Size

Another determining factor in your decision is the physical size of your partition. FAT only supports partition sizes up to 2 GB. If your partition size is larger than 2 GB, you must format it as FAT32 or NTFS, or you must break it into smaller partitions. You should also keep in mind that because of the enhanced features associated with NTFS, NTFS has more overhead than FAT. If your partition size is smaller than 200 MB, you should use FAT to avoid losing a large amount of disk space to the overhead associated with NTFS. The maximum size of an NTFS partition is 16 exabytes.

Fault Tolerance

Once you've considered your partition size and compatibility issues, you've got some flexibility in determining which file system is right for you. One issue to consider when making this decision is fault tolerance. Windows NT offers software support for several alternate disk access methods that increase speed and/or fault tolerance. These options include things such as disk striping and disk striping with parity. Many of these options require NTFS. If you're planning on using a hardware-based stripe set, you can use either file system.

Even without these advanced fault-tolerant options, NTFS includes built-in fault-tolerant capabilities well beyond the capabilities of FAT or FAT32. For example, when NTFS writes a change to the hard disk, it makes a record of the change in a log file. In the event of a power failure or a disk error, Windows NT can use these log files to repair your data.

NTFS also repairs hard disk errors automatically without displaying an error message. When Windows NT writes a file to an NTFS partition, it keeps a copy of the file in memory. It then reads back the file to make sure it matches the copy stored in memory. If the copies don't match, Windows NT marks that section of the hard disk as bad and won't try to use it again. It then uses the copy of the file stored in memory to rewrite the file to an alternate location on the hard disk.

The FAT and FAT32 file systems don't offer any of these safety features. While FAT and FAT32 do maintain two different copies of the file allocation table in case one copy is damaged, these systems are incapable of automatically fixing errors. Instead, you must run a utility such as ScanDisk.

Security

As I mentioned before, NTFS has its own built-in security system. You can grant various permissions to directories and to individual files. These permissions protect files and directories locally and remotely. For example, if someone were to try to access the restricted files, NTFS would protect those files.

If you're using FAT or FAT32, you depend on share permissions for security. Share permissions will protect a file across the network, but they offer no local protection. A person trying to access restricted files could simply sit at the local PC and gain full access to these files. Another disadvantage to share permissions is that they can be messy to manage. If you have hundreds of users on a server, each with his or her own directories, you could potentially end up with hundreds of shares, some of which may overlap, thus creating additional complications.

File Compression

Another advantage to NTFS is native support for file compression. If you ever used the compression program that came with MS-DOS 6.22, you may be groaning right now. As you may recall, the MS-DOS compression utility required you to compress your entire partition. The compression process took a long time and, when completed, drastically slowed your PC's file access. Another disadvantage was that a minor disk problem could potentially trash the entire partition. FAT32, on the other hand, offers no compression capabilities at all.

The NTFS compression is much better than its predecessors. It offers you the chance to compress individual files and directories of your choice. Because it compresses individual files, if you have a minor hard disk problem, it won't screw up your compression scheme and make you lose everything. Another advantage to compressing individual files and directories is that you can compress only seldom-used files. By doing so, you won't slow down your operating system by making it decompress files each time it needs to access them.

The System Partition

After reading this article, you may have decided that NTFS is far superior to FAT and FAT32. In most cases, if you're using Windows NT, you should use NTFS. However, this isn't always the case.

As I mentioned, NTFS partitions are only accessible via Windows NT. If you have a fatal error with Windows NT, you can't simply boot a system disk to a command prompt and fix a problem on an NTFS partition. To get around this problem, Microsoft recommends installing a second copy of Windows NT on your hard disk and using this copy to repair problems that occur on NTFS partitions.

Unfortunately, this method has some serious drawbacks. For starters, a second copy of Windows NT could consume up to 150 MB depending on which options you choose to load. Second, during the boot process, both copies share common files. Therefore, if your system partition (the partition your PC boots from) is formatted as NTFS and has a problem, you may not be able to boot either copy of Windows NT to fix the problem. While you may think the odds of a system partition error may be slim, just remember that many of the changes you may make to your disk partitions result in having to manually update the Boot.ini file. If you incorrectly update this file, Windows NT will become unbootable. Because this is an initial boot file on the system partition, every installed copy of Windows NT would share this file.

A better solution is to format your system partition as FAT. If you're concerned about security, simply make the system partition small and don't place anything other than the Windows NT system files on it. Remember that a FAT partition is safe from a security standpoint, as long as no unauthorized person has physical access to the machine.

Converting to NTFS

If you're running Windows NT and want to use NTFS on some of your partitions that already contain data, you can easily convert a partition to NTFS. To do so, open an MS-DOS prompt window and type the following command:

CONVERT drive: /FS:NTFS

For example, if you wanted to convert your D drive to NTFS, you'd replace the word drive with the letter D, as shown below:

CONVERT D: /FS:NTFS

Converting to FAT32

Converting to FAT32 is even easier than converting to NTFS. To convert a FAT partition to FAT32 (within Windows 98), simply click Start and go to Program Files, Accessories, System Tools, Drive Converter (FAT32). When you do, you'll see a wizard that will allow you to select the partition you wish to convert and begin the conversion process. Before you convert a partition, however, remember that on older systems or systems with very full drives, this process can take several hours.

Brien M. Posey is an MCSE and works as a freelance technical writer a network engineer for the Department of Defense. If you'd like to contact Brien, send him an e-mail Brien_Posey@xpressions.com . (Because of the large volume of e-mail he receives, it's impossible for him to respond to every message. However, he does read them all.)

The above article is courtesy of TechRepublic https://www.techrepublic.com .

We at Microsoft Corporation hope that the information in this work is valuable to you. Your use of the information contained in this work, however, is at your sole risk. All information in this work is provided "as -is", without any warranty, whether express or implied, of its accuracy, completeness, fitness for a particular purpose, title or non-infringement, and none of the third-party products or information mentioned in the work are authored, recommended, supported or guaranteed by Microsoft Corporation. Microsoft Corporation shall not be liable for any damages you may sustain by using this information, whether direct, indirect, special, incidental or consequential, even if it has been advised of the possibility of such damages. All prices for products mentioned in this document are subject to change without notice.

International rights.