Inside Windows 98

Previous chapterNext chapterContents


- 14 -

Disk and File System Overview


As operating systems and applications have become larger, and the number of applications you use has become greater, disk space has become increasingly more important. Ten years ago, 40 MB hard disks were common on the average PC; today's PCs often contain hard disks that have capacities equal to 10 or 20 times that amount. A complete installation of Windows 98, without the optional administration tools, requires more than 120 MB of disk space, and Windows 98 accesses your disk often. Therefore, optimal hard disk performance is essential if you want optimum Windows 98 performance.

This chapter examines both flavors of the FAT file system, FAT16 and FAT32, that Windows 98 uses and explains the utilities included in Windows 98 that enable you to compress and manage your disks. The chapter covers the following topics:

Although you don't have to understand how your disks and the Windows 98 file system work before you can use the Windows 98 disk and file utilities, possessing such an understanding can help you use your disks and the disk tools more effectively. This chapter explains disk and file system structure to help you maximize your computer's disks and file system.

Understanding Disk and File System Structure

In the past, understanding how your disks and file system worked wasn't very important, because you just couldn't do much about your disk's performance. The increase in drive capacities and the proliferation of disk compression has changed that--now, understanding the computer's disks and file system potentially can save wasted disk space and help you get the most out of your computer.


NOTE: For the most part, Windows 98 uses the same disk and file structure as DOS. Therefore, most of the material that describes disk and file structure applies to DOS as well as Windows 98. The exceptions to the case will be noted and explained.

The first thing you should understand is the physical structure of the disk and how data is partitioned on the disk. Instead of containing a single disk like a floppy disk, a hard disk contains multiple rigid platters (disks), all spinning together on a common spindle. These platters most often are made of aluminum or glass, and are coated with a magnetically sensitive material. Above the surface of each platter rides a read-write head that reads data from and writes data to the disk.

The disk needs some form of map to enable the disk controller to position the heads to locate any given piece of data on the disk. Therefore, each of the platters is magnetically formatted in circular rings, called tracks. Tracks are further divided into segments, called sectors. A sector is the smallest unit of storage on a disk. The corresponding tracks on the disk's platters form a cylinder. Essentially, tracks and sectors break the data space on the disk into manageable, logical chunks.


NOTE: The number of sectors in a track depend on the type of disk. With IDE drives, the number of tracks per sector is stored in your computer's CMOS settings. SCSI drives, however, maintain their configuration information in their own BIOS chips.

Just dividing a disk into cylinders, tracks, and sectors doesn't provide a way to locate information on the disk. Therefore, each sector is referred to with a unique number. In addition, every platter in the disk contains two surfaces, each of which is serviced by a read-write head. The cylinder number references the track, the head number identifies the surface read from or written to, and the sector number defines the exact location of the data.

For example, "cylinder 0, head 1, sector 14" represents a unique and specific sector on the disk. This three-dimensional location data defines the disk's absolute sectors. Windows 98 then allocates a relative sector number to each absolute sector. Relative sector 0 (which corresponds to cylinder 0), head 1, sector 1, defines the disk's boot record location. The boot record contains information about the partitions on the disk and other information that enables Windows 98 to boot the system. Relative sector 1, the first data sector, corresponds to the absolute sector at cylinder 0, head 1, sector 2. Other data sectors are numbered sequentially as relative sectors 3, 4, 5, and so on.

Clusters

Windows 98, as with DOS before it, allocates disk space in clusters. A cluster is a group of sectors on a disk. The number of sectors in a cluster varies according to the drive type and partition size, as shown in Table 14.1, which lists cluster and sector relationships for common PC drive types. When Windows 98 stores a file on disk, it doesn't store the file on a sector-by- sector basis. Rather, Windows 98 allocates enough clusters to contain the file. As you learn later in this chapter, in the section "Optimizing Partition and Cluster Size," Windows 98's method for storing a file can lead to a considerable waste of disk space.

TABLE 14.1 Cluster and Sector Relationships

Type of Disk Cluster Size (in bytes) Sectors per Cluster
3 1/2-inch floppy 1,024 2
1.2 MB floppy 512 1
0-15 MB partition* 4,096 8
16-127 MB partition* 2,048 4
128-255 MB partition* 4,096 8
256-511 MB partition* 8,192 16
512 MB-<1 GB partition* 16,384 32
1 GB or more* 32,768 64

*Also applies to similarly sized disks consisting of a single partition and to logical drives in an extended partition.


TIP: A little division in Table 14.1 shows you that the size of one sector is 512 bytes, regardless of disk type. (Divide the cluster size by the number of sectors per cluster; you will get 512 each time.) Each sector also contains a 59-byte sector ID header that includes head, cylinder, and sector numbers; an address mark to indicate where the sector begins; and cyclical redundancy check (CRC) information to enable error detection in the sector ID header. The 59 bytes that comprise each sector are part of the reason that a formatted disk contains less storage space than its theoretical unformatted capacity.

Primary Partitions

A hard disk is partitioned in logical storage areas. A partition is a series of clusters on the disk that provides a way to group clusters into logical, collective units so that the clusters can be recognized as a logical drive represented by a drive letter, such as C, D, and so on. A partition has a starting sector and an ending sector, and the number of sectors in between defines the capacity of the partition.

You can use the UNFORMAT command from the Windows 98 command line to display the partition tables for each disk in your computer. You also can use the FDISK command to display partition information, but UNFORMAT is safer because, unlike FDISK, UNFORMAT does not have the capability to remove your disk partitions. To use UNFORMAT to view your partition information, enter the command UNFORMAT /PARTN /L at the Windows 98 command prompt. You should see output similar to the following:

Hard Disk Partition Table display.
Drive # 80h has 1010 cylinders, 60 heads, 34 sectors (from BIOS).
The following table is from drive 80h, cylinder 0, head 0, sector 1:
              Total_size      Start_partition   End_partition
   Type     Bytes   Sectors   Cyl Head Sector   Cyl Head Sector     Rel#

---------- ---------------- ---------------- ----------------- ----------

HUGE  Boot  1006M   2060366   0    1     1     1009   59    34      34
Drive # 81h has 998 cylinders, 38 heads, 17 sectors (from BIOS).
The following table is from drive 81h, cylinder 0, head 0, sector 1:
               Total_size       Start_partition   End_partition
   Type      Bytes   Sectors    Cyl Head Sector   Cyl Head Sector     Rel#
----------  ------------------  -----------------  ----------------- ---------
HUGE         315M    644691      0    1     1    997   37    17      17


NOTE: UNFORMAT is a DOS command and is not included with Windows 98. If your system does not include a set of files from your previous version of DOS, you will not have the UNFORMAT command on your computer.

The preceding sample output comes from a computer that has two physical disks, each of which contains only one partition. The first disk, which indicates "Boot" in its Type listing, is drive C. The other disk is drive D. The listing for both drives includes the starting and ending sectors specified by the cylinder (track), head, and sector number.


NOTE: A primary partition can contain only one logical drive, such as C or D. Extended partitions, explained in the next section, can contain multiple logical drives.

