Previous | Next

Disk Management

Windows 98 provides utilities to partition and format a hard disk. Windows 98 also includes several utilities for managing disks, protecting data, and ensuring good disk performance. To keep your computer in good working order, use these programs on a regular basis. Table 10.3 outlines some tasks that are necessary to manage your computer.

Table 10.3 Disk management tasks

To ensure that Do this
Files are not lost if the hard disk fails Run Microsoft Backup software. Back up your files at least once a week. See Chapter 27, "General Troubleshooting."
The computer can access files quickly and efficiently Defragment the hard disk. See "Defragmenting Disks" later in this chapter.
Lost clusters do not take up space on a disk, or the hard disk is not damaged Run ScanDisk. See "Using ScanDisk" later in this chapter.
System performs optimally Run Maintenance Wizard. See Chapter 23, "System and Remote Administration Tools."
Space is available on the hard disk Use Disk Cleanup and disk compression. See "Using Disk Cleanup" and "Using Disk Compression" later in this chapter.

A sample routine for managing a computer’s hard disks might include the following tasks:

No matter what your computer management plan, carry it out at regular intervals using Task Scheduler. Task Scheduler is easy and automatic and performs tasks when you are not around or not using the computer.

Note

For best results, do not run other programs while running either Disk Defragmenter or ScanDisk. Although you can use the computer for other tasks while running either of these utilities, each time you write to the disk, the utility automatically reinitiates itself to work with the current view of the disk.

Using Fdisk to Partition Hard Disks

This section describes how to use the Fdisk utility to configure a hard disk. For example, if you want to combine several partitions into one large partition, you must use Fdisk.

Fdisk is an extremely powerful program. If you delete a disk partition by using Fdisk, all the data in that partition will be permanently destroyed.

Caution

Do not repartition the hard disk using Fdisk if the hard drive was partitioned using a third party program, such as those created by Disk Manager, EZ Drive, Storage Dimensions SpeedStor, Priam, or Everex partitioning programs. These programs provide drive translation between the hard disk drive and the BIOS, and are typically used on systems in which the BIOS does not support large drives. If the drive has been partitioned using one of these utilities, use that program to repartition the drive (as opposed to using Fdisk).

The above programs are not a complete list of utilities that provide disk partitioning. Other programs sold with various hard drives provide similar functionality, but have various names, depending on the manufacturer. Current partitioning software typically loads right after BIOS POST, but prior to the operating system. When these programs load, they usually display a banner page or text informing the customer to press a key sequence to boot to the floppy drive (generally the CTRL or SPACEBAR). Older versions of partitioning software

load from a device=<driver> line in Config.sys. The following are examples of this type of driver: Dmdrvr.bin (Older Disk Manager), Sstor.sys (SpeedStor), Hardrive.sys (Priam), and Evdisk.sys (Everex).

If you are unsure which software is being used, consult your documentation, the computer manufacturer, or the hard disk drive manufacturer.

To configure a hard disk

  1. Create a Startup Disk using the Add/Remove Programs option in Control Panel.
  2. Back up the files on the hard disk.

    Note

    Step 2 is only necessary if there are files on the disk that you need or want to save.

  3. Partition the hard disk using Fdisk.
  4. Format the hard disk.
  5. Restore the backed-up files.

Partitioning Drives

If you want to partition a hard disk into one drive, you must first use Fdisk to delete all existing partitions and logical drives, and then create a new primary partition and make it active. You can also partition a hard disk so that it has more than one logical drive.

Fdisk is an MS-DOS-based application that can be run from an MS-DOS command line or from within Windows 98 if partitioning an additional hard drive. The partitions that Fdisk creates are called MS-DOS partitions. The Startup Disk contains a copy of Fdisk, which you can use if a hard disk becomes corrupt or unreadable.

To start Fdisk

  1. If you are starting Fdisk from a Startup Disk, put the disk in drive a: and press CTRL+ALT+DEL to restart the computer. At the command prompt on the a: drive, type fdisk.

    – Or –

    At the command prompt, type fdisk.

  2. If you have a hard disk smaller than 512 MB, the Fdisk Options screen appears.

    You can choose to do the following:

    – Or –

    If you have a hard disk larger than 512 MB, the following screen appears.

    Important

    If you enable large disk support, any drives created will be FAT32. As such, you will not be able to access the newly created drive if booting from a boot disk created by a previous version of Windows 95, Windows 95A, or MS-DOS. Windows 95B (OSR2) does support FAT32, however, it is recommended that you use your Windows 98 Emergency Boot Disk when booting from a floppy. In addition, legacy third-party disk utilities may not function on FAT32, so it is highly recommended you contact your software vendor to ensure FAT32 compatibility. Most third-party manufacturers already have FAT32 versions of disk utilities available. Utilities included with Windows 98 are compatible with FAT32.

    Fdisk identified that you have a drive larger than 512 MB. It asks if you wish to enable large disk support, so that your system can use FAT32 as your file system. You can choose one of the following options:

