Disk management
Disk management
Disk Management is a tool used to manage system disks, both local and remote.
Disk Management, with its graphical user interface, goes a long way to eliminating the need for the
command prompt utilities and makes it easy to obtain a quick overview of the system and the
relationships between installed disks.
The function of lines 1, 3, and 4 is clear. Line 2 sets the active partition. The active partition is the
partition where the BIOS will look for an operating system when the computer is booted.
Don't confuse the primary partition with the active partition. On a computer with a single operating
system, the primary and active partitions are usually the same. A computer with dual-boot capability
might have separate partitions for each operating system. In that case, the active and primary partitions
might not be the same.
The primary partition is where MS-DOS (or the Windows boot information) is stored on the hard disk
drive, and the active partition is where the operating system is stored on the hard drive. (If MS-DOS is
the only operating system, the primary partition and active partition are the same.) Other operating
systems— Windows NT, Windows 2000, and OS/2, for instance—can exist on an extended partition.
Advanced operating systems can create a special partition called a boot partition. When the computer
boots, a menu prompts the user to pick which operating system to use. The boot manager then sets the
chosen partition as active, which starts the operating system located in that partition.
NOTE
MS-DOS has a limitation not shared by any other operating system: it must be placed on the primary
partition, and that partition must always be named C. OS/2, UNIX, and Windows NT/2000 can boot
from another drive letter, as well as from the C drive.
High-Level Formatting
The high-level format is simply called "format" (the program used to perform a high-level format is
called FORMAT.COM). This is the same format command used to prepare floppy disk drives. The
high-level format performs two major functions:
The base storage unit for drives is a sector. Each sector can store between one byte and 512 bytes of
data. Any file less than 512 bytes is stored in a single sector, and only one file can be assigned a sector.
Therefore, any part of a sector left unfilled is wasted. When files are stored in more than one sector (if
they are greater than 512 bytes), MS-DOS needs a way to keep track of each location and the order in
which data is stored. MS-DOS also needs to know which sectors are full and which sectors are
available for data, so it uses the file allocation table (FAT) to keep track of this information.
The FAT is simply an index that keeps track of which part of the file is stored in which sector. Each
partition (or floppy disk) has two FATs stored near the beginning of the partition. These FATs are
called FAT #1 and FAT #2. They are identical. Each FAT can be looked at as a two-column
spreadsheet.
As mentioned, the CHS values limit the maximum size of a hard disk drive to 504 MB under the older
PC operating systems. The 16-bit FAT can address 64,000 (2l6) locations. Therefore, the size of a hard
drive partition should be limited to 64,000 x 512 bytes per sector or 32 MB. With this limitation, you
might ask, how are larger hard drives possible?
There are two solutions to this problem. The first method, used with earlier drives (under 100 MB), was
to use FDISK to break the drive up into multiple partitions, each less than 32 MB.
The second method is called clustering. Clustering means to combine a set of contiguous sectors and
treat them as a single unit in the FAT. The number of sectors in each cluster is determined by the size of
the partition. There can never be more than 64,000 clusters. To determine the number of sectors in a
partition, divide the number of bytes in the partition by 512 (bytes per sector). Then divide the number
of sectors by 64,000 (maximum allowable clusters). The following table provides an estimate of sectors
per cluster.
Partition (in MB) Total Bytes Total Sectors Sectors per Cluster Bytes per Cluster
32 33,554,432 65,536 1 524
64 67,108,864 131,072 2 1049
128 134,217,728 262,144 4 2097
256 268,435,456 524,288 8 4194
512 536,870,912 1,048,576 16 8389
1000 1,048,576,000 2,048,000 32 16,384
2000 2,097,152,000 4,096,000 64 32,768
4000 4,194,304,000 8,192,000 128 65,536
NOTE
Remember: for this table, a sector is not the basic unit of storage—it is now the cluster.
1. MS-DOS starts at the beginning of the FAT and looks for the first space marked "open
for use" (0000). It begins to write to that cluster.
2. If the entire file can be saved within that one cluster, the code FFFF (last cluster) is
placed in the cluster's status field and the file name is added to the directory.
3. The cluster number is placed with the file name.
4. If the file takes more than one cluster, MS-DOS searches for the next open cluster and
places the number of the next cluster in the status field. MS-DOS continues filling and
adding clusters until the entire file is saved.
5. The last cluster then receives the end of file code (FFFF).
FAT32
Windows 98 and Windows 95 (OSR2—the final version of Windows 95, available only on new
machines, also called version C) support the new FAT32 file system. FAT32 can create partitions up to
2 terabytes (two trillion bytes) in size (much larger than the 2-GB limit of FAT16) and uses smaller
clusters than FAT16. This results in a more efficient use of space on a large hard disk.
When deciding whether to use FAT32, take the following into consideration:
Don't use FAT32 on any partition that other operating systems—except for Windows 95 OSR2
—will use.
MS-DOS, Windows 3.x, the original release of Windows 95, and Windows NT clients can read
FAT32 partitions shared across a network.
If you dual boot between Windows 98 and another operating system (such as Windows NT 4.x),
the drive C partition cannot be FAT32.
You cannot compress FAT32 partitions.
Windows 98 MS-DOS mode fully supports FAT32, so you can run most MS-DOS-mode games
and applications from FAT32 partitions.
Some older applications written to FAT16 specification might not display disk space larger than
2 GB.
Do not use any utilities that do not support FAT32. This could result in data loss and might
corrupt the file system on the hard drive.
Fragmentation
Fragmentation is the scattering of parts of the same disk file over different areas of the disk.
During PC use, files are opened and then saved back to disk. As mention earlier, the file is often stored
in several small sections. Fragmentation is caused by the following:
This is an acceptable way to operate and causes no problems for the computer itself. However,
excessive fragmentation slows down the hard disk drive because it has to access two or more areas to
retrieve a file. It is possible for a single file to be fragmented into hundreds of pieces, forcing the R/W
heads to travel all over the hard disk drive.
Most operating systems have either native or third-party applications that will defragment a drive.
These should be used on a regular basis to improve performance and save wear and tear on the drive.
Disk compression is offered as part of the Microsoft Plus add-on product for Windows 95, but is
included in Windows 98 as the DriveSpace 3 program. It works by creating a single big file (called a
compressed volume file or CVF) that acts like a virtual disk drive (with its own drive letter). Files you
write to the CVF will become records within the one big file. This process is normally transparent to
the user.
NOTE
Keep in mind that you cannot use DriveSpace 3 with partitions that use the FAT32 file system. If you
wish to compress a drive under Windows 98, use the FAT16 file system when installing the drive.
Using compression introduces some risk because an error in the compressed volume file can make data
inaccessible. It is safest not to use a compressed file for critical data, and some older programs
(particularly games) might not work with compression. With DriveSpace 3 you can use the
Troubleshooter to identify and fix problems.
Compression is less necessary today, because of the advent of large hard disk drives and the availability
of the FAT32 file system with its smaller cluster sizes.
The elimination of fragmentation improves the speed of the hard disk drive dramatically. Running a
program to eliminate fragmentation is called defragmenting a drive. The slang term "defrag" is often
used. MS-DOS installations include a defragmentation program called DEFRAG. Windows 95 and 98
include a defragmentation program that can be accessed from the Start menu—select Programs, then
select Accessories, and finally select System Tools.
NOTE
DEFRAG cannot rewrite or move systems and hidden files. These files might be program files that are
copy protected and must not be moved after the program is installed. System files such as the MS-DOS
core program must occupy a particular position on the disk.
CAUTION
Never run a defragmentation program designed for MS-DOS or Windows 3.x on a Windows 95 or 98
system. The program might not understand the Windows 95 and 98 long file names, and data might be
lost.
Being prepared for a potential failure before a hard disk drive fails to work properly can save lost data
and time. How fully you should prepare depends on the answers to two questions:
With this in mind, to minimize the impact of a hard disk drive failure:
You should have the following tools at hand to perform hard disk repairs:
A list of the hard disk drive's parameters and the correct CMOS settings required.
A bootable floppy disk with the FDISK, FORMAT, CHKDSK, and MSCDEX (if using a CD-
ROM) command files. Adding EDIT or another text editor is handy for tweaking the
CONFIG.SYS and AUTOEXEC.BAT files.
Drivers needed to get the operating system running with any primary expansion cards (drive
controllers, SCSI card, display adapter, and so on.)
Good cables for the kinds of drives you might have to repair.
CHKDSK or other hard disk inspection programs that are part of the operating system on the
drive in question. Be sure to use the right version!
A number of third-party programs are also available for use with older hardware and operating systems.
These programs are available at most computer software stores.
CAUTION
When using any third-party programs to troubleshoot/repair a drive, be sure they are certified for the
hard disk drive and operating system in question. Use uncertified third-party programs only when such
a step is the last resort before discarding the drive. Even then, be aware that the program may cause
problems of its own. Keep the software up to date; changes in the operating system or bugs found in the
utility can render the product more of a problem than a cure. If possible, back up any critical data
before using the software.
The most common drive errors begin with "Abort, Retry, Fail," or "Abort, Retry, Fail, Ignore."
When you see any of the following errors, you have a drive problem:
These errors are the easiest to fix and can usually be attributed to a bad sector on the drive. When this
happens, try the following.
ScanDisk
MS-DOS, Windows 3.x, and Windows 95 and 98 contain versions of the ScanDisk program. ScanDisk
performs a battery of tests on a hard disk, including looking for invalid file names, invalid file dates
and times, bad sectors, and invalid compression structures. In the file system, ScanDisk looks for lost
clusters, invalid clusters, and cross-linked clusters. Regular use of ScanDisk can help prevent problems
as well as resolve them. Windows 95- and 98-based computers will automatically run ScanDisk any
time the operating system is improperly shut down—that is, when the power is turned off before the
system is allowed to complete its shutdown procedures.
Verify the Media
Most SCSI drives have a program built into the controller that will verify the hard disk drive and make
repairs if a sector has become unusable or unstable. Boot the PC and watch for a prompt to enter the
SCSI BIOS setup (usually CTRL+A). Then choose Disk Utilities and the option to verify or inspect the
drive. Do not select the low-level format option. After the program is finished, reboot the computer and
see if the problem is resolved. If the disk fails verification, it might need to undergo low-level
formatting or be replaced.
CMOS Errors
At times, the system CMOS becomes unstable. This can result in the following error messages:
Checking the CMOS is quick and easy. It is a good idea to always have a backup of the CMOS data on
paper.
NOTE
After boot up, if you receive the message "Strike F1 key to continue," this indicates that your system
configuration is invalid and you will need to check the CMOS settings.
Connectivity Errors
Connectivity problems (when something is not connected or plugged in) usually appear when you boot
up a computer. Look for the following messages:
Connectivity errors are overcome by inspecting the entire connection system (including power). You
might want to try removing and reseating the controller if you get an HDD controller failure.
TIP
As a computer technician, you should keep an extra controller and cables around. Often, substituting a
good cable or controller is the quickest way to solve a hard disk drive problem.
It is possible for a drive to lose partition information. Look for these errors:
Boot and partition information is stored on sectors and can fail. If the partition table or boot sector is
corrupted, the best solution is to restore the data on the drive from a backup copy after repartitioning
the drive and reloading the operating system.
Lesson Summary
The maximum storage capacity of a hard disk drive is determined by its geometry.
CHS values define the geometry of a hard disk drive.
The largest hard disk drive recognized by the BIOS will vary with the age of the system.
Proper CMOS settings are required for hard disk drives.
There are two types of partitions—primary and extended.
A cluster is the basic unit of storage.
The FDISK program is used to partition drives.
Microsoft ScanDisk is a useful tool for diagnosing and repairing many disk problems.
The proper drive information must be held in CMOS for proper drive operation.