Extended Partitions

A PC's disk also can contain extended partitions. The disk must contain a primary partition, but that primary partition can contain extended par-titions. Unlike a primary partition, an extended partition can contain multiple logical drives. You use the FDISK command to create primary and secondary partitions.

The FAT

With so many clusters on a disk, Windows 98 needs some way to keep track of where each file and directory resides. Essentially, Windows 98 needs to know the starting and ending cluster for each file. The file allocation table, or FAT, provides that information. The FAT contains an entry for every cluster on the disk, and Windows 98 uses the FAT to keep track of which clusters are allocated to which files and directories. The FAT is the key that enables Windows 98 to locate, read, and write files on the disk.

A FAT cluster entry can contain any one of the entries listed in Table 14.2.

TABLE 14.2 Possible FAT Cluster Entries

Entry Meaning
0 Cluster is available
BAD Cluster contains bad sector and can't be used
Reserved Cluster has been set aside for use only by Windows 98 system files
EOF Marks the last cluster of a file
### (numbers) Number identifying the next cluster in the file

The FAT isn't very useful by itself. Windows 98 uses the root directory table in conjunction with the FAT to locate a file. The root directory table contains the name of the files in the root directory (including subdirectory entries) and the starting cluster number of each file.

To understand how the two tables work together, take the following example: Assume you open Notepad and then open a text file located in the root directory. To read the file, Windows 98 first looks in the root directory table and finds that the file (for the sake of the example) starts in cluster 200. Windows 98 reads the data from cluster 200. Then, Windows 98 reads the FAT entry for clusters 200 and finds the value 201, which indicates that the next data cluster is 201. Windows 98 reads the data from cluster 201. Windows 98 then returns to the FAT to read the entry for cluster 201 so it knows where to go next. The FAT entry for cluster 201 reads 340, indicating that the next data cluster for the file is cluster 340, so Windows 98 reads the data from cluster 340. Next, Windows 98 goes back to the FAT to read the entry for cluster 340 and finds the value to be EOF, indicating that cluster 340 represents the end of the file. The file read operation is complete.

The root directory table also contains entries for any subdirectories directly under the root directory. Subdirectory entries in the root directory reference the starting cluster of the subdirectory's file list. The subdirectory file list indicates the starting cluster for each of the files in the directory. Windows 98 then uses the information in the FAT to locate the file according to its starting cluster.

VFAT, CDFS, and VCACHE

DOS and Windows 3.x interact with the disk's FAT in real mode. Windows for Workgroups introduced VFAT, a virtual installable file system driver that provided a 32-bit interface between applications and the file system. An expanded and improved version of VFAT is an integral part of Windows 98. VFAT operates in protected mode, enabling Windows 98 and applications, 16-bit or 32-bit, to access the file system without switching the processor from protected mode to real mode, which significantly improves performance.


NOTE: VFAT simply serves as an interface between applications and the FAT on the disk. There is no difference between the disk's FAT under Windows 98 or DOS.

Working in conjunction with VFAT is a virtual cache called VCACHE, a 32-bit protected-mode disk cache. A disk cache improves file I/O performance by caching recently used data and reading it from memory rather than disk on subsequent requests for the data. A cache also postpones disk writes until the system is inactive, which improves system performance. VCACHE replaces SmartDrive, the 16-bit disk cache used with Windows 3.x. Unlike SmartDrive, VCACHE provides a dynamically resizable cache to improve memory utilization. Windows 98 automatically sizes the cache at any given time according to the demands on the system.

In addition to VFAT and VCACHE, Windows 98 includes a 32-bit protected-mode CD-ROM file system driver, called CDFS. Like VFAT, CDFS improves file I/O by enabling applications to read from the CD-ROM drive in protected mode rather than requiring the system to switch to real mode to read the CD. CDFS replaces the 16-bit MSCDEX program included with DOS and Windows 3.x.

For more information on CDFS, refer to the section "Improving CD-ROM Performance" later in this chapter.

FAT32

One of the by-products of the exponential increases in hard drive sizes has been the revelation of the rather rigid limits of the FAT file system. When FAT was originally developed, it wasn't intended to be used on anything larger than a floppy disk, and some retrofitting was required to make it work with hard drives. This required the use of hybrid 16-bit addressing, and the FAT system as we know it now is also known as FAT16.

FAT16 has considerable problems when it's used on larger disks. First of all, it can't address a singe partition larger than 2 GB in size. Now although it's certainly possible to partition a disk into one or more 2 GB (or smaller) logical slices, there's also the added problem of wasted space in clusters. A 2 GB FAT partition cannot use a cluster size smaller than 32 K, which means that on the average disk there will be a great deal of wasted space. Also, there will be users who might not want to break the disk into more than one partition, logical or otherwise. More details on how cluster size and partition size affect the amount of free space remaining on the disk can be found below, in the section named "Optimizing Partition and Cluster Size."

When Windows 95's Service Release 2 was issued, it featured an add-on which remedied many of the problems of FAT16. This add-on was FAT32--a 32-bit version of the FAT file system, specifically designed to address many of the grievances many users were having with FAT16 and large disks.

FAT32 gets its name by using a 32-bit addressing scheme instead of a 16-bit one, enabling a greater number of clusters to be placed on the disk, and therefore allowing smaller initial cluster sizes for bigger disks. FAT32 also handles the root directory differently than a FAT16 drive. On a FAT16 drive, the root directory must be located in a fixed segment at the front of the disk, forcing the root directory to have a maximum of 512 entries (files or directories). FAT32 enables the root directory to live anywhere on the disk and be as long as it needs to be. FAT32 also keeps redundant backups of more critical disk information, making FAT32 partitions less susceptible to failure or data corruption. FAT16 keeps a backup copy of the file allocation table and checks against each copy to protect against corruption, but is still susceptible to corruption of directory trees, for instance.

FAT32 improves on FAT16 in a number of ways. First of all, FAT32 supports big disks. The single largest partition that FAT32 can support is 2048 gigabytes, or 2 terabytes. This should be more than enough space to satisfy even the most disk-hungry power user!

Second, FAT32 uses space more efficiently than FAT16. Its cluster sizes are smaller, because its 32-bit addressing scheme can directly address more of them.

FAT32 has many drawbacks as well as advantages. The first downside of FAT32 as opposed to FAT16 is speed. FAT32 is slightly slower in performing many common file operations. However, the difference is so marginal as to be not even noticeable--a matter of hundredths of a second. The difference becomes more pronounced for file operations that take cumulatively longer periods of time--such as thousands of write operations--but for general-purpose operations, the delay is not noticeable.

The second downside is backwards compatibility. A whole host of appli-cations and procedures will not work with FAT32 partitions. Also, your motherboard or disk controller's BIOS must fully support logical block addressing (LBA) mode extensions for drives larger than 1,024 cylinders (512 MB). For partitions larger than 8 GB on an IDE or SCSI drive, the BIOS must support INT 13 extensions. People with older computers or hard drives should check the manufacturer's specifications to determine if there will be any compatibility problems. Anyone who has to keep these reverse-compatibility issues in mind should only use FAT32 if they are confident they will not encounter such trouble.