Each Fdisk screen displays a Current Fixed Disk Drive line, followed by a number. If the computer has only one hard disk drive, this number is always 1. If the computer has more than one hard disk drive, the number shows the disk Fdisk is currently working on. The first hard disk drive on the computer is 1, the second is 2, and so on. The Current Fixed Disk Drive line refers only to physical disk drives.

Note

If you installed a disk-compression program from Microsoft or another vendor, Fdisk displays the uncompressed, not the compressed, size of the drives. Also, Fdisk may not display information about all the drives used by a disk-compression program from another vendor.

To configure a hard disk using Fdisk

  1. Delete all MS-DOS partitions in the following order: logical drives, the extended MS-DOS partition, and then the primary MS-DOS partition.
  2. Create a new primary MS-DOS partition.
  3. (Optional) Create an extended partition and logical drives.

Caution

If you use Fdisk to repartition a hard disk, all the files on the original partitions will be deleted. Be sure to back up all data files on the hard drive before using Fdisk.

Deleting Partitions and Logical Drives

You can use Fdisk to delete partitions before creating a new primary partition. You must delete partitions in the following order:

  1. Any non-MS-DOS partitions.
  2. Any logical drives in the extended MS-DOS partition.
  3. Any extended MS-DOS partition.
  4. The existing primary MS-DOS partition.

Important

Back up your files on all partitions of the fixed disk prior to deletion. If the computer has a non-MS-DOS partition on a hard disk, you may have to boot to the operating system that created the partition in order to back up the data on the logical drive.

For more information, see the documentation that came with the non-MS-DOS operating system, or the disk-partitioning program from another vendor.

To delete a partition or logical drive

  1. In the Fdisk Options screen, press 3, and then press ENTER. The Delete DOS Partition Or Logical DOS Drive screen appears.
  2. Press the number for the kind of partition you want to delete, and then press ENTER.
  3. Follow the directions on the screen, and repeat the steps for deleting any additional logical drives or partitions.

If Fdisk cannot delete a non-MS-DOS partition, quit Fdisk and delete the non-MS-DOS partition by using the software used to create it.

Creating a Primary MS-DOS Partition

On a new disk, or after you have deleted a primary MS-DOS partition, you can create a new primary MS-DOS partition.

To create a primary MS-DOS partition

  1. In the Fdisk Options screen, press 1, and then press ENTER. The Create DOS Partition Or Logical DOS Drive screen appears.
  2. Press 1, and then press ENTER. The Create Primary DOS Partition screen appears.
  3. If you want the partition to be the maximum size, press ENTER. Then insert a Startup Disk in drive a:, and press any key.

    – Or –

    If you do not want the partition to be the maximum size, press n, and then press ENTER. Another Create Primary DOS Partition screen appears.

  4. To specify the partition size you want, follow the instructions on-screen, and then press ENTER.

    You can specify the partition size as a percentage of disk space or in megabytes of disk space. If you specify a percentage of disk space, include a percent sign (%) after the number.

  5. If you create the Primary partition to use the entire hard drive, press ESC twice to exit FDISK, then reboot the computer to the floppy disk.

    If you chose not to use the entire drive for the Primary partition, you need to create the Extended DOS partition (unless you plan to use the remaining disk space for other reasons, such as a different operating system). To do this, select Option 1 from the main FDISK options screen., then choose to create an Extended DOS partition. This will typically be set up for the remaining disk space on the drive. You will be prompted to create logical drives upon establishing the Extended DOS partition. Specify the partition size you want as a percentage or number of megabytes of disk space. Select logical drive sizes the same way.

    Finally, if you created a Primary and an Extended partition, you need to set an active partition. From the main Fdisk options menu, select option 2, and then select the Primary partition to set active.

Verifying Drive Integrity

While using Fdisk, each time you create a partition or logical drive, Fdisk displays the following message on the bottom of the screen:

Verifying drive integrity,    ##% complete.

The percentage counts 0 to 100. When verifying the drive’s integrity, Fdisk is checking the tracks where the system files and FAT will be stored. Fdisk displays this message since it has capabilities for setting up very large drives and the process may take some time.

The check initially verifies the number of tracks necessary to hold the system files and FAT as if the entire disk were partitioned as one primary partition. If you create an extended partition it will verify the number of tracks necessary to hold the system files and FAT as if the remaining portion were partitioned as one logical drive. Finally, with each logical drive created, Fdisk verifies the number of tracks necessary to hold the system files and FAT as if the remaining portion of the extended partition were defined as a logical drive. This repeats until you finish creating logical drives.

Formatting a Hard Disk

The Format command has changed to take into account 32-bit FAT and larger drives. The process for formatting a drive has not changed.

The hard disk on your computer must be formatted before you can run Windows 98 Setup. However, if Windows 98 is already installed and you need to reformat the hard disk, use the following procedure.

Note

If the disk was compressed using DriveSpace, you must use the Format option in the DriveSpace program to format the compressed drive.

To format a hard disk drive with Windows 98 installed

