NOVELL TECHNICAL INFORMATION DOCUMENT DOCUMENT PROCESSING INFO: FAX - This TID replaces TB.M.002, aka TB.M.0002, aka drdos faxback doc #5702, aka #1702. TITLE: Selecting FDISK Partition Sizes DOCUMENT ID: TID800066 DOCUMENT REVISION: A DATE: 18AUG94 AUTHOR: DPARTRID;KBANTA ALERT STATUS: Yellow DISTRIBUTION: Public INFORMATION TYPE: Issue README FOR: NA NOVELL PRODUCT CLASS: Desktop Products NOVELL PRODUCT and VERSION: DR DOS 6.0 CATEGORY: Disk Utilities ABSTRACT: This document describes the effects of partition size on cluster size. It also describes a method of calculating the number of cylinders needed in order to insure a particular size partition. ----------------------------------------------------------------- DISCLAIMER THE ORIGIN OF THIS INFORMATION MAY BE INTERNAL OR EXTERNAL TO NOVELL. NOVELL MAKES EVERY EFFORT WITHIN ITS MEANS TO VERIFY THIS INFORMATION. HOWEVER, THE INFORMATION PROVIDED IN THIS DOCUMENT IS FOR YOUR INFORMATION ONLY. NOVELL MAKES NO EXPLICIT OR IMPLIED CLAIMS TO THE VALIDITY OF THIS INFORMATION. ----------------------------------------------------------------- ISSUE NOTE: The FDISK utility can erase all data on a physical drive. Backups of any existing data are strongly recommended before using FDISK. The hard drive used as an example is a 405 MB SCSI with 48 heads, 17 sectors per track and 1024 cylinders. 2KB clusters are the target because this allows the smallest possible cluster. The cluster size is kept as small as possible because this will be the smallest amount of disk space that will be used for any file (even zero byte files). Files will not occupy "partial" clusters, nor can two files share the same cluster. This example assumes that the entire disk will be used as DOS media. CONVENTIONS: Instead of using typical X or Y variables this document will use variable names. If a variable name would normally consist of more the one word the words will be connected with underscores "_" to tie them to a single name. An example would be the variable "sector size" which is used in this document as "sector_size". MATHEMATICAL OPERATORS USED: + addition - subtraction / division * multiplication DEFINITIONS: Hard Disk "Heads": The number of heads for the hard disk. Sector: A portion (or radial sector) of a track. Track: The sectors covered by one stationary hard disk head during a full rotation of the hard disk. Cylinder: The tracks covered by all hard disk heads (while heads are stationary) during a full rotation of the hard disk. In other words, a collection of tracks whose distances from the center of the disk are equal. DOS supports a maximum of 1024 cylinders per physical hard disk. Partition: A collection of cylinders used by an Operating System for it's file system. By convention, all partitions start on cylinder boundaries (you cannot use partial cylinders). Primary Partition: Under DOS, this is the Active Partition (where DOS's system files are located). Extended Partition: Under DOS, in order to reserve space on the hard disk as owned by DOS and therefore unavailable to any other operating system, DOS creates an Extended Partition within which Logical Partitions can be created. Logical Drive: Under DOS, each Logical Drive resides within the Extended Partition. There should be at least one Logical Drive in the Extended Partition. CONSTANTS (for this example): HD Head Count: 48 (30h). This number is drive specific. In the sample hard disk, this is a translated value. Translation is a method that enables a disk with more than 1024 cylinders to be supported by DOS. Sectors per Track: 17 (11h). This number is drive specific, but usually 17. Sector Size: 512 bytes. Usually a constant, but if varied, this value must be a power of 2. Cylinder Count: 1024. DOS and most other software have this upper limit. Remember that this value is zero relative, so 1024 cylinders means cylinders 0 through 1023. PARTITION SIZE AND CLUSTER SIZE Cluster sizes are a direct result of the size of the partition. The following table outlines the cluster sizes corresponding to the various partition sizes: Partition Size Fat Size Sectors per Cluster Cluster Size up to 15.9 MB 12 bit 8 4K 16 to 127.9 MB 16 bit 4 2K 128 to 255.9 MB 16 bit 8 4K 256 to 511.9 MB 16 bit 16 8K 512 to 1023.9 MB 16 bit 32 16K 1 to 2 GB 16 bit 64 32K RECOMMENDED EXAMPLE OF LOGICAL PARTITION LAYOUT: To get 2 KB clusters, the partition needs to be greater than 15.9 MB but less than 128MB. The example drive is 405 MB. 4 Partitions of 101.25 MB each will achieve the target cluster size. Note that it is not necessary for each partition to be the same size. We choose this here for simplicity. CALCULATING THE NUMBER OF CYLINDERS: Determine the number of cylinders needed for the partition size we desire (101.25 MB). Here are the necessary variables and formulas for performing this task: Total_Space = The full size of the hard disk, as reported by FDISK. Total_Cylinders = The number of cylinders, as reported by FDISK. MB_per_Cylinder = Total_Space / Total_Cylinders Cylinders_per_Partition = Desired_Size / MB_per_Cylinder In our example: Total_Space = 405 MB Total_Cylinders = 1024 MB_per_Cylinder = 405 / 1024 = .3955 Cylinders_per_Partition = 101.25 / .3955 = 256 CREATE THE DESIRED PARTITIONS: Below is what is needed to create a disk with a 101.25 MB primary partition and 3 logical drives of 101 MB each in 1 extended partition. This equates to having 4 drive letters (C: D: E: F:). 1) Primary Partition: Starting Cylinder = 0 Ending Cylinder = 255 2) Create an Extended Partition with the remaining cylinders: Starting Cylinder = 256 (Ending Cylinder from step 1 + 1) Ending Cylinder = 1023 (last cylinder) 3) Create the first Logical Drive in the Extended Partition: Starting Cylinder = 256 Ending Cylinder = 511 (Starting cylinder + 255 addition cylinders) 4) Create a second Logical Drive in the Extended Partition: Starting Cylinder = 512 (Ending Cylinder from step_3 + 1) Ending Cylinder = 767 (Starting Cylinder + 255 addition cylinders) 5) Create a third Logical Drive in the Extended Partition: Starting Cylinder = 768 (Ending Cylinder of step_4 + 1) Ending Cylinder = 1023 (Starting Cylinder + 255 additional cylinders) ----------------------------------------------------------------- Any trademarks referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark information. -----------------------------------------------------------------