Also, compressed drives cannot be formatted as FAT32, and removable drives should not be formatted as FAT32. Laptops will not be able to perform any suspend-to-disk functions on FAT32 drives, and if the reader's PC supports power management hibernation, it will be turned off if the drive is formatted to FAT32. Finally, a drive using FAT32 cannot have Windows 98 uninstalled.

Converting an Existing Drive to FAT32

If you have an existing FAT16 drive that you want to convert to FAT32, the best way to do that (if you don't want to erase and recreate the partition in question) is to use the FAT32 Converter. The FAT32 Converter comes with Windows 98 and is installed as a program in the Accessories / System Tools folder, which you can bring up through the Start button. If the FAT32 Converter isn't installed on your Windows 98 system, you can install it through the Windows Setup tab of the Add/Remove Programs applet (found in the Control Panel). Figure 14.1 shows the drive selection screen of the FAT32 converter.


WARNING: FAT32 cannot be installed on any drive less than 512 MB, and no drive that uses less than 512 MB of space can be converted to FAT32.

FIGURE 14.1 The FAT32 Converter lists all the partitions in your system that can be converted to FAT32.

If no drives are eligible to be converted to FAT32, the FAT32 Converter will inform you of this. You need at least one 512 MB FAT16 partition in order for anything to show up in the display.

After you select the drive you want to convert, the computer will set to work performing the conversion. The entire conversion process takes time--the larger the drive, the more time will be needed. If you're converting a 1 GB drive, expect the process to take several hours.

After the conversion process ends, Windows 98 automatically runs Disk Defragmenter. Because of the changes in the cluster structure, the conversion process always causes a disk to become fragmented by a certain amount. If you want, you can stop Disk Defragmenter and run it at another time, but the system will not perform at its best until then. The defragmentation process will take upwards of a few hours because the changing of cluster sizes causes all the continuity between clusters to be disrupted. The defragmentation process can be halted and restarted at another time, but for the best performance it's a good idea to run the complete defragmentation cycle at some point.

Converting a FAT32 Drive Back to FAT16

Because of compatibility concerns, there might come a point when you need to convert a FAT32 drive back to a FAT16 drive. Windows 98 does not have any built-in way of doing this, short of erasing the partition in question and rebuilding it from scratch. To accomplish this end, you will need a third-part program that enables you to manipulate disk partitions non-destructively, such as PowerQuest's PartitionMagic or Quarterdeck's Partition-It. These programs have the capacity to nondestructively change a FAT32 partition back to FAT16. The conversion process also takes place very quickly: A 512 MB partition takes less than a minute to change back.


TIP: A good preemptive measure when working with partitions is to set up a small empty primary partition at the front of the disk. Format this partition as FAT16 and make it a bootable partition. This way, you can place disk partition utilities, like FDISK or the previously mentioned third-party programs, into the partition. The partition can also be hidden and made non-bootable through FDISK if needed.

Optimizing Partition and Cluster Size

Now that you have some background in disk and file system structures, you're ready to begin optimizing your disk in Windows 98. One very important consideration if your computer contains a large hard disk is the size of the partition(s) you create on the disk.

At face value, the information in Table 14.1 might mean very little to you in practical terms. The relationship between clusters, sectors, and disk size, however, is extremely important when you go to determine how efficiently your computer's disks store data. By simply changing your disk partition method, you can recoup a huge amount of disk space that you might otherwise waste.

You might wonder where to find that wasted space, and then, how to recover it. First, you need to understand that Windows 98, like DOS and Windows 95 before it, allocates disk space by clusters. When a file needs to be written to the disk, Windows 98 allocates just enough clusters to contain the file. Assume that you want to store a 60 KB file (61,440 bytes). If you store the file on a 3 1/2-inch disk, which uses a cluster size of 1,024 bytes, Windows 98 allocates 60 clusters for the file. All the sectors contain data, and there are no leftover empty sectors, nor any wasted space (60 clusters ¥ 1,024 bytes per cluster = 61,440 bytes).

Now, assume that you store that same 60 KB file on a 1 GB hard disk that has a single partition, which uses a cluster size of 32,768 bytes, 64 sectors per cluster (refer again to Table 14.1). One cluster doesn't provide enough space to accommodate the file. Therefore, Windows 98 allocates two clusters, totaling 65,536 bytes--4,096 bytes more than the file requires, leaving 8 empty sectors in the second cluster (4,096 bytes / 512 bytes per sector = 8 sectors). Unfortunately, Windows 98 can allocate space only by clusters, not by sectors, so those 8 sectors can't be reassigned and so are wasted. In this example, almost 7 percent of the space the 60 KB file uses is wasted.


NOTE: "Sector slack," or wasted sectors, is not unique to Windows 98. DOS and Windows 95, which rely on essentially the same FAT-based file structure as Windows 98, suffer from the same problem. Many other operating systems also suffer from sector slack, although NetWare 4.x and Windows NT are exceptions, allocating space much more efficiently.

The actual amount of wasted space on a disk as a result of unfilled sectors in a cluster depends on the number of files on the disk, the size of the files, and the disk type (which defines the sector and cluster sizes). When you consider the large number of files probably stored on your hard disk and the potential for wasted space each one offers, you can see that your disk could contain plenty of empty sectors. Using the 7 percent waste in the previous example, you would lose roughly 73 MB of space on a 1 GB disk. If your files used as much as 20 percent wasted space, it would amount to nearly 200 MB of wasted space. Even larger percentages of wasted space are possible, so cluster size is a very important issue if you want to optimize your hard disk's space.

The solution is to reduce the cluster size so that Windows 98 allocates disk space in smaller chunks, which reduces wasted space. Wasting half of a 4,096-byte cluster is much better than wasting half of a 32,768-byte cluster. Unfortunately, the only way to change cluster size is to change the size of the partition. The only way to change the size of the partition is to delete the partition and re-create it. When you delete a partition, you lose all data in the partition. If you back up your entire disk, deleting and re-creating the partition is not a problem because you can simply restore the files after you re-create the partition. Backing up an entire disk, particularly a high-capacity disk, can be time-consuming, however, if you don't have a high-capacity (and generally expensive) tape backup system.

If you are willing to back up your entire system, deleting the partition and re-creating it is a good way to recover a significant amount of free space from your disk. The following sections offer advice on how to go about it.


TIP: Before you begin to repartition your disks, you should understand that an alternative exists--DriveSpace, the compressed disk structure Windows 98 supports. DriveSpace allocates space in a compressed volume on a sector-by-sector basis, rather than by clusters, effectively eliminating cluster slack space. This makes DriveSpace volumes the most efficient mechanism in Windows 98 for optimizing the use of your hard disk's space. DriveSpace volumes are limited to a compressed size of no more than 512 MB. If a maximum size of 512 MB is adequate for your needs, however, creating DriveSpace volumes is considerably easier and quicker than repartitioning the disk. Refer to the section "Increasing Disk Capacity with DriveSpace" later in this chapter for a complete discussion of the advantages, disadvantages, and use of DriveSpace in Windows 98.

Also bear in mind that when you use DriveSpace, there's a performance penalty. The computer has to take time out to compress and decompress the data, and that will result in a slower-moving machine. Depending upon file sizes, a conversion to FAT32 on a large drive may increase storage space by 40%--a much better approach than DriveSpace.


Another alternative to destroying and recreating partitions, as mentioned earlier, is to use a third-party program that can resize disk partitions on the fly. The only drawback to this method is that it requires the purchase of another software program, but any user who is either working with multiple operating systems or is experimenting to find the best partition size for their needs will find it a worthy investment.

Choosing Partition Sizes and Types

Reducing the size of your current partition reduces the partition's capacity. To get full use of the disk, therefore, you need to create multiple partitions. If you have a 1 GB disk, for example, the cluster size for a single partition is 32,768 bytes. If you create four partitions of 256 MB each, the cluster size in each partition is one-fourth that size, or 8,192 bytes. Reducing the partition size by 1 megabyte to 255 MB results in a cluster size of 4,096. You can see that reducing the partition size results in a reduction in cluster size and a potential savings in disk space that you otherwise would lose to unfilled clusters.

A PC's disk is limited to no more than four partitions. If you want to reduce the cluster size on a large disk, an alternative to creating multiple partitions is to create an extended partition, then create logical drives in the extended partition. You could, for example, create a primary partition of 255 MB, then create an extended partition that uses the rest of your hard disk's available clusters. Then, you would create multiple logical drives in the extended partition.

The size and configuration of drives you ultimately choose depend on the size of your drive and the cluster size you want to achieve. Whether you configure a new system or repartition your existing system, look at the applications you plan to install on the disk. Try to group the applications so they fit on a disk without much wasted space.


NOTE: Mixing partition types is potentially troublesome, but there are times when it can be beneficial. For instance, Windows 98 can read both FAT16 and FAT32 partitions, but of those two partition types, Windows 3.x and Windows NT can only read FAT16. If you wanted both of these operating systems to be able to read each other's partitions, the most sensible choice of partitions would be FAT16, because all operating systems can read and write FAT16 transparently. If you wanted the Windows 98 and Windows NT or Windows 3.x installations to be as discrete as possible--for instance, if you knew that you didn't want the Windows NT and Windows 98 partitions to have any crossover for security reasons--it would then make sense to make the Windows 98 partition FAT32. Also, Windows NT uses the NTFS disk format, which cannot be read by either Windows 95 or Windows 98. If you have Windows NT sharing a system with Windows 98, NTFS partitions should not be used to store data that both operating systems will need to access.

Windows NT 4.0 and higher can read and write FAT16 interchangeably. The upcoming Windows NT 5.0 is expected to support FAT32, as well as FAT16 and of course NTFS.


Creating Partitions

The FDISK program enables you to view, create, and delete partitions and logical drives. Before you use FDISK, however, you must back up your existing data on the disk, because repartitioning destroys all data on the disk.


WARNING: Backing up your existing data is an extremely important step. Also, remember that repartitioning the disk deletes your backup program from the disk. If you use a Windows 3.x-based backup program, you need to reinstall Windows 3.x and the backup program before you can restore your files after you reformat the disk. If you use a DOS-based backup program, you have to reinstall the backup program after you reformat the disk. And, if you use the Backup utility in Windows 98 to back up the system, you have to reinstall Windows 98 before you can restore the data. Plan the entire process carefully to make sure you can restore your data with the least amount of effort, and verify that you have the source files for the Backup utility on disk or CD so you can reinstall it.

If you currently have Windows 98 on the system and want to repartition the disk to use its space more effectively, back up the entire system, including all logical disks. Then, back up to disk a copy of your Registry files, SYSTEM.DAT, and USER.DAT, so you can restore them later from a new Windows 98 installation and recover all your previous Windows 98 settings. Although the Backup utility does back up the Registry files, you still should make a copy on disk. The section "Completing the Process" later in this chapter explains how to restore your Windows 98 files after you repartition a disk.

Partitioning a New Disk

If you have purchased a new computer or hard disk and Windows 98 is not installed on the disk, you must have a bootable Windows 98 disk or a bootable DOS disk that contains the FDISK and FORMAT programs. To partition the disk, insert the boot disk in drive A and turn on the computer. When the system boots, enter FDISK at the command prompt to start the FDISK program.

After you start FDISK, you should see a menu similar to the following:

1. Create DOS partition or Logical DOS Drive
2. Set active partition
3. Delete partition or logical DOS drive
4. Display partition information
5. Change current fixed disk drive

Select menu item 1, then on the next menu select item 1 again to create a primary DOS partition. FDISK displays a prompt similar to the following:

Current fixed disk drive: 1
Do you wish to use the maximum available size for a Primary DOS
Partition and make the partition active? (Y/N)

If you have a large disk, you probably do not want to use the maximum available space for the partition, because that would give you a large cluster size. Instead, answer N to create a primary partition of a size that results in the cluster size you want. You use the remaining space on the disk to create an extended partition and logical drives.

After you answer N, FDISK presents a message similar to the following:

Total disk space is nnn Mbytes (1 Mbyte = 1048576 bytes)
Maximum space available for partition is nnn Mbytes
Enter partition size in Mbytes or percent of disk space (%) to
Create a Primary DOS Partition

In this example, nnn represents a value that FDISK displays, based on the disk capacity. Enter the size, in megabytes, for the primary DOS partition. Specify a size that results in the cluster size you want (use the information in Table 14.1).


NOTE: If you intend to install Windows NT on your computer in the future, you might want to leave partition space available for an NTFS partition. Note, however, that neither Windows 98 nor DOS can read NTFS partitions. NT, however, can read the Windows 98 (DOS) partitions. Also note that Windows NT cannot at this time read or write FAT32 partitions. If you have a computer that boots to more than one operating system--such as Windows 98 and Windows NT--and you plan to share data between operating systems, you cannot use NTFS, HPFS, or FAT32 as the drive to hold the data in question.

After you create the primary DOS partition, FDISK restarts. Because the disk has not yet been formatted, you still need a bootable disk in drive A. After the system boots, run FDISK again. Then select menu item 2 to create an extended DOS partition. If you don't want to add a NTFS or HPFS partition in the future, use all remaining space on the disk for the extended partition.

After you create the extended partition, you must create logical drives in it. Follow the FDISK's prompts to create an appropriate number of logical drives in the extended partition. Remember that the size of each logical drive determines its cluster size, so choose a drive size that will give you the cluster size you want.

Repartitioning an Existing Disk

If you want to repartition an existing drive to change the partition size or divide the disk into smaller logical drives, you first must back up the entire disk. If the disk contains multiple logical drives or multiple partitions, you must back up all drives and partitions. After you back up the disk, make sure you have a copy of the backup program you used so you can reinstall it after you re-create the partition(s).


WARNING: Before you run FDISK, be sure to back up all your hard disks because FDISK will destroy all files on the disk.

After you back up the disk and ensure that you have an installable copy of the backup program, you're ready to delete the existing partition(s) and create new ones. First, make sure that you have a bootable Windows 98 or DOS disk that contains the FDISK and FORMAT programs. Then, run FDISK (you can run FDISK from the command prompt without booting from the floppy--you use the bootable disk after you remove the existing partition).

At the FDISK menu, select menu item 3, "Delete partition or Logical DOS Drive." FDISK then displays a new menu similar to the following:

1. Delete Primary DOS Partition
2. Delete Extended DOS Partition
3. Delete Logical DOS Drive(s) in the Extended DOS Partition
4. Delete Non-DOS Partition

If your disk currently contains an extended partition, select option 2 to delete the extended partition and all its logical drives. If your hard disk already has a small enough primary DOS partition to give you the cluster size you want, leave the primary DOS partition in place and simply create a new extended partition; then re-create smaller logical drives in the extended partition. If the existing primary DOS partition is larger than you want, delete it.

After you delete the existing partitions, you need to create a new primary DOS partition, an extended DOS partition, and new logical drives in the extended partition. Use the procedure explained in the previous section, "Partitioning a New Disk," to create the primary DOS partition. Size the partition to achieve the cluster size you want. For a cluster size of 4,096, for example, create a primary partition of 255 MB or less. Then, use the remaining available space to create an extended partition. In the extended partition, create logical drives of whatever size results in the cluster size you want for each drive.


NOTE: There are third-party programs, such as PowerQuest's PartitionMagic and Quarterdeck's Partition-It, that allow you to resize a partition or change its cluster size without destroying the data on it. These programs have been tested and shown to be very reliable, although having a backup of any important data is still recommended before you use them. At the time of this writing, PartitionMagic 3.0 supports the resizing and translating of NTFS, FAT16, and FAT32 partitions. Partition-It does not support any file system except FAT16.

Formatting the Disk

After you create the partitions, exit FDISK to reboot the computer using the boot floppy. After the computer boots, use the FORMAT command to format the boot drive, which should be drive C. To do so, enter FORMAT C: /S at the command prompt. FORMAT formats the disk and transfers the system files to the disk. Then, use FORMAT to format each of the logical drives you created in the extended partition. You need to use the /S switch only for drive C--you don't need to format the other logical disks as system disks.

Completing the Process

After you format the disks, you can install an operating system on the disk. How you proceed here depends on whether you want to set up a new system or upgrade an existing system. For a new system, simply begin the Windows 98 Setup process and install Windows 98 as explained in Chapter 2, "Installing and Starting Windows 98." Then you can install your applications.


NOTE: If you are upgrading from an existing Windows 95 installation, all your applications and settings should be preserved. The only exception to this is if you've chosen to make a "parallel" installation of Windows 98--that is, if you've installed Windows 98 in a separate directory instead of migrating your existing Windows 95 installation. A parallel installation requires that you reinstall your existing applications.

If you need to upgrade an existing system from DOS or Windows 3.x to Windows 98, however, you need to decide whether to reinstall DOS and Windows 3.x, or install Windows 98. Unfortunately, you can't just install Windows 98 and then restore your applications. You have to install Windows 98 over an existing copy of Windows 3.x or reinstall all your applications before they can function properly in Windows 98.


TIP: You don't have to reinstall DOS applications before they can function in Windows 98. You also generally do not need to reinstall Windows applications that do not require settings in SYSTEM.INI or WIN.INI--you can restore them from the backup set. You need to reinstall only Windows 98 applications that modify the SYSTEM.INI and WIN.INI files, or that use OLE, to work under Windows 98. Therefore, you might not need to reinstall all your applications. You can restore some from the backup set.

If you have a number of applications that you think you need to reinstall to work under Windows 98, restore your previous copies of DOS and Windows 3.x to the disks, and rearrange them on the new disks as you want (you should, however, restore DOS and Windows 3.x to drive C). Reboot the system to verify that it works properly. Then, run the Windows 98 Setup program to upgrade your existing copy of Windows 3.x to Windows 98 (refer to Chapter 2).

If you have already installed Windows 98 on the system, backed up the system using Windows 98 Backup, and repartitioned the disk to make more efficient use of space, reinstall a minimal copy of Windows 98, including the Backup utility. Next, use Backup to restore all files to the disk; then reboot the system to the command prompt. Copy your Registry files from the disk copies you made previously to the hard disk to restore all your Registry settings from the previous Windows 98 installation. Then, reboot the system to start Windows 98.

Adding a Disk

If you add a new disk to a computer that contains an existing hard disk, you don't have to back up your existing disk, although doing so regularly is a good idea. When you install a second disk, you can retain the existing disk as the boot disk or install the new disk as a boot disk. You also need to consider a few items when you install a second disk, to ensure that it doesn't conflict with the existing disk.

If you install a second IDE drive, check the documentation for the disks to determine how to set the drive to be a slave or a master drive. Set the boot disk as the master and the second as the slave. If you install a new SCSI disk, be sure to set the SCSI ID of the new disk so that it does not conflict with the SCSI ID of the existing disk or any other SCSI devices, such as CD-ROM drives, tape drives, scanners, and so forth.

If you decide to install the new disk as a secondary disk (not the boot disk), just install the drive and boot the system. Run FDISK to create the necessary partitions on the disk, then use FORMAT to format the disk(s). Then you can begin using the new disk.


WARNING: When you use FDISK to partition the new hard disk, make sure you do not select the original hard disk by mistake.

If you decide to install the new disk as the boot disk, first install the drive as a secondary disk. Use FDISK to partition the disk; then use FORMAT /S to format the new disk as a bootable disk. Then, use XCOPY source destination /E /H /K to copy all files from the old disk to the new disk. To copy all files from drive C to drive F, for example, use the command XCOPY C:\*.* F: /E /H /K. Then, shut down the system, swap the drives (resetting their master/slave or SCSI ID status), and restart the system. You can use Explorer or File Manager to complete the file transfer process if you need to copy additional disks.


NOTE: Some IDE drives cannot be configured as slave drives, so you might be unable to install the new drive as a second drive. Instead, you will have to use the new drive as the master drive and the existing drive as the slave (assuming the existing drive can be configured as a slave drive).

Understanding Disk Compression

MS-DOS 6.0 introduced disk compression integrated with the DOS operating system, and MS-DOS 6.22 introduced DriveSpace, a functional equivalent to DoubleSpace. These disk compression tools enable DOS to compress existing data or create a new compressed disk using some or all empty space on a hard disk. With Windows 95, the disk-compression subsystem was rewritten to work properly under Windows, and enable Windows 95 to support compressed volumes transparently.

Windows 98 includes support for DriveSpace-compressed volumes. If you install Windows 98 on a system that contains these types of compressed volumes, Windows 98 automatically recognizes and supports the compressed volumes. If your disk(s) does not yet contain compressed volumes, you can use the DriveSpace utility in Windows 98 to compress the disk. Compressing a disk can increase its capacity by a factor of as much as 3:1 or more, depending on the types of files you store on the disk. This section of the chapter explains disk compression and DriveSpace in Windows 98.


NOTE: Windows 98 supports other disk compression utilities, such as Stacker (Stac Electronics), through real-mode drivers. If you use a disk compression product other than DoubleSpace or DriveSpace, contact the manufacturer to find out whether new Windows 98 versions of the product or new Windows 98 drivers are available to support the compressed disks without using a real-mode driver. Generally, however, it's a good idea to uncompress existing drives before upgrading to Windows 98 and then recompress them with the native drive- compression technology in Windows 98.

Disk Compression in Windows 98

Although disk compression might seem mysterious, a compressed volume is really nothing more than a hidden file located on a host disk (explained shortly). DriveSpace provides two methods for creating these compressed volumes: You can compress an existing disk, or create a new compressed disk.

If you compress an existing disk, DriveSpace first changes the drive letter of the drive being compressed. Assume that your computer contains one logical hard disk, C. DriveSpace changes the drive letter of the existing drive from C to H. Drive H becomes the host drive for the compressed volume, which DriveSpace creates as a hidden file on the disk. DriveSpace then compresses the uncompressed files on drive H, the original hard disk (C), and writes them in this hidden file. The operating system (Windows 98) then treats this hidden file as a logical disk, assigning to it the drive letter C. Windows 98 and your applications then treat the hidden volume as a regular disk.

You also can use the available space on a disk for creating a new compressed volume. Consider the previous example in which your PC contains a single, uncompressed disk recognized as C. Assume that drive C is a 340 MB disk, and about half of the space on the disk, or about 170 MB, is available. You can use DriveSpace to compress that available space on the disk, which has an average capacity of double its uncompressed size. The result is a new, empty drive D that has a capacity of 340 MB, and an existing drive C that has a capacity of 170 MB (with only a small amount of available disk space). You have increased your PC's total disk capacity from 340 MB to 510 MB. If you have more available space on the disk with which to work, the capacity will be greater.

There are arguments both for and against using DriveSpace, especially on systems with slower CPUs and slower disk drives. Users who still have a 486 or a slow Pentium (less than 100 MHz) should steer clear of DriveSpace and use FAT32 instead, since FAT32 provides more efficient disk storage than FAT16 with much less processor overhead than DriveSpace. However, if you have a fast machine and a fast disk drive, and work with many large, compressable files (bitmaps, long documents, and so forth), then a DriveSpace partition in conjunction with a FAT32 partition will yield good results.


TIP: If you still are concerned about data security on compressed volumes, here is a compromise: Place Windows 98 and your documents on the uncompressed disk, and place all your applications on the compressed volume. After you place the applications on the compressed volume, back up the volume to tape, a network disk, or writable CD, if possible. If you do experience a problem with the compressed volume, you can easily restore its files from the backup or reinstall the applications.


WARNING: Although your compressed volumes are relatively safe, you still can destroy the volume. If you erase the hidden file that contains the compressed volume, you lose all the files. DriveSpace volumes have a file name of DRVSPACE.NNN, where nnn is a number, such as 001. DoubleSpace volumes have similar file names, such as DBLSPACE.001. Do not delete these types of files unless you want to delete the entire compressed volume and all its files.

Using DriveSpace and Compressing Disks

As with other Windows 98 disk utilities, you can run DriveSpace from the Windows 98 command prompt or within the Windows 98 GUI. To start DriveSpace in Windows 98, choose Start | Programs | Accessories | System Tools | DriveSpace. DriveSpace displays the initial window shown in Figure 14.2.

FIGURE 14.2 The initial DriveSpace 3 window lists all the available compressed and uncompressed drives in your system.

To start DriveSpace from a Windows 98 command prompt, enter the DRVSPACE command at the command prompt, followed by any optional switches or other parameters. The switches supported by DriveSpace are explained later in this chapter, in the section "Using DriveSpace Switches."

You can compress an existing disk, or create a new compressed disk using most or all available space on the existing disk. Although you can perform either function from the command prompt, starting and using DriveSpace in the Windows 98 GUI is easier.

Compressing an Existing Disk

To compress an existing disk, start DriveSpace, select the disk you want to compress, and then choose Drive | Compress. DriveSpace displays a dialog box similar to the one shown in Figure 14.3, which gives you information about the drive and its parameters for after it is compressed.

The Compress a Drive dialog box displays information about your disk as it is now, and estimates the amount of free space to be available on the disk following compression. The dialog box also indicates the drive letter to be assigned to the new disk. To specify options or change the drive letter, choose the Options button, which displays the Compression Options dialog box (see Figure 14.4).

FIGURE 14.3 The DriveSpace disk-compression dialog box gives before-and-after compression information for the selected disk.

FIGURE 14.4 The DriveSpace Compression Options dialog box lets you choose the drive letter and free space available for the host drive.

Use the Drive letter of the host drive drop-down list to specify the drive letter to be assigned to the compressed volume's host drive. If you are compressing drive C, for example, and use H as the host drive's ID, your existing drive C is assigned drive letter H. The new compressed volume then is recognized as drive C. You can assign any unused drive letter to the host drive.

You also can adjust the amount of free space that will remain on the host drive. You might prefer to have more uncompressed space available on the host drive to enable you to store other files on the drive. Or, you might want to leave less uncompressed space on the host drive, to make more space available in the compressed volume. Reducing the free space on the host drive by 10 MB, for example, results in roughly 20 MB more available space on the compressed volume.

The Hide host drive check box controls whether the host drive still shows up in the My Computer and Network Neighborhood folders and File Open and Save dialog boxes. If you compress an existing disk and leave only a minimal amount of free space on the host disk (2 MB, for example), you don't need to hide the host drive because you can't store additional files on the host drive. Instead, the new files go into the compressed volume. If you leave a more sizable amount of free space on the host disk, you probably want the drive to be visible so that you can store files on it. Set the Hide host drive check box accordingly.


WARNING: Do not hide the host drive if you want to continue to use it to read or write files other than in the compressed volume. If you hide the host drive, its logical drive letter will no longer be visible and you will be unable to reference the drive to access it.

After you set options for the compressed volume, choose OK; then choose Start in the Compress a Drive dialog box. DriveSpace begins to compress the drive, which might take a number of hours if you have a very large drive.


NOTE: DriveSpace can't compress a full drive. If the drive is the boot hard disk drive, the drive must contain at least 2 MB of free space. Other disk drives must contain at least 512 KB of free space (including hard disks and floppy disks). Therefore, DriveSpace can't compress 360 KB floppy disks.

Creating a New Compressed Volume

You also can create a new, empty compressed volume by compressing some of the available space on a disk. To create an empty compressed volume, open DriveSpace and select the drive that contains the available space you want to use for the compressed volume. Then, choose Advanced | Create Empty to display the Create New Compressed Drive dialog box.

Use the controls in the Create New Compressed Drive dialog box to specify the parameters for the new disk, including its drive ID. The three size controls on the dialog box work together--if you specify a different amount in the using text box, the other two text boxes change accordingly. Specify the amount of free space you want to use for the new compressed volume, or specify the compressed capacity of the new volume.


TIP: When you specify values to create the compressed volume, remember that DriveSpace can use no more than 256 MB of space to create the volume. Specifying a compressed volume size of 800 MB, for example, does not cause DriveSpace to use 400 MB of free space for the compressed volume. Instead, DriveSpace defaults to the maximum 256 MB.

After you specify options for the new compressed volume, choose Start. DriveSpace begins to create the new, empty compressed volume. The length of time varies according to the size you select for the compressed volume, but is much shorter than that required to compress an existing disk and all its data. After DriveSpace creates the volume, it prompts you to restart the system so that the new drive can be properly recognized.

Formatting a Compressed Volume

Unlike with standard uncompressed disks, you do not have to format a compressed volume before you can use it. As soon as DriveSpace creates the new disk and restarts the system, you can begin using the new volume. DriveSpace does, however, have an option you can use to format a compressed volume. As with an uncompressed disk, formatting a compressed volume removes all files from the volume and makes all space on the disk available in a contiguous block.

If you want to format a compressed volume, select the compressed volume from the DriveSpace window, then choose Drive | Format. DriveSpace displays a warning message that formatting the volume will delete all files. Answer Yes to format the volume, or No to abort the format operation.


NOTE: DriveSpace cannot format an uncompressed disk. If you try it, an error message dialog appears. Formatting a compressed volume does not affect or format its host drive, but rather, affects only the hidden file that contains the compressed volume.

Viewing and Setting Volume Properties

You can view the properties of a compressed volume to learn how much available space it contains, the estimated compression ratio for the volume, and other information. To view a compressed volume's properties, select the compressed volume from the DriveSpace main window, then choose Drive | Properties. DriveSpace shows you a dialog box similar to the one shown in Figure 14.5.

FIGURE 14.5 The properties for a compressed drive include free space, used space, and compression ratio.

You can change only a handful of properties of a compressed volume, but these properties have a major impact on the volume's capacity and other parameters. The following sections explain the ways in which you can modify an existing compressed volume.

Adjusting a Volume's Size

After it is created, a compressed volume does not have to remain at a fixed capacity. Depending on the amount of available space on the host disk and in the compressed volume, you can adjust the size of the compressed volume. If the host disk contains more available space, you can increase the size of the compressed volume. Or, you might want to reduce the size of the compressed volume to make more uncompressed space available on the host disk.

To adjust a compressed volume's size, start DriveSpace and select the volume you want to change. Then, choose Drive | Adjust Free Space to display the Adjust Free Space dialog box (see Figure 14.6).

You can specify the amount of space to make available on the host disk, or the amount of compressed space for the compressed volume. You can enter the sizes directly in the two Free space text boxes or use the slider control to change the free space values. After you have the settings the way you want them, choose OK.

FIGURE 14.6 Adjusting the free space available on a compressed disk.

Changing a Volume's Compression Ratio

The amount of data that can fit in a compressed volume depends heavily on the types of files you place in the volume. Some types of files can be compressed very much, but other files can be compressed very little.

The compression ratio of a compressed volume is just a factor that DriveSpace uses to report the amount of potential free space left in the compressed volume. Adjusting the compression ratio does not make the files compress any more or less, but it does change the amount of free space DriveSpace reports as being available in the volume.



TIP: Increasing the compression ratio is helpful if you are confident that an application you are attempting to install on the volume will fit, but the setup program is reporting the disk doesn't contain sufficient free space.

To adjust a volume's compression ratio, select the drive in the DriveSpace main window, and then choose Advanced | Change Ratio. DriveSpace displays a Compression Ratio dialog box that shows the actual compression ratio of the data on the drive as well as the estimated compression ratio. Use the slider control to adjust the estimated compression ratio to suit your needs; then choose OK.


TIP: If the actual compression ratio DriveSpace reports falls very close to the estimated compression ratio, you might want to reconsider changing the compression ratio. Unless you place highly compressible files in the volume, you have no reason to think that the files you place in the volume in the future will compress any further than the files already there.

Using the Compression Agent to Change Compression Type

Windows 98 comes with a utility entitled Compression Agent, which lets you modify the type of compression used to store files in a compressed volume. You can get better compression ratios on your compressed drives by choosing the type of compression that suits your needs best.

The three types of compression algorithms used in a compressed Windows 98 drive are:

Compression Agent is installed with DriveSpace 3, and can be launched through the Start Button, Programs, Accessories, System Tools menu. An example of the main Compression Agent screen can be seen in Figure 14.7, which lists the amount of space that will be gained or lost by switching to different varieties of compression.

FIGURE 14.7 The main Compression Agent screen.

Compression Agent Settings

To choose how you want to apply the various compression algorithms, click the Settings button, which brings up the Compression Agent Settings window (see Figure 14.8).

FIGURE 14.8 The Compression Agent Settings.

The Settings window lets you choose which files will be UltraPacked and HiPacked, and uses the following choices:

The Do you want to HiPack the rest of your files? option can be answered either Yes or No. Yes means that any files not covered by the above options will be HiPacked. No means that any files not covered by the above options will be left uncompressed. Finally, the Save these settings as the new default settings box, when checked, will cause the current settings to be preserved for future use.

Compression Agent File Exceptions

It's possible to get even more specific about how to apply compression, right down to the directory and file level. If you want to specify how to compress specific files or folders full of files, click on the Exceptions button in the Compression Agent Settings window, which brings up the Exceptions window as seen in Figure 14.9.

The Exceptions window contains a list of files and folders, as well as the specific compression schemes that are going to be applied to them. You can freely mix compression types--for instance, a folder that's compressed with HiPack can have files within it that are specified to use UltraPack. To add a file or folder, click the Add button, which brings up the Add Exceptions window (see Figure 14.10).

FIGURE 14.9 The Compression Agent Exceptions window.

The Add Exceptions window contains a text box, which can hold either a pathname, a filename, or a file wildcard, and the options and choices you need to provide to specify the compression for a given file or folder.

FIGURE 14.10 The Compression Agent Add Exceptions window.

The final three buttons let you choose which compression scheme to apply to the object in question: UltraPack, HiPack, and No Compression.

To add a file or folder, click the Browse button to bring up an Explorer-style dialog box. This will let you browse to a specific file or folder; click OK to select the item in question and return to the Exceptions window.

When you have selected an exception item, click Add to add the item to the Exceptions list. The Add Exceptions window doesn't go away when you add an item; this is normal, and lets you add many items in rapid sequence. When you're finished adding items, click Cancel to return to the Exceptions list. Click OK or Cancel to leave the Exceptions list and return to the Compression Agent Settings window.

The Change button on the Compression Agent Exceptions window lets you change the settings for the highlighted exception, and brings up a window similar to the Add Exceptions window. The Remove button deletes the highlighted exception from the list.

Advanced Compression Agent Settings

The Compression Agent Settings window has another button, Advanced, which brings up the Advanced Settings window, which governs the lesser-used functions of Compression Agent. See Figure 14.11 for an example of the Advanced Settings window. Right now there are only two options, but when adjusted properly, they can have a significant impact on the efficiency of the compressed drive.

FIGURE 14.11 The Compression Agent Advanced Settings window.

Click the OK or Cancel button to return to the Compression Agent Settings Window.

When you have finished making all changes to Compression Agent's settings, click the Start button on the main Compression Agent menu to execute the changes described. This process can take a long time on larger compressed drives, and also a longer time depending on what kinds of compression settings are being used. More use of UltraPack will certainly result in a longer wait.

At the end of the program's run, Compression Agent will display a report that indicates how the efficiency of the drive's compression has been changed. The report lists the amount of space used in each type of compression, and whether that space has been gained to save space or lost to improve performance.

Changing a Volume's Drive Letter

Another property of a compressed volume you can change is the volume's drive letter. You might want to change the drive letter to make that letter available for a different compressed drive or new physical drive you intend to add to the system. Or, you might simply want to swap the letters assigned to two different compressed volumes.

To change a compressed volume's drive ID, open DriveSpace and select the drive whose letter you want to change Then, choose Advanced | Change Letter to display the Select Drive dialog box (see Figure 14.12). From the drop-down list, select the drive letter you want to assign to the compressed volume; then choose OK. DriveSpace changes the drive's volume and then prompts you to restart the computer so that the change can be properly recognized.

FIGURE 14.12 To change the drive letter for a compressed volume, simply select it from the displayed box.


TIP: If you want to swap the drive letters for two compressed drives, you actually have to change drive letters three times. Assume that one compressed volume is drive H, and another is drive I; you would need to change drive H to J, change I to H, and then change J to I. Although DriveSpace prompts you to restart the computer after each change, you can wait until the last change is complete before you restart the computer.

Mounting and Unmounting Volumes

Before you can use a compressed volume, you have to mount it. Mounting establishes a logical link between the volume's disk letter and the volume file. Generally, DriveSpace automatically mounts compressed volumes, so the only time you need to manually mount a volume is if you have unmoun-ted the volume.

Only a few reasons exist for unmounting a compressed volume. You might want to move the volume to a different host disk, or you might be experiencing problems with the compressed volume and want to run ScanDisk on the volume file from the Windows 98 command prompt (outside of the GUI) to check the volume.

You cannot unmount a volume that contains open files. The first step in unmounting a disk, therefore, is to close all applications and files that reside on the disk. Then, open DriveSpace and select the drive you want to unmount. Choose Advanced | Unmount. If the volume contains no open files, DriveSpace unmounts the volume. You do not have to restart the system after you unmount a compressed volume.

To mount a volume so that you can use it again, open DriveSpace and select the volume's host disk. If the compressed volume is stored on C, for example, choose drive C. Then, choose Advanced | Mount. If the selected drive contains any DriveSpace- or DoubleSpace-compressed volume files in its root directory, DriveSpace opens the Mount Drive dialog box (see Figure 14.13). Choose the volume file you want to mount, specify the drive letter you want to assign the volume, and then choose OK. You don't need to restart the system after you mount a compressed volume.

FIGURE 14.13 The Create New Compressed Drive dialog box gives you the full range of options to create a new uncompressed drive.


TIP: If you use the Change Letter command in DriveSpace's Advanced menu to change the drive letter of a compressed volume, Windows 98 has to restart. One method for changing drive letters that does not require a system restart is to unmount the volume and then mount it again using a different drive letter.

Uncompressing a Volume

Unlike DoubleSpace, the first disk-compression utility in DOS, DriveSpace in Windows 98 enables you to uncompress a volume. Naturally, you can uncompress a volume only if your disk contains enough available uncompressed space to contain the files in the compressed volume. Also, DriveSpace does not uncompress a compressed volume if any file names conflict between the host disk and the compressed volume. If you have files that have the same name in the root directory of the host disk and the compressed volume, for example, DriveSpace generates an error message and refuses to uncompress the volume.

To uncompress a disk, select the compressed volume you want to uncompress, then choose Drive | Uncompress. DriveSpace first checks the volume for conflicting file names and the host disk for available space. If DriveSpace does not detect any errors, it displays a dialog box that reports the state of the disk before and after compression (refer to Figure 14.13). Choose Start to begin uncompressing the disk.

Using Compressed Floppy Disks

You can compress a floppy disk, increasing its capacity. Any system on which you use the compressed floppy disk must have DriveSpace or DoubleSpace installed, but this means you should be able to use the compressed floppy disk on any system that uses MS-DOS 6.0 or later, or Windows 98.


NOTE: You cannot create an empty compressed volume on a floppy disk. Instead, you must compress the floppy disk. Unlike when you compress a hard disk, you can't hide the floppy disk's host drive.

To compress a floppy disk, insert the disk in one of your PC's drives, then open DriveSpace. In DriveSpace, select the floppy disk you want to compress, then choose Drive | Compress. DriveSpace displays a dialog box that gives information about the disk in its uncompressed and compressed states. The reported compressed capacity of the disk might not be accurate, however, but DriveSpace displays another more accurate report after it's done.

During compression, DriveSpace places a file named READTHIS.TXT on the floppy disk outside the compressed volume (essentially, on the floppy disk's host drive). This file contains instructions on how to mount the floppy disk. By default, Windows 98 automatically mounts all removable compressed volumes, which means you can insert the disk and begin using it without first manually mounting the disk. You can use DriveSpace to turn on or off automatic mounting of compressed volumes. To change this setting, open DriveSpace and choose Advanced | Settings to display the Disk Compression Settings dialog box.

The Disk Compression Settings dialog box shows the current compression driver and includes a check box you can use to turn on or off automatic mounting of compressed volumes. Enable the check box if you want Windows 98 to automatically mount new compressed volumes after you create or insert them.

Using DriveSpace Switches

As with the other Windows 98 disk utilities, DriveSpace supports a number of command-line switches you can use to control the way the program runs. You can add these switches to the Command line text box of a shortcut to DriveSpace, or enter the DRVSPACE command at the command prompt. The syntax of the DRVSPACE command is as follows:

drvspace /compress d: [/size=n| /reserve=n] [/new=e:]
drvspace /create d: [/size=n | /reserve=n] [/new=e:] [/cvf=nnn]
drvspace /delete d:\d??space.nnn
drvspace /format d:\d??space.nnn
drvspace /host=e: d:
drvspace [/info] d:
drvspace /mount {[=nnn] d: | d:\d??space.nnn} [/new=e:]
drvspace /move d: /new=e:
drvspace /ratio[=n] d:
drvspace /settings
drvspace /size[=n| /reserve=n] d:
drvspace /uncompress d:
drvspace /unmount d:

In these syntax examples, d: and e: represent drive IDs, n represents an integer value, and nnn represents the numeric file extension on a compressed volume file (such as 001). D??space.nnn represents the volume file name, such as DBLSPACE.001, DRVSPACE.001, and so on.

The switches supported by DriveSpace are explained in the following list (syntax for each described in the previous syntax examples):


Previous chapterNext chapterContents

© Copyright, Macmillan Computer Publishing. All rights reserved.