To format a hard disk drive using a Windows 98 Startup Disk

  1. Make sure a Startup Disk is in drive a:. Then, at the command prompt, type the following:

    format drive:

    For drive, type the letter of the drive you want to format.

    If you are formatting drive c:, copy system files to the hard disk by typing the following at the command prompt:

    format c: /s

    When the warning message appears, proceed with formatting by pressing Y. Then press ENTER.

  2. When formatting is complete, type a volume label (if you want one), and then press ENTER.
  3. If you want to format other drives, repeat steps 1 and 2.
  4. Remove the floppy disks from all floppy disk drives, and restart the computer by pressing CTRL+ALT+DEL.

Assigning Drive Letters for Removable Media

Whenever a removable media device is present, the Windows 98 volume tracker ensures that the correct media is in the device and reports improper media removal or insertion.

The volume tracker keeps track of removable media in two ways:

Windows 98 supports existing removable media with MS-DOS-compatible partitions, which usually are created by using Fdisk utilities from other vendors. You can use Fdisk for Windows 98 to create partitions on removable media that are recognized by the BIOS. Drives that are recognized by the BIOS are also known as INT 13 drives.

Windows 98 does not perform volume tracking based on the volume serial number because all removable media do not have serial numbers or some might have duplicate serial numbers (as is the case with bulk-formatted floppy disks). Therefore, the file system driver must assign unique IDs to removable media the first time there is a request to mount the specific media, unless unique numbers have already been written to the media. These unique numbers identify the media for volume tracking.

You can control the number of drive letters to be reserved during system startup for each removable media drive.

To reserve drive letters for removable media

  1. In the System option in Control Panel, click the Device Manager tab.
  2. In the hardware list, double-click the item that represents the removable device. Removable drives are typically found under CD-ROM or Disk drives.
  3. In the Properties dialog box, click the Settings tab.
  4. In the Reserved Drive Letters area, select a letter in the Start Drive Letter list to define the first drive to be assigned to this device.

    In the End Drive Letter list, select the last drive to be assigned to this device. Click OK.

  5. To close the System Properties dialog box, click OK.
  6. When prompted, restart the computer.

The MaxRemovableDrivePartition entry in the registry allocates the drive letters to be used by partitions on removable media. If this entry is not present in the registry, the number of drive letters to be assigned is based on the number of partitions present on the media when the system starts. If no media are present at startup, Windows 98 reserves one drive letter for each of the removable media.

To support variable-sized disks and partitions, Windows 98 recalculates the disk geometry every time a media change is detected. If you insert media with more partitions than specified by the MaxRemovableDrivePartition entry in the registry, a message warns you that some partitions on the media are not accessible in the current configuration and prompts you to increase the value of MaxRemovableDrivePartition.

Converting an Existing FAT16 Drive to a FAT32 Drive

Use the FAT32 Drive Converter to convert your drive to FAT32.

Drive Converter (FAT32)

Caution

Windows 98 does not include a utility for converting a drive back to FAT16 once you have converted it to FAT32.

Drive Converter (FAT32)

To convert to FAT32 using Drive Converter (FAT32)

Caution

The Drive Converter (FAT32) makes changes to the boot record and file allocation tables of any hard disk that is converted.

  1. Click Start, point to Programs, point to Accessories, and then click System Tools.
  2. Click Drive Converter (FAT32). This launches the Drive Converter (FAT32) Wizard. Follow the directions on the screen.

The Drive Converter (FAT32) named Cvt1.exe, by default is installed in the Windows folder. The Drive Converter (FAT32) program does the following:

  1. Launches the Drive Converter (FAT32).
  2. Scans your system for applications that may be incompatible with FAT32.

    The list of programs that the Drive Converter (FAT32) will search for are kept in the registry at:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control \SessionManager\CheckBadApps400

  3. Warns you that the system will be restarted and prompts you to save your work.
  4. Prompts you to specify which drive to convert; only one drive at a time can be converted.
  5. Prompts you to back up your files.

Managing the Recycle Bin to Free Disk Space

When you delete a file or directory, it is moved to the Recycle Bin, but it still takes up space on the hard disk. Use one or all of the following methods to ensure disk space is not being used by the contents of the Recycle Bin:

You can also configure the Recycle Bin to use only a set amount of space so that you are prompted to empty the bin more often.

To configure the Recycle Bin

  1. Right-click the Recycle Bin icon, and then click Properties.

    Note

    You can configure properties separately for each hard disk drive on the computer by clicking the option named Configure Drives Independently.

  2. If you want deleted items to be removed from the Recycle Bin immediately, make sure Do Not Move Files To The Recycle Bin is checked.
  3. If you want to specify the amount of hard disk space the Recycle Bin can use, drag the slider to the desired percentage.

For more information about the Recycle Bin, see Help.

Using Disk Cleanup

Disk Cleanup presents you with a list of ways that you can get more disk space, including emptying the recycle bin, removing temporary files, and emptying the Internet cache.

Note

This utility also appears when a user is running out of hard disk space. If Windows attempts to allocate space on a hard drive (create a file or resize an existing file) and the free disk space drops below a set threshold, a low disk space notification will appear. This notification prompts the user to run Disk Cleanup. The threshold is 25–65 MB, depending on the volume size. The low disk space warning only appears once during a Windows session. The user will see a second warning only when they completely run out of disk space. The out of disk space warning will always appear when Windows attempts to allocate space on a drive that is completely full.

