White Paper: Optimizing Hard Drives with Partitions [Homepage] | [What's New] | [Comments] | [Order] | [Info] | [Search] [Image] Optimizing Hard Drives with Partitions: An Overview September 29, 1995 Copyright © 1995 PowerQuest Corporation 1083 N State Street Orem, UT 84057 Sales: (800) 379-2566 Email: magic@powerquest.com Note: You may freely distribute this white paper as long as you retain the copyright information. Abstract This white paper discusses hard-disk partitions and methods for using partitions to optimize hard disk organization, security, and performance. It defines different types of partitions and their functions, road blocks to effective partitioning and solutions for those road blocks. Finally it details generic partition strategies for optimizing hard drives. Section 1: Why Partition ? Modern high-capacity hard drives and competing operating systems are driving the demand for effective hard-drive organization and management techniques. Hard-disk partitioning is one of the most effective methods available for organizing hard drives. Partitions provide a more general level of organization than directories and files. They also offer greater security for sensitive data by separating data from operating systems and applications. Finally, using multiple partitions on FAT formatted partitions (FAT is the file system used by DOS/Windows, Windows 95 and optionally by OS/2 and Windows NT) can help access the full storage capacity of the drive. Barriers to Effective Partitioning Newly purchased hard drives are usually configured with a single, large partition. This partition configuration is less than optimal but makes it easy for the manufacturer to pre-load software. A major roadblock to effective partitioning is the tedious process that is normally required to modify a hard-disk partition. Using traditional methods you must perform the following steps: Step 1 Back up all the data on the hard disk. -- This is one of the most time consuming steps. The larger the drive and number of files, the longer this process takes. A high-capacity drive back-up could easily take three hours or more. Step 2 Delete the existing partition using the FDISK utility that is provided with the operating system. -- This process destroys all of the data on the disk. (Hence the need for step #1) Step 3 Create new partitions on the hard drive using the FDISK utility.-- This is a difficult process. FDISK is a non-intuitive, character mode utility provided with the operating system. Great care must be taken when creating the number of partitions and their sizes. If you don't get the right size then you you will have to perform this process all over. Step 4 Format the new partitions with the FORMAT utility provided with the operating system. -- This utility may be used independently of FDISK. It also destroys all data that may exist on the partition. The DOS FORMAT utility will install a FAT file system. The OS/2 FORMAT utility allows you to format FAT or HPFS. Step 5 Re-install the operating system. -- Many back up programs do not properly back up all operating systems. Re-installing the operating system from the source diskettes or CD may be necessary. Step 6 Restore the data.-- This process is the reverse of step #1. It requires approximately the same amount of time to restore the data as it does to back up the data. PartitionMagic from PowerQuest Corporation (http://www.powerquest.com) was developed to eliminate the effort required to repartition a hard-disk. PartitionMagic allows users to visually shrink, expand, and move FAT and HPFS formatted partitions. It also allows users to convert FAT partitions to HPFS with the data in place. Section 2: Partition Basics Primary and Logical Partitions The first sector of any hard drive contains a partition table. This partition table only has room to describe four partitions. These are called primary partitions. One of these primary partitions can point to a chain of additional partitions. Each partition in this chain is called a logical partition. Typically, only one primary partition on a drive is visible at any time. For example, an application in one primary partition can not access files located in another primary partition. All logical partitions are visible at the same time. An application in a logical partition can access files located in the active primary partition OR in any of the other logical partitions. Booting Booting is the process of loading the operating system from the hard drive. When the computer is turned on, the partition table of the first drive is read. The partition table is scanned for a primary partition that is marked as active and control is passed to that partition. How Drive Letters are Assigned Drive letters are used to identify partitions. They are always assigned in sequence, starting with C:. The first visible, primary partition on each drive is assigned a drive letter. Typically, only one primary partition on each drive will be assigned a drive letter. After each drive has been checked for a primary partition, each logical partition on each drive is assigned a drive letter. For example, a computer with two physical hard drives, each physical drive having one primary and one logical partition, would produce the following drive letters: C: Primary Partition on Physical Drive 1 D: Primary Partition on Physical Drive 2 E: Logical Partition on Physical Drive 1 F: Logical Partition on Physical Drive 2 Section 3: Deciding How to Set Up Your Partitions Answering the following questions will help you determine the optimal configuration of your hard disk partitions: * Do you want to separate data to increase security and organization? * Do you want to increase the storage efficiency of your disk? * Do you want to create a maintenance partition with critical diagnostic or booting files? * Do you want to install multiple operating systems? Using Partitions to Effectively Organize Hard Drives It is not uncommon for a PC today to have over 10,000 operating system, application and data files. Although directories are essential in organizing files, partitions can provide a more general (or abstract) level for organizing directories. For example, if you have a home PC you may wish to assign a partition for your spouse, a partition for your children's educational and game software and a partition for your business applications and data. Separating Data to Increase Security Partitions allow you to separate data files which must be backup up regularly, from program and operating system files, which don't need to be backed up. Some operating systems and applications are more stable than others. Partitions can significantly enhance the safety of valuable software programs and data. You can also create a partition to store a daily backup of critical data. If for any reason (your kid's new game crashes the partition), you can retrieve a backup version of the data. A back-up partition can provide a fast and convenient intermediate step between weekly or monthly back-ups. A more sophisticated back up partition can enhance system security by providing a redundant source on the machine for system diagnostics and as a secondary boot partition in case the boot partition is corrupted. Using Partitions to Recover Wasted Space on Your Hard Drive The FAT (File Allocation Table) file system is used by DOS and Windows, Windows 95, and optionally on OS/2 and Windows NT. These operating systems represent 85 to 90 percent of all installed personal computers in the world. The FAT file system was written over a decade ago for floppy disks and very small hard drives. The basic structure of FAT today is unchanged and, as a result, can waste hundreds of megabytes of storage space on a high-capacity hard drive. The FAT file system divides each partition into storage units called clusters. There is a maximum limit of approximately 65,000 clusters on a FAT formatted partition. On a 120 MB partition the cluster size is 2KB. However, on a 1.2 GB partition the cluster size is increased to 32KB. A file that is only 1 byte long will use an entire cluster regardless of its size. For example, an average AUTOEXEC.BAT file or Windows .PIF file can average 500 bytes or 0.5KB. One of these files uses an entire cluster. Larger cluster sizes waste more space on the partition. The following table illustrates how much space is wasted on a typical partition with 10,000 files (Your hard drive may have more or less waste depending on the number of files and the file sizes.) Total Partition Size Minimum Required Cluster Estimated Space Wasted Size 16 to 127 Megabytes 2 Kbytes 2% 128 to 255 Megabytes 4 Kbytes 4% 256 to 511 Megabytes 8 Kbytes 10% 512 to 1023 Megabytes 16 Kbytes 25% 1024 to 2048 Megabytes 32 Kbytes 40% As drive usage and cluster size increase, so does the amount of wasted space. Dividing drives into multiple, smaller partitions reduces the amount of wasted space. The amount of space recovered by using multiple, smaller partitions can be fairly dramatic (see the following section to for a formula to determine your hard disk's efficiency). Operating System Requirements Some operating systems must be installed to the C: partition in order to properly start. More advanced operating systems are capable of booting from any partition. All versions of DOS (including the boot portion of Windows 95) must boot from the C: partition. Windows NT, OS/2, and Linux can be booted from any partition (although a boot utility such as PartitionMagic 3.0's Boot Manager may be required). If you wish to install Windows 95, but keep your existing DOS/Windows 3.X system as a backup, you will need two primary C: partitions: one with the boot portion of Windows 95, and one with the installation of DOS that was used with the Windows 3.X setup. Two versions of DOS cannot be installed on the same partition without special software. To install more than one version of DOS, multiple C: partitions are required. Using Logical Partitions for Data and Applications As mentioned before, only one primary partition on each drive will be assigned a drive letter. If there is more than one primary partition, only one will become the C: partition. All other primary partitions will be invisible. As a result, primary partitions should normally be reserved for operating systems only. Applications and data files should be placed in logical partitions so they will be visible regardless of which primary partition is visible. Section 5: Calculating Your Hard Disk's Storage Efficiency To estimate the storage efficiency of your hard disk partitions: Step 1 Change to the root directory. (Type: CD\ and press the enter key.) Step 2 Run the CHKDSK program. (Type: CHKDSK and press the enter key.) Step 3 Add the total number of directories, files and hidden files to find the total number of partially used clusters. (Directories + Files + Hidden Files) Step 4 Determine the number of bytes per cluster from the CHKDSK results. This number is reported as "bytes per cluster" or "bytes in each allocation unit." (For example: 4096) Step 5 Estimate the wasted space by multiplying the cluster size by the number of partially used clusters (from step #3) and dividing the result by two. (Cluster Size * #Number of Partially Used Clusters /2 = Estimated Wasted Space.) Conclusion: Optimize with Partitions As hard drives get larger, partitions are ideal for optimizing their organization, security, and performance. Although the benefits of disk partitioning are real and demonstrable, the cost in time and effort to modify partitions has been prohibitive for many users to fully exploit the benefits of hard-disk partitions. PartitionMagic has eliminated these barriers and made partition management a trivial effort. Visit the PowerQuest home page often at http://www.powerquest.com for more information on PartitionMagic. [Image] [Image] ---------------------------------------------------------------------------- Copyright ©1996, by PowerQuest Corporation All Rights Reserved. Last Updated Thursday, April 6, 1996 For questions regarding PowerQuest Corp. products, please send email to: magic@powerquest.com. For questions, problems, or comments regarding this website, please send email to: webmaster@powerquest.com. For technical support issues related to PartitionMagic, please send email to: support@powerquest.com.