To start Disk Cleanup

Disk Cleanup automatically runs when it detects a low disk threshold. It will suggest several options to delete, depending on the disk drive, so that you can free up some disk space. Disk Cleanup will only run once if it detects a low disk threshold until you try to copy a file to the drive or until you restart your computer.

Using Microsoft Backup

Microsoft Backup, a Windows 98 utility for backing up data, provides options for backing up files to removable disks or tapes, restoring from disks or tapes, and comparing backup file sets to files on the hard disk. Microsoft Backup supports the QIC 113 backup tape specification, which includes support for long file names.

For users familiar with the Windows 3.1 Backup utility, the following list describes important differences in Backup under Windows 95 and Windows 98:

For more information about Microsoft Backup, see Chapter 27, "General Troubleshooting."

To make a Startup Disk

Defragmenting Disks

Over time, as programs read from and write to a hard disk, information stored on the disk can become fragmented—that is, files are stored in noncontiguous clusters. Fragmentation does not affect the validity of the information—the files are still complete when they are opened. But it takes much longer for the computer to read and write fragmented files than it does for unfragmented files.

To improve file access time, you can defragment uncompressed drives and compressed DriveSpace or DoubleSpace drives.

Disk Defragmenter has been enhanced to make programs start much faster. When a program starts (loads), it typically reads an EXE file and various DLL files. However, only portions of the EXE and DLL files are read during start. Furthermore, these reads are not sequential and jump back and forth, both within the same file and between files. Every one of these non sequential accesses translate to a disk seek and a performance penalty. Windows 98 Disk Defragmenter tries to place disk clusters in the order they are read, so these seeks are eliminated or greatly reduced, shortening the time needed to start the program.

To record the disk access patterns of programs during their startup, Windows 98 uses a process called Task Monitor. Task Monitor automatically monitors programs you use and record their disk access patterns during their start. These records, called log files, are stored in the \Windows\Applog directory. In addition to access patterns, Task Monitor also records the number of times you use programs. This usage information enables Disk Defragmenter to favor more frequently used programs in optimizing the disk.

The format of the log file name is application.lgn, where application is the name of the application and n is the drive letter where the application files reside. Table 10.4 outlines some log file name formats.

Table 10.4 Log file name formats

File name Description
Notepad.lgc Log file for Notepad, which is located on drive C
Word.lgd Log file for Word, which is located on drive D
Excel.lgd Log file for Microsoft Excel, which is located on drive D
MSinfo.lgc Log file for MSInfo, which is located on drive C

When Disk Defragmenter (Defrag.exe) runs, it calls Cvtaplog.exe to gather information from all the lgn files and build an Applog.dtn file, one for each drive. The Applog.dtn file contains information about cluster placement optimization instructions which are read by Defrag.exe. Defrag.exe uses this information to place disk clusters in the optimized order so that programs start up faster.

Important

Disk Defragmenter does not work with most third party compression utilities, nor will it work on read-only drives, locked drives, network drives, FFS drives, or drives created with ASSIGN, SUBST, or JOIN.

To defragment a disk drive

  1. Click Start, point to Programs, point to Accessories, point to System Tools, and then click Disk Defragmenter.

    – Or –

    Click the Start button, click Run, and then type defrag.

  2. In the Select Drive dialog box, specify the drive that requires defragmentation.
  3. Click the Settings button if you want to do any of the following:
  4. Click OK.

Tip

Showing details while the Disk Defragmenter is running causes it to take longer than it does when showing only summary information or running it minimized. For quickest performance, minimize the Disk Defragmenter window while the utility is running.

To see defragmentation information for a particular drive

  1. In My Computer, right-click the drive’s icon.
  2. Click Properties, and then click the Tools tab.

    The Tools Properties dialog box shows the number of days since the last complete defragmentation process ran on the drive. You can also run Disk Defragmenter from this dialog box.

Performance with Other Programs

Excessive disk activity by other programs can interfere with defragmentation, and may cause Disk Defragmenter to restart frequently and take an inordinate amount of time to complete. If this happens, close all programs while Disk Defragmenter is running.

Some screen savers cause excessive disk activity. To prevent screen savers from running during defragmentation, either change the screen saver to None from Display in the Control Panel or modify the registry.

Caution

Only advanced users and system administrators should use Registry Editor to modify the registry. If you use Registry Editor to change values, you will not be warned if any entry is incorrect. Editing the registry directly by using registry Editor can cause errors in loading hardware and software, and can prevent users from being able to start the computer.

Before modifying registry values, always back up your system. See "Backing up and Recovering the Registry" in Chapter 31, "Windows 98 Registry".

To prevent screen savers from running during defragmentation

  1. Open Registry Editor.
  2. Create a string named DisableScreenSaver under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Defrag\Settings.
  3. Set its value to yes.

Some programs are always running in the background of Windows 98 and are difficult to close. If you closed all programs and Disk Defragmenter still restarts frequently and cannot complete, you may want to run Disk Defragmenter before Windows displays the logon prompt (at this point, most programs have not been started).

To run Disk Defragmenter before Windows displays the logon prompt

  1. Open Registry Editor.
  2. Go to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce, and create a new string value named Defrag.
  3. Set the value to defrag.exe

    – Or –

    Set the value to defrag with your choice of command line switches. See "Command Line Switches for Disk Utilities" later in this chapter.

  4. Close Registry Editor and restart your computer.

Disk Defragmenter runs before the Windows logon prompt with minimal interruptions. Putting this command line under the RunServiceOnce key takes effect only once. Subsequent computer restarts will not cause Disk Defragmenter to run again.

Fine-Tuning Program Start

The Cvtaplog.exe file is called by Defrag.exe to determine the program optimization order and to build the optimization cluster list. The optimization order is recorded in Optlog.txt, which is located in the \Windows\Applog (hidden) folder on your system. The log file lists programs that were used and not optimized, and explains why (see "Flags for Ineligible Programs"). It also records values of various control parameters.

The following is a sample Optlog.txt file:

Program Launch Optimization Log - Created Sat Jan 17 01:00:02 1998

Programs Eligible for Optimization:
Ord Flag ProgName  Uses   LastExecDate Program Path
1        WINWORD   85     1998.01.15   C:\PROGRAM FILES\MSOFFICE\OFFICE\WINWORD.EXE
2        RUNDLL32  82     1998.01.16   C:\WINDOWS\RUNDLL32.EXE
3        MSPAINT   54     1997.11.22   C:\PROGRAM FILES\ACCESSORIES\MSPAINT.EXE
4        NSPLAYER  47     1998.01.12   C:\PROGRAM FILES\NETSHOW\PLAYER\NSPLAYER.EXE
5        EXCEL     41     1998.01.16   C:\PROGRAM FILES\MSOFFICE\OFFICE\EXCEL.EXE
6        BSHELF98  30     1998.01.16   C:\PROGRAM FILES\REFERENCE\BOOKSHELF 98\BSHELF98.EXE


Programs Ineligible for Optimization:
Ord Flag ProgName Uses   LastExecDate Program Path
7   S    NOTEPAD  54     1998.01.07   C:\WINDOWS\NOTEPAD.EXE
8   U    TAX      10     1997.04.15   C:\TAX96\TAX96.EXE

Control Parameters:
Use app profile     = Yes
Minimum log size    = 1000
Maximum no use days = 90
Maximum apps        = 50

Flags for Ineligible Programs:
S = Log size smaller than <Minimum log size>
U = Program not used for more than <Maximum no use days>
P = No profile for program
E = Associated program no longer exists
D = Log deleted (may be combined with one of the above)

Note that "Programs Eligible for Optimization" are optimized in the order of most used to least used. The program with the highest use is optimized first. A flag (reason) is given for each of the "Programs Ineligible for Optimization."

Control parameters are configurable in the registry.

Caution

Only advanced users and system administrators should use Registry Editor to modify the registry. If you use Registry Editor to change values, you will not be warned if any entry is incorrect. Editing the registry directly by using registry Editor can cause errors in loading hardware and software, and can prevent users from being able to start the computer.

Before modifying registry values, always back up your system. See "Backing up and Recovering the Registry" in Chapter 31, "Windows 98 Registry."

All control parameters are DWORD values under the HKLM\software \Microsoft\Windows\CurrentVersion\Applets\Defrag\AppStartParams key. In the absence of control parameter settings in the registry, the default value for the parameter is used. The default value and the meaning of each parameter is as follows:

Value Name
Type
Default
Meaning
UseProfile
DWORD
1
0 means do not use task monitor’s app profile. When profile is not used, programs are optimized in FindFirst/FindNext order of the Application.lgn files in the \Windows\Applog folder, and the following parameters are ignored.
Value Name
Type
Default
Meaning
MinLogSize
DWORD
1000
Minimum log file size in bytes to qualify for optimization. Programs with log files smaller than this value are not optimized. If UseProfile is 0, this parameter is ignored.
Value Name
Type
Default
Meaning
MaxNoUseDays
DWORD
90
Programs not used for longer this many days do not qualify for optimization. If UseProfile is 0, this parameter is ignored.
Value Name
Type
Default
Meaning
MaxApps
DWORD
50
Maximum number of apps to be optimized. Programs are optimized in descending order of usage counts, up to this max number. If UseProfile is 0, this parameter is ignored.
Value Name
Type
Default
Meaning
ExcludeFiles
SZ
None. Already set up as System.dat\User.dat\System.ini\Win.ini. A list of files excluded from program start optimization. Certain files, such as System.dat, are better organized contiguously than fragmented for program start optimization. File names are separated by a backslash in this string.

Disk Region Optimized for Program Start

If program start optimization is performed, Disk Defragmenter notes in the registry the boundaries of the disk region optimized for program start. This region is the region of the disk used to store the clusters for the program start optimization and may look to other disk optimization programs as being heavily fragmented. Programs can query the registry for the boundaries of this region, and then will leave this region alone.

Under the HKEY_LOCAL_MACHINE\software\Microsoft\Windows \CurrentVersion\Applets\Defrag\AppStartParams key is an entry for each drive optimized for program start. The entry is written when Disk Defragmenter completes defragmenting the drive. The entry name is a single letter specifying the driver letter. Its value is a pair of DWORDs specifying the first cluster and the last cluster of the region respectively. For example, the following entry as displayed by Registry Editor says on drive C, the disk region optimized for program start is clusters 0x00000003 to 0x000033F5:

C    03 00 00 00 F5 33 00 00

Using ScanDisk

ScanDisk is a full-featured disk analysis and repair program. ScanDisk has been upgraded to recognize and fix issues with FAT32 drives. You can use ScanDisk on both uncompressed and compressed drives. ScanDisk will check compressed drives created with third-party compression software, but will do so as if they are uncompressed. ScanDisk cannot check the compression integrity of third party compression programs. ScanDisk can, however, provide a detailed analysis of compression structures on DoubleSpace and DriveSpace drives.

Windows 98 provides two versions of ScanDisk: a graphical Windows-based version (Scandskw.exe) that you can run from the Start menu or from Windows Explorer, and an MS-DOS-based version (Scandisk.exe) that is contained in the \Windows\Command folder. Running Scandisk.exe while in Windows will invoke Scandskw.exe.

Note

ScanDisk cannot find or fix errors on CD-ROM drives, network drives, or drives created by using assign, subst, join, or interlnk.

ScanDisk checks and fixes problems in the following areas on hard disk drives, floppy disk drives, RAM drives, and memory cards:

Tip

You can add ScanDisk to the Windows Maintenance Wizard List. For more information, see Chapter 27, "General Troubleshooting."

You can place ScanDisk in Task Scheduler so that it is run at regularly scheduled times. You can also run ScanDisk from the Tools Properties dialog box for a drive. To do this, right-click that drive’s icon, click Properties, and then click the Tools tab. Click the Check Now button to begin running ScanDisk.

ScanDisk can check and repair mounted DriveSpace 3 or DoubleSpace drives. You can run ScanDisk from the command prompt to check and repair unmounted compressed volume files (CVFs). When you run ScanDisk to check a compressed drive, by default, ScanDisk checks the host (physical) drive first. In general, you should allow it to do so because an error on the host drive could cause problems with the compressed drive.

To run ScanDisk

  1. Click Start, click Run, and type scandisk.
  2. Click the drive you want to analyze or repair.
  3. In the Type Of Test area, click Standard or Thorough.
  4. If you do not want ScanDisk to prompt you before repairing each error it finds, make sure Automatically Fix Errors is checked.
  5. If you are running a thorough test, click the Options button to specify which areas of the disk to check or which type of processing to perform. Select the options you want to use, and then click OK.
  6. Click Advanced to set advanced options as needed, and then click OK. For more information about each option, see Help.
  7. To begin checking the disk, click Start.

To run ScanDisk on unmounted CVFs

Using Disk Compression

A compressed drive is not a real disk drive, although to most programs it appears to be. Instead, a compressed drive exists on the hard disk as a compressed volume file (CVF). A CVF is a file with read-only, hidden, and system attributes, and that contains a compressed drive. Each CVF is located on an uncompressed drive, which is referred to as the CVF’s host drive. A CVF is stored in the root directory of its host drive and has a file name, such as Drvspace.000 or Dblspace.000.

Note

DriveSpace 3 included with Windows 98 has been modified to recognize FAT32 drives, but it will not compress them.

CVFs can store more data than the space they use on their host drives; for example, a typical CVF might use 100 MB of space on its host drive but contain 200 MB of compressed data. DriveSpace 3 assigns a drive letter to the compressed volume so that you can use it as a disk drive and can access the files it contains. The host drive will have a separate drive letter (although it might be hidden).

Caution

Do not tamper with a CVF. If you do, you might lose all the files on the compressed drive.

With Windows 98 DriveSpace 3, you can compress drives and manage drives compressed with DriveSpace 3 or DoubleSpace. (You can even have drives of both compression types on your computer.)

When Windows 98 is installed, Setup replaces the Dblspace.bin or Drvspace.bin file in the root directory of the boot drive with versions that can be unloaded during the system startup process and replaced with Drvspacx.vxd.

Using DriveSpace 3 for Disk Compression

Using DriveSpace 3, you can compress and uncompress data on floppy disks, removable media, or hard disk drives. DriveSpace 3 frees space on disks by compressing the data or space the disks contain. The first time you use DriveSpace to compress data or space on a drive, the disk will have 50 to 100 percent more free space than it did before.

DriveSpace 3 contains these enhancements over Windows 95 DriveSpace:

You can use a compressed drive just as you did before compressing it. In addition, DriveSpace 3 creates a new uncompressed drive, called the host drive, where it stores the CVF. If the host drive contains any free space in addition to the CVF, you can also use it to store files that must remain uncompressed.

As with earlier CVF versions, a DriveSpace 3 CVF has a name in the form: Drvspace.nnn, where nnn is the CVF sequence number in the range 000 through 254.

Windows 98 also places drive-specific compression information (and the tools to manipulate it) where you would expect to find it: in the drive’s properties. (System-wide compression settings and functions are still available in the DriveSpace 3 programs.) To present this information, a Compression tab is added to the Property dialog boxes for all local hard and floppy disk drives, except compressed drives created by software from other vendors. Uncompressed drives that are hosts for one or more compressed volume files also have a Compression tab added to their properties. For hidden host drives, you must use the DriveSpace 3 program to view information about the drive.

Using Compression Agent

Compression Agent gives you the following compression choices:

You can start Compression Agent manually or have Task Scheduler start it automatically. You can also use the Maintenance Wizard to schedule Compression Agent. Compression Agent uses the Windows 98 Last Access Date to determine which files have not been used within a defined time, but does not modify the Last Access Date for any files.

How Compression Works with DriveSpace 3

DriveSpace 3 compresses data in 32 KB blocks (instead of 8 KB blocks used for Dblspace or Drvspace), and supports two levels of compression: HiPack and UltraPack.

HiPack compression uses the same encoding format as standard compression.

UltraPack format offers better compression than standard or HiPack compression, but files compressed in UltraPack format are slower to decompress. UltraPack compression is available by running Compression Agent. You cannot configure DriveSpace to save files in UltraPack format automatically. And, because UltraPack encoding format uses DriveSpace 3 CVFs, Drvspace.bin and Drvspacx.vxd must be installed to read the CVFs.


DriveSpace 3 for Windows 98 can create a compressed drive of up to 2 GB. You can also create a new compressed drive from the free space on an uncompressed drive that is part of a unremovable FAT16 hard disk. After compression, you will notice that the uncompressed drive contains less free space than it did before. This space is now being used by the new compressed drive, which is stored in a hidden file with a file name, such as Drvspace.001.

Tip

The registry can reside on compressed drives that were created by "preload" compression software such as Stacker 4.0, DoubleSpace, DriveSpace 3, and AddStor SuperStor/DS.

A swap file can reside on a compressed drive if a protected-mode driver (that is, Drvspace.vxd) controls the compressed drive. DriveSpace 3 marks the virtual memory as uncompressible.

If your swap file is on a compressed drive created by a real-mode compression drive, you should move the swap file to another drive, such as the host drive.

For more information about changing the location of your swap file, see Chapter 26, "Performance Tuning."

Example

Suppose you have a 200 MB hard disk with 100 MB of data on it. Uncompressed, this disk has 100 MB of free space. You can increase the amount of disk space in either of two ways:

Use DriveSpace 3 to compress both the data and the free space on the disk.

Because DriveSpace 3 reports file sizes of compressed files as though they were uncompressed, the disk is now a 400 MB disk with 100 MB of data and 300 MB of free space.

Create a new compressed drive from free space on the hard disk.

DriveSpace 3 will report that you have two drives, one with 200 MB of free space and the other with 100 MB of data and no free space. (You can also create an empty drive using only part of the available free space.)

The compression policies specified in the Compression Agent Settings dialog box control the policy used to compress files. However, you can also force or prevent a particular compression type on a particular file, or set of files, or folders, based on the following exceptions to the default compression policy:

The following shows the Compression Agent command line syntax:

cmpagent [drive: | /all] [/noprompt]

The following list describes the parameters for this command:

Parameter Description
drive: Specifies drive to be recompressed.
/all Specifies all local, fixed drives that are compressed.
/noprompt Runs without waiting for the user to click Start, and without displaying a summary at the end. Errors are displayed. This switch can be shortened as /nop.

Fine-Tuning Compression

You typically use the default values for compression, which specify using standard or no compression when saving files. Set Task Scheduler to run Compression Agent when the computer is not busy. Compress seldom-used files into UltraPack format and all other files into HiPack format. While deciding which methods and formats to use, consider whether you want maximum disk space or maximum system performance.

Maximizing hard disk space on a computer

Specify that UltraPack format be used to compress most files. (UltraPack format is recommended for Pentium-based computers.) Specify that files be compressed as they are saved. If your computer is fast, specify that HiPack format be used.

Maximizing system performance

Files compressed in UltraPack format are slower to decompress—if you access a document or run an application that is compressed in UltraPack format, you must wait before you can begin to work again. For slower computers that require maximum performance, use Task Scheduler and Compression Agent to specify that all compression is done while the computer is idle instead of compressing files as they are saved.

Suggestions for defining maximum performance: Use DriveSpace 3 to specify that compression occurs only offline (when files are not being saved) or only when disk space is low. Specify a high threshold for UltraPack (for example, compress files not accessed for 30 days or more). Set exceptions for files that should not be compressed in UltraPack format (for example, do not compress executable files).


Note

If you choose not to compress files as they are saved, or to compress files only when disk space is low (using Depends On Free Space), the system reports free space as though files will not be compressed. As a result, the computer appears to have less free space than when files are compressed as they are saved. However, if you use Compression Agent regularly, you will be able to store the same amount of data in this space.

Although the option to compress a drive provides more usable space, the process takes longer than creating a new compressed drive because DriveSpace 3 has to compress the data on the drive.

Important

Before you use DriveSpace 3 to compress a drive, you should back up the files the drive contains.

To compress a drive

  1. Click Start, click Run, and then type drvspace.
  2. In DriveSpace 3, click the drive you want to compress.

  3. Click the Drive menu, and then click Compress.

    The Compress a Drive dialog box appears, listing the drive it is about to compress.

  4. If you want to specify the drive letter or free space to leave available for the host drive, and whether the host will be hidden, click Options.

    Make modifications in the Compression Options dialog box as needed, and then click OK.

    Note

    By default, DriveSpace 3 hides the host drive if the amount of free space is 2 MB or less.

  5. Click Start to continue.
  6. DriveSpace 3 prompts you to create a Startup Disk. Click Yes or No.
  7. DriveSpace 3 prompts you to back up your files. If you want to back them up at this time, click Back Up Files.
  8. To start compression, click Compress Now.

DriveSpace 3 checks the drive for disk errors, and then it compresses the drive. This process can take from several minutes to several hours, depending on the speed of the hard disk and processor and on the amount of data the hard disk contains. Because DriveSpace 3 checks and rechecks the validity of the data as it compresses files, the process is very safe. In fact, if the compression process is interrupted accidentally (for example, by a power outage), DriveSpace 3 recovers and continues without losing any data.

If any files are open on the drive, DriveSpace 3 will prompt you to close them. For drives that always have files opened (such as the drive containing Windows 98 or the drive containing a swap file), DriveSpace 3 will restart the computer and use a limited version of Windows in place of Windows 98 while it compresses the drive. To do this, a directory named Failsave.drv is created that contains the system files required for this operation. After compression, your computer will restart again, this time with Windows 98. When the compression is completed, DriveSpace 3 shows how much free space is available on the drive.

To create a new compressed drive

  1. In DriveSpace 3, click the drive that has free space you want to use to create the new compressed drive.
  2. Click the Advanced menu, and then click Create Empty.
  3. If you want to leave some free space on the original drive, decrease the value in the Using box.
  4. To start compression, click Start.

To uncompress a drive

  1. In DriveSpace 3, click a drive to uncompress.
  2. Click the Drive menu, and then click Uncompress.
  3. To start uncompressing, click Start.

    If there is not enough space on the host drive to contain the uncompressed files, DriveSpace 3 displays a warning. Otherwise, DriveSpace 3 prompts you to back up files and shows the status of the process as it progresses.

Note

If you try to change the size of a drive that was mounted with a real-mode DriveSpace 3 or DoubleSpace driver, you will be prompted to restart the computer so that the drive can be remounted under Windows 98. This will also occur for other operations using the real-mode DriveSpace 3 driver.

Fine-tuning Storage Space

On an uncompressed drive, free space indicates how much additional data you can store on that drive. For example, if a drive has 2 MB of free space, you can expect to fit 2 MB of data on it. However, the free space on a compressed drive is only an estimate of how much data you can fit on that drive.

When you store a file on a compressed drive, DriveSpace 3 compresses the file so that it takes up as little space as possible. Some files can be compressed more than others; for example, a text file can be compressed much more than a program file. DriveSpace 3 cannot detect the compressibility of files you have not stored yet, so it only estimates a compressed drive’s free space.

DriveSpace 3 estimates a drive’s free space by using the estimated compression ratio, which you can set to specify the compressibility of the files you plan to store. For example, if the estimated compression ratio is 3-to-1, DriveSpace 3 calculates the drive’s free space based on the assumption that each file to be stored can be compressed to one-third its original size.

Usually, the best compression estimate to use is the actual compression ratio for the files already stored on the drive. Sometimes you might want to reset the estimated compression ratio of each drive to match that drive’s actual compression ratio.

You might want to change the estimated compression ratio if it differs greatly from the actual compressibility of the files to be stored. For example, if you plan to store extremely compressible files, such as bitmap files, you might want to specify a higher estimated compression ratio.

Changing a drive’s estimated compression ratio does not affect how much DriveSpace 3 actually compresses the files on that drive; it changes only the way DriveSpace 3 estimates the free space on the compressed drive.

To change the estimated compression ratio

  1. In DriveSpace 3, click the compressed drive you want to change.
  2. Click the Advanced menu, and then click Change Ratio.
  3. In the Compression Ratios area, type a new ratio box or drag the slider to the desired ratio. Click OK.

You can also adjust the amount of free space for a compressed drive or its host drive. This is equivalent to changing the size of the compressed drive and its CVF. When you increase free space on a compressed drive, you decrease it on its host, and vice versa.

To change the amount of free space on a drive

  1. In DriveSpace 3, click the drive on which you want to change the amount of free space.
  2. Click the Drive menu, and then click Adjust Free Space.
  3. In the Adjust Free Space dialog box, type a new value or use the slider to adjust the amount of free space available on the compressed and host drives. Click OK.

Using Task Scheduler

Task Scheduler is an application for scheduling programs to run at specific times. Programs can be scheduled to run based on several criteria, such as time and date, or a range of times, or whether the computer is idle or is not running on batteries. Task Scheduler supports options for specifying when Compression Agent, Disk Defragmenter, ScanDisk, and other programs will run.

Example

You might use Task Scheduler to do the following:

For more information about using Task Scheduler, see Chapter 27, "General Troubleshooting."