Disks and File Systems: The Basics
|Archived content. No warranty is made as to technical accuracy. Content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.|
This chapter introduces Windows 95 disk and file system support. It describes how to use Windows 95 utilities to partition and format disks, and how to use DriveSpace, Disk Defragmenter, and ScanDisk to manage disks and data. This chapter also discusses how to manage long filenames.
The new 32-bit, protected-mode file system support in Windows 95 allows optimal access to hard disks, CD-ROM drives, and network resources. The new file system support means faster, better performance for all file I/O operations than what was available under earlier version of MS-DOS or Windows.
Because of enhancements to the file systems, there is no longer an eight-character limit on filenames that was imposed by the FAT file system under MS-DOS. You can use long filenames and directory names in Windows 95 and in any applications that support long filenames.
The enhanced FAT file system in Windows 95 also permits exclusive access to a disk device for file system utilities. File system utilities, such as ScanDisk, require exclusive access to the file system to ensure data integrity in a multitasking environment. Otherwise, if a file on the disk were to be saved while the utility was writing information to the disk at the same time, data corruption could occur.
Exclusive disk access means you can now run disk management and optimization utilities without quitting Windows. You can even complete tasks such as disk defragmentation without stopping work in other applications. The exclusive access support is used by the disk utilities provided with Windows 95 and can be used in Windows-based disk management utilities from any vendors that take advantage of the related API in their utilities.
The disk utilities provided with Windows 95 include the following.
Fdisk and Format.
These utilities, which you can use to partition and format disks, behave exactly as their counterparts in MS-DOS versions 6.x. You can use a graphical form of Format in Windows Explorer.
This utility (also called a disk optimizer) is used to defragment information on a disk. Using Disk Defragmenter regularly helps to minimize the area on the disk in which Windows 95 needs to look to load information.
The built-in support for DriveSpace disk compression is completely compatible with DoubleSpace and DriveSpace disk compression provided with MS-DOS 6.x. Compression is performed by using a 32-bit virtual device driver that delivers improved performance over previously available real-mode compression drivers, and frees conventional memory for use by MS-DOS–based applications. Existing users of DoubleSpace and DriveSpace do not need to change the compressed volume file (.CVF) that they are using currently, and they do not need to take any special actions when installing Windows 95.
This graphical disk analysis and repair tool runs under Windows 95 to help users check the integrity of disks and to remedy the problems it detects. Users can choose to scan the computer's files and folders or the disk surface for errors.
On This Page
Disks and File Systems: The Issues
Partitioning Hard Disks
Disk Management Overview
Managing the Recycle Bin to Free Disk Space
Using Microsoft Backup
Using Disk Compression with Windows 95
Microsoft Plus! Utilities for Disk Management
File Systems Overview
Using Long Filenames
Technical Notes on Disk Device Support
Troubleshooting File and Disk Problems
Disks and File Systems: The Issues
You should use disk and file management utilities designed specifically for Windows 95. This way, you can avoid losing long filenames and data. In some cases, you can use the LFNBK utility to remove and later restore long filenames on a disk so that you can run a utility that is not compatible with long filenames (as described in "Using the LFNBK Utility for Temporary Compatibility" later in this chapter).
Caution: Stacker® 4.0 from STAC Electronics and similar disk optimization utilities, including DriveSpace 6.x for MS-DOS, are not compatible with long filenames. If you already have such compression software on the computer, you should not experience problems. However, if you install such software under Windows 95, the long filenames already on the computer will be destroyed, and other critical errors could occur.
Contact the software manufacturer for information about Windows 95-compatible upgrades for your disk utilities.
You can ensure disk integrity by putting ScanDisk in the STARTUP directory so that it runs each time the operating system starts. Also, back up critical files once a week to ensure data security, and run Disk Defragmenter at regular intervals to optimize disk I/O performance.
Windows 95 automatically provides long filename support. However, Windows 95 file systems and OS/2 HPFS each have slightly different ways of defining 8.3 filename aliases for long filenames. If you are using a mixed network environment, be sure to understand the differences (as described in this chapter). Then to help minimize any naming conflicts, define and publish a file naming policy for users who share files. Tips for file naming polices are provided later in this chapter.
Partitioning 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; there is no method for automatically combining partitions.
Caution: Do not repartition the hard disk by using Fdisk if the computer has certain types of partitions, such as those created by Disk Manager, Storage Dimensions SpeedStor®, Priam®, or Everex™ partitioning programs, which replace the BIOS in interactions between MS-DOS and the hard-disk controller. Instead, use the same disk-partitioning program that was used to partition the disk. For example, if you use SpeedStor on a computer that has more than 1024 cylinders, do not carry out the following procedures.
To determine whether the computer has a partition created by using one of these disk-partitioning programs, search for the following files: DMDRVR.BIN (Disk Manager), SSTOR.SYS (SpeedStor), HARDRIVE.SYS (Priam), and EVDISK.SYS (Everex). Usually, you will find device= entries for these files in CONFIG.SYS. If you need help repartitioning the hard disk or are unsure whether the BIOS is being replaced, contact the manufacturer of the original disk-partitioning program.
To configure a hard disk, you must perform the following tasks:
Create a startup disk by using the Add/Remove Programs option in Control Panel
Back up the files on the hard disk
Repartition the hard disk by using Fdisk
Format the hard disk
Restore the backed-up files
The steps for partitioning and formatting are described in the following section.
If you want to repartition 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 repartition a hard disk so that it has more than one logical drive. Notice that, although Windows 95 replaces MS-DOS, the partitions that Fdisk creates are still called DOS partitions.
Although Fdisk is an MS-DOS – based application in Windows 95, however, it can run in a window (a VM).
The Windows 95 emergency startup disk contains a copy of Fdisk, which you can use if a hard disk becomes unreadable.
To configure a hard disk by using Fdisk, complete the following tasks:
Delete DOS partitions, logical drives, the extended DOS partition, and the primary DOS partition
Create a new primary DOS partition
Create an extended partition and logical drives, if you want any
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 a partition before using Fdisk.
To start Fdisk
At the command prompt, type fdisk
– Or –
If you are starting Fdisk from a startup disk, make sure the disk is in drive A, and then restart the computer by pressing CTRL+ALT+DEL. At the command prompt on the A drive, type fdisk
When you run Fdisk, the Fdisk Options screen appears, in which you can choose to do the following:
Create a partition or logical drive
Set the active partition
Delete a partition or logical drive
Display partition information
If the computer has two or more hard disks, Fdisk displays a fifth option on the Fdisk Options screen named Change Current Fixed Disk Drive. You can switch to another disk drive by choosing this option. Changing the current hard disk drive while using Fdisk doesn't change the current drive when you return to the command prompt.
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 might not display information about all the drives used by a disk-compression program from another vendor.
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:
Any non-DOS partitions
Any logical drives in the extended DOS partition
Any extended DOS partition
The existing primary DOS partition
Important: Back up your files before deleting partitions. If the computer has a non-DOS partition on a hard disk, copy the data files from the partition to floppy disks or a network drive to back them up. 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
In the Fdisk Options screen, press 3, and then press ENTER. The Delete DOS Partition Or Logical DOS Drive screen appears.
Press the number as shown on the screen for the kind of partition you want to delete, and then press ENTER.
Follow the directions on the screen, and repeat the steps for deleting any additional logical drives or partitions.
If Fdisk cannot delete a non-DOS partition, quit Fdisk, delete the non-DOS partition by using the software used to create it, and then restart Fdisk.
Creating a Primary MS-DOS Partition
After you have deleted a primary DOS partition, you can create a new primary DOS partition.
To create a primary DOS partition
In the Fdisk Options screen, press 1, and then press ENTER. The Create DOS Partition Or Logical DOS Drive screen appears.
Press 1, and then press ENTER. The Create Primary DOS Partition screen appears.
If you want the partition to be the maximum size, press ENTER. Then insert a startup disk in drive A, and press any key.
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.
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.
Press ESC to return to the Fdisk Options screen, and follow the instructions on-screen to make the primary DOS partition active. Then return to the Fdisk Options screen.
If you have not allocated all the space on a hard disk to the primary DOS partition, you can create an extended DOS partition and logical drives by choosing the Create Extended DOS Partition option in Fdisk. You specify the partition size you want as a percentage or number of megabytes of disk space.
If you don't want to create an extended partition, press ESC to quit Fdisk. Then insert a startup disk in drive A, and press any key to continue.
Formatting a Hard Disk
You cannot format a hard disk by using Windows 95 Setup. The hard disk must be formatted before you can run Windows 95 Setup. However, if Windows 95 is already installed, you might need to reformat the hard disk, as described in the following procedure.
Note: If the disk was compressed by using DriveSpace, you must use the Format option in DriveSpace to format the compressed drive.
To format a hard disk drive
In Windows Explorer, right-click the drive icon for that disk, and then click Format.
You cannot use this method on a hard disk containing open files, including the drive where Windows 95 resides.
To format a hard disk by using the Windows 95 startup disk
Make sure a startup disk is in drive A. Then, at the command prompt, type the following:
format drive_letter :
For drive_letter, 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.
When formatting is complete, type a volume label (if you want one), and then press ENTER.
If you want to format other drives, repeat steps 1 and 2.
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 95 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:
On non – write-protected floppy disks, the volume tracker writes a unique ID in the disk's FAT header. This ID is different from the volume serial number
On write-protected floppy disks, the volume tracker caches each disk's label, serial number, and BIOS parameter block
Windows 95 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 95 to create partitions on INT 13-based removable media, as described earlier in this chapter.
Windows 95 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 serial numbers 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.
Note: For volume tracking with NEC® floppy-disk change detection, if the system detects a change line on a volume, the change line is used for subsequent I/O requests to the media.
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
In the System option in Control Panel, click the Device Manager tab.
In the hardware list, double-click the item that represents the removable device.
In the Properties dialog box, click the Settings tab.
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
To close the System properties dialog box, click OK.
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 95 reserves one drive letter for each of the removable media.
To support variable-sized disks and partitions, Windows 95 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.
Disk Management Overview
Windows 95 includes several tools 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. To determine which tasks are necessary to manage your computer, consider the following.
To ensure that
Files aren't lost if the hard disk fails
Run Microsoft Backup or a network backup agent. For information, see Chapter 16, "Remote Administration."
The computer can access files quickly and efficiently
Defragment the hard disk. For information, see "Defragmenting Disks" later in this chapter.
Lost clusters don't take up space on a disk, or the hard disk is not damaged
Run ScanDisk. For information, see "Using ScanDisk" later in this chapter.
Space is available on the hard disk
Use various tips for freeing disk space, and use disk compression. For information, see "Managing the Recycle Bin to Free Disk Space" later in this chapter and "Using Disk Compression with Windows 95" later in this chapter.
The routine for managing a computer's hard disks might include automatically running ScanDisk when starting the computer to check the integrity of the hard disk, backing up files once a week, and occasionally using the Disk Defragmenter to defragment the hard disk. No matter what your computer management plan, carry it out at regular intervals.
You can also use a scheduling utility such as System Agent in Microsoft Plus! for automatic disk maintenance. For information, see "Microsoft Plus! Utilities for Disk Management" later in this chapter.
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.
About Volume Locking for Disk Utilities
Windows 95 provides volume-locking APIs that applications such as disk utilities can use to control direct disk access when the computer uses the Windows 95 32-bit file system. (In Windows for Workgroups 3.11, VFAT generated an error whenever a disk utility tried to access the drive in protected mode.)
Disk utilities usually make absolute INT 25 and INT 26 disk calls, which do not require file system drivers. Instead of calling INT 21 and INT 13 to access the disk, the application calls INT 25 for reads and INT 26 for writes.
When an application is going to change the disk structure (such as a disk utility preparing to defragment the disk), it should first use the volume locking APIs to lock that volume or drive, so that no other application can write to that volume and interfere with its operations. When the application has completed its work, it must unlock the volume before the system can resume normal operation.
If a utility does not use volume locking before it attempts to read from or write to the disk, Windows 95 returns an error and causes it to fail. All utilities included with Windows 95, such as the Disk Defragmenter and ScanDisk, use volume locking. Such utilities cannot be used with Windows NT because Windows NT does not allow utilities to make direct calls to the hardware.
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. You can use one of the following methods to ensure disk space is not being used by the contents of the Recycle Bin:
Avoid moving items to the Recycle Bin by pressing SHIFT when you use the mouse or keyboard to delete items.
Avoid moving items to the Recycle Bin by specifying that items are removed from the disk immediately when you delete them.
Empty the Recycle Bin regularly.
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
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.
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.
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 online Help.
Using Microsoft Backup
Microsoft Backup, a Windows 95 utility for backing up data, provides options for backing up files to floppy 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 filenames.
For users familiar with the Windows 3.1 Backup utility, the following list describes important differences in Backup under Windows 95:
This version of Microsoft Backup does not support restoring backup sets created by MS-DOS version 6.x backup utilities.
The recommended method for creating a complete backup file set for the computer is the Full System Backup option. This option automatically selects the files required for a system backup
If you decide to modify the default selections (by clearing the check boxes for some folders), be sure that you select at least the Windows directory; otherwise, the Registry will not be backed up.
When using the Backup tab in the Settings Options dialog box, notice that selecting Differential under the Type Of Backup option causes the utility to back up only files that have changed since the last time Backup was run. With this setting, new files will not be added to the file set and deleted files will not be removed.
For information about the Arcada® and Cheyenne® network backup agents, see Chapter 16, "Remote Administration." For information about how to use Backup, see online Help, which includes a list of the tape drives that are supported under Windows 95 and compatible with Windows 95.
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 sectors. Fragmentation doesn't 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.
Important: Disk Defragmenter does not work with compressed drives created with most compression software from other vendors (such as those compressed with SuperStor), read-only drives, locked drives, network drives, FFS drives, or drives created with ASSIGN, SUBST, or JOIN.
To defragment a disk drive
Click the Start button, click Run, and then type defrag
In the Select Drive dialog box, specify the drive that requires defragmentation, and then click OK.
The Disk Defragmenter displays a dialog box telling you whether defragmentation is recommended for this disk or not. If this disk has low fragmentation, the Disk Defragmenter will not recommend defragmentation.
Click the Advanced button if you want to do any of the following:
Specify a defragmentation method (all files and free space, files only, or free space only). Depending on how badly the disk is defragmented, you can reduce the amount of time required to defragment a disk by choosing to defragment only files or free space.
Specify whether the drive should be checked for errors.
You can check the option to save these optimization preferences for use each time you run Disk Defragmenter.
In the Disk Defragmenter dialog box, click Start to begin defragmenting the drive.
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
In My Computer, right-click the drive's icon, and then click Properties.
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.
You can also use the defrag command with switches in a batch file. For more information about this command, see Appendix A, "Command-Line Commands Summary."
ScanDisk is a full-featured disk analysis and repair program. ScanDisk runs automatically when you start Windows 95 Setup. After Windows 95 is installed, you can use ScanDisk on both uncompressed and compressed drives. ScanDisk checks compressed drives created with compression software from other vendors, but it checks these drives as if they are uncompressed. ScanDisk, however, can provide a detailed analysis of compression structures on DoubleSpace and DriveSpace drives.
Note: Windows 95 provides two versions of ScanDisk: a new graphical Windows-based version that you can run from the Start menu or from Windows Explorer, and an MS-DOS – based version that is contained on the Windows 95 startup disk. For information about running ScanDisk from the command line or in batch files, see Appendix A, "Command-Line Commands Summary."
ScanDisk checks and fixes problems in the following areas on hard disk drives, floppy disk drives, RAM drives, and memory cards:
File allocation table (FAT)
File system structure (lost clusters, cross-linked files)
Directory tree structure
Physical surface of the drive (bad sectors)
DriveSpace or DoubleSpace volume header, volume file structure, compression structure, and volume signatures
Note: ScanDisk cannot find or fix errors on CD-ROM drives, network drives, or drives created by using assign, subst, join, or interlnk.
ScanDisk can check and repair mounted DriveSpace 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
Click the Start button, click Run, and type scandisk
Note: See the following procedure to run ScanDisk on unmounted CVFs.
Click the drive you want to analyze or repair.
In the Type Of Test area, click Standard or Thorough.
Standard checks the files and folders on the selected drive for errors.
Thorough checks files and folders for errors, but it also checks the physical integrity of the disk's surface.
If you do not want ScanDisk to prompt you before repairing each error it finds, make sure Automatically Fix Errors is checked.
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.
Click the Advanced button to set advanced options as needed, and then click OK. For information about each option, see online Help.
To begin checking the disk, click the Start button.
To run ScanDisk on unmounted CVFs
Click the Start button, click Run, and then type one of the following commands:
scandisk drvspace. nnn
– Or –
scandisk dblspace. nnn
where nnn is a number. This starts an MS-DOS session and runs ScanDisk on the corresponding DriveSpace or DoubleSpace CVF.
Tips for Running ScanDisk
Consider putting ScanDisk in the STARTUP directory to run it each time you start your computer.
Or, if you have installed Microsoft Plus! for Windows 95, keep ScanDisk in the list of scheduled programs run by System Agent. For more information, see "Microsoft Plus! Utilities for Disk Management" later in this chapter.
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.
You can use the command-line equivalent command, scandskw, in a batch file. For more information about this command, see Appendix A, "Command-Line Commands Summary."
Using Disk Compression with Windows 95
With Windows 95 DriveSpace, you can compress drives and manage drives compressed with DriveSpace or DoubleSpace. (You can even have drives of both compression types on your computer.)
When Windows 95 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 DBLSPACX.VXD.
The version of DriveSpace provided with Windows 95 protects long filenames and includes other changes for compatibility with the VFAT file system.
This section presents an overview of CVFs and host drives, plus information about using DriveSpace for disk compression.
Overview of Compressed Volume Files and Host Drives
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 filename such as DRVSPACE.000 or DBLSPACE.000.
Most 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 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.
This following illustration shows the relationship between a compressed drive and a host drive (drive H), which is uncompressed. The dir /c command has been carried out on compressed drive C. This command lists the files in the current directory and displays the compression ratio of each file. The dir /a command has been carried out on drive H. This command lists the files in the current directory, including any files that have the hidden attribute. Drive H contains several files, including the compressed volume file for drive C, DBLSPACE.000.
In this example, the CVF for drive C uses a substantial amount of space on drive H. However, drive C provides far more storage capacity than the space it uses on drive H.
Using DriveSpace for Disk Compression
Using DriveSpace, you can compress and uncompress data on floppy disks, removable media, or hard disk drives. DriveSpace 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.
You can use a compressed drive just as you did before compressing it. In addition, DriveSpace 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.
Note: The version of DriveSpace included with Windows 95 can create a compressed drive of up to 512 MB. If your disk is very large, you might not be able to compress it as a single volume.
The version of DriveSpace available in Microsoft Plus! for Windows 95 can create a compressed drive of up to 2 GB, as described in "Microsoft Plus! Utilities for Disk Management" later in this chapter.
You can also create a new compressed drive from the free space on an uncompressed drive that is part of a nonremovable hard disk. After compression, you'll 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 filename such as DBLSPACE.001.
Consider this scenario: 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:
You can use DriveSpace to compress both the data and the free space on the disk. Then, because DriveSpace reports file sizes of compressed files as though they were uncompressed, you will see that the disk is now a 400 MB disk with 100 MB of data and 300 MB of free space.
You create a new compressed drive from the hard disk's free space. DriveSpace 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.)
Although the option to compress a drive provides more usable space, the process takes longer than creating a new compressed drive because DriveSpace has to compress the data on the drive.
Tip for Registry and Swap Files on Compressed Drives
The Registry can reside on compressed drives that were created by "preload" compression software such as Stacker 4.0, DoubleSpace, DriveSpace, and AddStor® SuperStor™/DS.
The swap file can reside on a compressed drive if a protected-mode driver (that is, DRVSPACE.VXD) controls the compressed drive. DriveSpace marks the swap file as uncompressible and, to reduce the amount of fragmentation, places the swap file as the last file in the CVF. Placing the file there also allows the swap file to expand.
If you want to change the size of the drive and if DriveSpace or a defragmentation utility detects a swap file at the end of the sector heap, you will be prompted to restart the computer.
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 information about changing the location of your swap file, see Chapter 17, "Performance Tuning."
Important: Before you use DriveSpace to compress a drive, you should back up the files the drive contains.
To compress a drive
Click the Start button, click Run, and type drvspace
In DriveSpace, click the drive you want to compress.
Click the Drive menu, and then click Compress.
The Compress A Drive dialog box appears, listing the drive it is about to compress.
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 the Options button. Make modifications in the Compression Options dialog box as needed, and then click OK.
Note: By default, DriveSpace hides the host drive if the amount of free space is less than 2 MB.
Click Start to continue.
DriveSpace prompts you to back up your files. If you want to back them up at this time, click the Back Up Files button.
To start compression, click the Compress Now button.
DriveSpace 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 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 will recover and continue without losing any data.
If any files are open on the drive, DriveSpace will prompt you to close them. For drives that always have files opened (such as the drive containing Windows 95 or the drive containing a swap file), DriveSpace will restart the computer and use a limited version of Windows in place of Windows 95 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 95. When the compression is completed, DriveSpace shows how much free space is available on the drive.
To create a new compressed drive
In DriveSpace, click the drive that has free space you want to use to create the new compressed drive.
Click the Advanced menu, and then click Create Empty.
If you want to leave some free space on the original drive, decrease the value in the Using box.
To start compression, click the Start button.
To uncompress a drive
In DriveSpace, click a drive to uncompress.
Click the Drive menu, and then click Uncompress.
To start uncompressing, click the Start button.
If there isn't enough space on the host drive to contain the uncompressed files, DriveSpace displays a warning. Otherwise, DriveSpace 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 or DoubleSpace driver, you will be prompted to restart the computer so that the drive can be remounted under Windows 95. This will also occur for other operations using the real-mode DriveSpace driver.
Using DriveSpace with Floppy Disks
You can use DriveSpace to increase the storage capacity of floppy disks. After compressing a floppy disk, you can use it to store data or to transfer data from one computer to another; both computers must be using Windows 95 DriveSpace or MS-DOS 6.x DoubleSpace.
After DriveSpace finishes compressing the floppy disk, the floppy disk contains more free space than it did before. You can use the floppy disk just as you did before compressing it.
Also, the computer has a new drive letter. This new drive letter represents the compressed floppy disk's host drive, which contains the floppy disk's CVF. Although both the new drive letter and the original drive letter refer to the same physical floppy disk drive, you can use only the original to access the disk drive.
In general, you use a compressed removable disk just as you do an uncompressed floppy disk. By default, DriveSpace automatically mounts a compressed floppy disk when you try to use that disk. This makes it possible to use the disk as if it were an uncompressed floppy disk.
To disable automounting
In DriveSpace, click the Advanced menu, and then click Settings.
Make sure the option named Automatically Mount New Compressed Devices is cleared, and then click OK.
Note: Before it is mounted, a compressed floppy disk appears full. If you have disabled automounting, change to the floppy disk drive, and then type dir. The system usually lists only one file: a text file named READTHIS.TXT that briefly explains how to mount the floppy disk. The dir command usually reports that the floppy disk contains no free space because all the space is used by the CVF. The CVF is a file, usually named DBLSPACE.000, with hidden, read-only, and system attributes.
If automounting is disabled, you can still use compressed floppy disks, but you must mount them yourself.
To mount a compressed floppy disk in DriveSpace
Insert the compressed floppy disk in a drive.
In DriveSpace, click the drive you want to mount.
Click the Advanced menu, and then click Mount.
A message appears when the disk has been mounted.
The compressed floppy disk remains mounted and the files on it remain available until you change floppy disks or restart the computer.
Changing Free Space and the Estimated Compression Ratio of a Compressed Drive
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 compresses the file so that it takes up as little space as possible. Some files can be compressed more than others; for example, a bitmap file can be compressed much more than a program file. DriveSpace cannot detect the compressibility of files you haven't stored yet, so it only estimates a compressed drive's free space.
DriveSpace 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 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 actually compresses the files on that drive; it changes only the way DriveSpace estimates the free space on the compressed drive.
To change the estimated compression ratio
In DriveSpace, click the compressed drive you want to change.
Click the Advanced menu, and then click Change Ratio.
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
In DriveSpace, click the drive on which you want to change the amount of free space.
Click the Drive menu, and then click Adjust Free Space.
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.
Tip If the free space is highly fragmented, the usable free space might be less than what DriveSpace estimates. In some cases, you might not be able to store files on that drive, even though there appears to be plenty of space. To avoid this problem, run Disk Defragmenter regularly on compressed drives.
Microsoft Plus! Utilities for Disk Management
Microsoft Plus! for Windows 95 provides the following additional capabilities for managing a computer running Windows 95:
Enhancements to DriveSpace for higher compression ratios, support for creating compressed drives that are 2 GB in size, and compression information as part of drive and folder properties. To achieve greater performance and compression benefits, the Microsoft Plus! compression manager provides a new CVF format (DriveSpace 3).
Compression Agent, a recompression utility that can run when your computer is idle to maximize the compression of files. With Compression Agent, the whole drive or designated files can be compressed when no other work is being done on the computer, rather than compressing files as they are saved during a work session. Compression Agent also allows you to designate different compression methods for different files and offers the UltraPack encoding format, a new method for achieving maximum compression.
System Agent, a general-purpose scheduling program that comes preconfigured to maintain the computer's hard disks by running programs such as ScanDisk or Compression Agent at scheduled times. You can also use System Agent to schedule programs to run at specified intervals.
Microsoft Plus! for Windows 95 also includes features such as font smoothing, animated cursors, a set of themes for personalizing your computer, and more. For information about the dial-up networking server provided with Microsoft Plus!, see Chapter 28, "Dial-Up Networking and Mobile Computing."
Microsoft Plus! for Windows 95 is available as a retail product. Some computer equipment manufacturers might also include these utilities as part of the software provided with the computer. If these utilities were not provided on your computer, contact your software vendor about obtaining this product.
The following sections present some technical details about these additional disk management utilities. For information about installing, configuring, and using the utilities, see the Microsoft Plus! documentation (Introducing Microsoft Plus!) and online Help for each program.
DriveSpace 3 Compression: An Overview
The new compression manager provided with Microsoft Plus! contains several enhancements over Windows 95 DriveSpace. These enhancements include the following:
Enhanced compression with support for compressed drives up to 2 GB (earlier versions support volumes of up to 512 MB), using a 32K cluster size (earlier versions use 8K clusters)
Support for storing compressed data for a cluster in multiple fragments when there are not enough continuous sectors on the disk to store the entire cluster
Compression is up to 20 percent faster than standard Windows 95 compression on Pentium™-based computers. Other x86-based computers should also run faster with DriveSpace 3 when the compression is configured for best performance.
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.
DriveSpace and Disk Properties Enhancements
Microsoft Plus! adds the following features to Windows 95 DriveSpace:
New DriveSpace settings for specifying whether to use compression, what type of compression to use, and how to use it.
Support for compression enhancements on existing drives. You can upgrade existing DblSpace or DrvSpace drives to the Microsoft Plus! DriveSpace 3 format.
Microsoft Plus! 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 avaliable in the DriveSpace 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 program to view information about the drive.
How Compression Works with DriveSpace 3
Microsoft Plus! achieves a higher compression ratio by compressing data in 32K blocks (instead of 8K blocks used for DblSpace or DrvSpace), and by supporting two new levels of compression: HiPack and UltraPack.
HiPack compression uses the same encoding format as standard compression, but searches the entire history buffer for matches instead of being limited to a history window.
UltraPack compression uses a different encoding format. UltraPack format offers better compression than standard or HiPack compression, but files compressed in UltraPack format are also slower to decompress. UltraPack compression is available only by running Compression Agent. You cannot configure DriveSpace to save files in UltraPack format automatically.
Because the new UltraPack encoding format used DriveSpace 3 CVFs, the Microsoft Plus! DRVSPACE.BIN and DRVSPACX.VXD must be installed to read these CVFs.
Microsoft Plus! compression can also store more data on the disk than with standard DriveSpace compression because of improved fragmentation handling. With standard DrvSpace or DblSpace CVFs, the data for a cluster must be stored in contiguous sectors. When the volume is highly fragmented, it is possible to have many free sectors but not enough contiguous sectors to store a cluster (which can require up to 16 sectors on a DblSpace or DrvSpace CVF, and up to 64 sectors on a DriveSpace 3 CVF). Microsoft Plus! compression avoids this problem by storing data for a fragmented cluster in a linked list of sectors when there are not enough continuous sectors to store the entire cluster. Microsoft Plus! compression also stores small directories in a single sector, whereas MS-DOS 6.x or Windows 95 require 16 sectors.
Using Compression Agent
Compression Agent allows you make the following choices for compression methods:
Whether specified files should be in UltraPack format, and whether to downgrade a file from UltraPack format
Whether individual files, folders, or file types should be compressed and, if so, with what method
Whether to use compression for the rest of your files and, if so, which type
You can start Compression Agent manually or, more commonly, you can have System Agent start it automatically when the computer is idle or at any time you specify. Compression Agent uses the Windows 95 Last Access Date to determine which files have not been used within a defined time (but Compression Agent does not modify the Last Access Date for any files).
The compression policies specified in the Compression Agent Settings dialog box control the standard 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 standard compression policy:
Always compress with UltraPack format
Always compress with HiPack format
The following shows the Compression Agent command line syntax:
cmpagent [drive**:** | /all] [/noprompt]
The following table describes the parameters for this command.
Specifies drive to be recompressed.
Specifies all local, fixed drives that are compressed.
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.
Guidelines for Fine-tuning Compression
Typically, you will want to use the default values for Microsoft Plus! compression, which specify using standard or no compression when saving files. You can then set System Agent to run Compression Agent when the computer isn't busy to compress seldom-used files into UltraPack format and all other files into HiPack format.
When you are deciding when methods and formats to use for compression, you must consider whether you want to configure compression to ensure maximum disk space or maximum system performance.
Maximizing hard disk space.
If you require that compression provide maximum disk space on a computer, then you might want to specify that UltraPack format be used to compress most files. (UltraPack format is recommended for Pentium-based computers.) In addition, you can specify that files be compressed as they are saved. If your computer is very fast, specify that HiPack format be used.
If you require maximum system performance, remember that files compressed in UltraPack format are much slower to decompress, so that if you try to access a document or run an application that is compressed in UltraPack format, you might have to wait before you can begin working again. For slower computers that require maximum performance, you can use System Agent and Compression Agent to specify that all compression is done while the computer is idle instead of compressing the files as they are saved. This provides the benefits of compression without any performance impact related to updating files.
To ensure maximium performance, you might want to define the following when configuring compression:
Use DriveSpace to specify that compression only occurs offline, not when each file is being saved, or specify that compression occurs only when disk space is low.
Specify a high threshold for UltraPack, so that, for example, Compression Agent recompresses in UltraPack format only those files that haven't been accessed within 30 or more days.
Set exceptions for files that should not be compressed in UltraPack format, such as executable files that you do not want to wait to have decompressed, even though you seldom use the files.
Notice that if you configure DriveSpace not to compress files as they are saved, or to compress files only when free space is low (using the Depends On Free Space option), the system reports free space as though files will not be compressed. As a result, the computer appears to have significantly less free space than it does 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.
Scheduling Programs with System Agent
System Agent is a Win32-based application for scheduling programs to run at times you specify. After it is installed and configured on a computer, System Agent periodically runs programs according to your preferences. System Agent supports options for specifying when Compression Agent, Disk Defragmenter, ScanDisk, and other programs will run, and it provides notification of exceptional conditions such as low disk space.
Programs can be scheduled to run based on several criteria, such as the exact time and date, or a range of times, or whether the computer is idle or is running on batteries.
How System Agent Works
System Agent consists of two parts, a scheduling engine (SAGE.EXE) and a separate application (SYSAGENT.EXE) for displaying and modifying the list of scheduled programs. The list of scheduled programs for System Agent is stored in the SAGE.DAT file, which is placed by default on the user's computer in the SYSTEM subdirectory of the folder where Microsoft Plus! is installed. However, this file can also be stored in a network directory. The ConfigPath value in the following Registry key defines the location of SAGE.DAT:
Hkey_Local_Machine \Software \Microsoft \Plus!\System Agent
The System Agent scheduling engine is a system service that runs continuously, monitoring the system and starting programs according to a database that contains the schedule you define for programs to be run. The only way you can interact with SAGE.EXE is by using the System Agent application.
The scheduling service starts automatically when the computer starts because its Setup program adds sage.exe as a value under the following Registry key:
Hkey_Local_Machine \Software \Microsoft \Windows \CurrentVersion \Run
You can quit SAGE.EXE if required — for example, if a setup program such as Windows 95 Setup prompts you to quit all applications before running — by choosing a command in the System Agent application.
To quit SAGE.EXE (the System Agent scheduling engine)
In the System Agent application click the Advanced menu, and then click Stop Using System Agent.
Note: Removing the System Agent scheduling engine in this way completely removes both SAGE.EXE and SYSAGENT.EXE from memory and from the Registry. Consequently, System Agent will not start automatically, and scheduled programs will not be run.
To restore System Agent as an automatic service, run the System Agent application, and answer Yes when prompted to start SAGE.EXE.
System Agent also notifies you when the following events occur:
Disk space falls below a predefined threshold
System Agent fails to run a program at its scheduled time because the computer was not running, was running on batteries, or was otherwise not idle
A DblSpace or DrvSpace CVF needs to be upgraded to DriveSpace 3
Note: When Microsoft Plus! is installed, the ScanDisk and Defrag tools are enhanced to support DriveSpace 3 compression.
Upgrade notification (UPGRDALM.EXE) is scheduled to run when the computer first starts after Microsoft Plus! Setup. If there are no compressed drives to be upgraded, this notification is removed from the System Agent schedule and never runs again. If you choose to upgrade, the notification runs DriveSpace 3, and then removes itself from the System Agent schedule when it has confirmed that the drives have been upgraded or compressed.
Note: The Upgrade notification runs by default at system startup although it doesn't appear in the list of programs scheduled in System Agent. For the Upgrade notification to appear in System Agent, change the ShowSystemTasks string value to 1 in the following Registry key:
Hkey_Current_User \Software \Microsoft \Plus!\System Agent
Running Other Programs with System Agent: An Overview
In addition to the disk utilities such as ScanDisk or Compression Agent that can be scheduled to run with System Agent, you can use System Agent to schedule any kind of program that you want to run at a particular time or periodically. For example, you might use System Agent to do the following:
Dial into an online service during off-peak hours, look for certain topics, download the results, and hang up.
Run a spreadsheet application such as Microsoft Excel, and use one or more macros to perform extensive computations on worksheets.
Run backup software when the computer is not being used.
The methods you use for scheduling and running a program depend on whether the application was designed to work with System Agent.
If the program is designed to run with System Agent, you can use the Settings dialog box in System Agent to choose options to use when running the program. For example, you might designate that ScanDisk run a standard test nightly, but run a thorough test once a month. A System Agent-aware program might offer additional options to choose for running the program.
For all types of programs, you can define a command line for running the program. This command line can be one of the following:
Any command-line statements that the program accepts. This might include only the program's executable name, the program name and a macro name or target filename, or the program name and any command-line switches.
A batch file with any allowable actions. If you use a batch file, you can simulate a chained group of commands for running multiple programs or batch files. To do this, use the start /W command in the batch file, which starts a program and waits for the results before running the next statement in the batch file.
The general process for scheduling a program to run in System Agent includes the following basic steps:
Select the Schedule A New Program command in System Agent, and specify a program to schedule.
This is where you can specify the command-line switches or a batch file to run (for a program that is not System Agent-aware).
Optionally, define a friendly name for the program.
Optionally, for System Agent-aware programs such as ScanDisk or Compression Agent, click the Settings button and define the options for running the program.
Click the When To Run button and specify the interval at which the program will run, such as daily, weekly, or monthly.
File Systems Overview
With the Windows 95 installable file system, multiple file systems can coexist on the computer. Windows 95 includes the following file systems.
In Windows 95, the 32-bit virtual File Allocation Table file system is the primary file system and cannot be disabled. VFAT can use 32-bit, protected-mode drivers or 16-bit real-mode drivers. Actual allocation on disk is still 12-bit or 16-bit (depending on the size of the volume), so FAT on the disk uses the same structure as previous versions of this file system. VFAT handles all hard disk drive requests, using 32-bit code for all file access for hard-disk volumes. VFAT was first introduced in Windows for Workgroups version 3.11 as an optional FAT file system that processed file I/O in protected mode.
The virtual CD-ROM file system has the same responsibilities for a CD-ROM device as VFAT has for a standard hard disk. If a CD-ROM device is detected, the CDFS driver loads dynamically. When CDFS is installed, the standard disk type-specific device and Disk SCSI translator are replaced with CD-ROM versions. The CDFS driver is a protected-mode version of MSCDEX.EXE, providing the interface from the CD-ROM device to the operating system, as described later in this chapter and in Chapter 31, "Windows 95 Architecture."
If the CD-ROM drive and its drivers support the multisession command, CDFS can support multisession capabilities, which provide a method for adding data to a CD-ROM (this is most applicable to CD-Recordable media). The multisession command returns a number that identifies the first sector of the last session on the media so that CDFS can recognize the media.
A network redirector (such as Microsoft Client for NetWare Networks or Client for Microsoft Networks) is a file system driver that accesses the network file system. Windows 95 supports multiple network redirectors simultaneously, as described in Chapter 32, "Windows 95 Network Architecture."
All these file systems support long filenames and can use the protected-mode cache (VCACHE) for read-ahead. VFAT also supports lazy-write throughput, so applications can write immediately to the cache, and VFAT can write the information to disk later. For more information, see "VCACHE and CDFS Supplemental Cache" later in this chapter.
Other software vendors can also implement file systems. For example, a vendor might provide a file system that allows a computer running Windows 95 to connect to a different operating system (for example, Apple® Macintosh® or UNIX®) to share files.
The Installable File System Manager (IFSMGR) receives all INT 21 calls and determines which file system driver should receive the call to process it. IFSMGR uses a real-mode stub named IFSHLP.SYS to send INT 21 calls back to IFSMGR, as described in Chapter 31, "Windows 95 Architecture."
File system drivers manage the high-level I/O requests from applications. The file system driver processes requests from applications and initiates low-level I/O requests through the I/O Supervisor.
Protected-mode disk compression is not integrated into the file system, but is supported by a layer in the I/O subsystem. Windows 95 supports disk compression software created for earlier versions of MS-DOS, using their real-mode driver loaded from CONFIG.SYS.
Using Long Filenames
For MS-DOS version 6.22 and earlier, filenames cannot exceed eight characters and filename extensions cannot exceed three characters in length (referred to as "8.3 filenames"). The period character (.) is used only to separate the filename from the filename extension. With long filename support in Windows 95, these 8.3 filename constraints are gone.
For all Windows 95 file systems, users can specify filenames that are up to 255 characters long and that can contain more than one period. These long filenames are any names that exceed 8.3 characters in length or contain any lowercase character or any character that is not valid in the 8.3 name space.
The following sections present information about long-filename support in Windows 95, including information and recommendations for supporting long filenames in a mixed network environment.
Long Filename Support in Windows 95
For every long filename, an alias entry is generated automatically that complies with the 8.3 filename rules for backward compatibility. Automatically generated aliases are composed of the first six characters of the filename plus n (where n is a number) and the first three characters after the last period. So the filename ThisIsALong.File.Name is associated with the automatically generated alias THISIS1.NAM. If the alias name already exists, the algorithm increments n, where n begins with 2 until the system can find a unique filename.
Note: Neither the user nor an application can control the name created by the automatic alias process. Related issues are discussed in "Long Filenames and Network Compatibility" later in this chapter.
For the filename to comply with the 8.3 filename rules, it must use only the valid characters for an alias and it must be all uppercase. Short filenames are converted to uppercase by the IFSMGR before being passed to the file system driver. Valid characters for 8.3 filenames (and aliases) can be any combination of letters and numbers, a blank (ASCII 20H), ASCII characters greater than 127, and the following special characters:
$ % ' - _ @ ~ ` ! ( ) ^ # &
The following additional characters are valid in long filenames, but are not valid in alias names or 8.3 filenames:
+ , ; = [ ]
The following rules also apply for Windows 95 file systems:
Maximum filename component length is 255 characters, including NULL
Maximum path length is 260 characters, including NULL (compared to 80 characters for a short name)
The OEM character set can be specified by an application if the application is written for that character set
The long-filename directory entries use the Unicode character set to store the names
The filename and the alias are the same if the filename meets 8.3-filename rules (that is, if it contains only valid characters for an alias and it is all uppercase). This means that a filename using only valid characters for an alias and following the 8.3-filename format is still not the same as the alias name if it contains lowercase characters. However, in this case the alias is the uppercase version of the filename. For example, if the long filename is Examples.Txt, its alias is EXAMPLES.TXT. The case is preserved in the long filename. (Notice, though, that searches in the Windows 95 file system are not case-sensitive. So a search of the form "examples.txt" or "Examples.Txt" will find the same files.)
Tip To see the alias for a file, right-click the file in any shell program such as Windows Explorer and then select Properties from the context menu. The value for MS-DOS Name in the General properties dialog box shows the alias assigned to this file. Also, the dir command at the command prompt shows the long filename.
Long Filenames and Network Compatibility
By using a process called tunneling, Windows 95 preserves long filenames for files that are opened and saved using an application that does not recognize long filenames. Tunneling preserves long filenames on the local computer as well as files accessed across the network.
Tunneling is supported for any file system that IFSMGR recognizes. The file system in turn must "authorize" tunneling to allow its use in that file system. Tunneling is authorized automatically with VFAT.
Correct network tunneling is the responsibility of the server — that is, the server must be configured to support long filenames. A server running any edition of Windows NT 3.5 or Windows 95 file and printer sharing services will preserve long filenames. For example, a user who is running Windows for Workgroups might open and save a file on a peer server that is running file and printer sharing services (for either Microsoft networks or NetWare networks). In this case, the long filename will be preserved by the file system on the peer server, because the peer server uses IFSMGR and VFAT to store the data.
NTFS, the Windows NT file system, supports long filenames, but includes architecture for security that Windows 95 does not use. Windows NT 3.5 supports long filenames on FAT drives and uses the same algorithm for aliases as used in Windows 95. However, Windows NT 3.1 doesn't recognize long filenames on FAT drives and removes them.
HPFS file system supports long filenames with aliases similar to the method used in Windows 95.
CDFS, the CD-ROM file system, also supports long filenames.
The following sections provide details about long filename support on various networks.
Long Filenames with Windows 95 Protected-Mode Clients
Windows 95 protected-mode network clients (Client for Microsoft Networks and Client for NetWare Networks) support long filenames. If the network server that the computer is connected to supports long filenames, then Windows 95 can read, create, and copy local long-filename files on the network share. On some servers, the length of filenames, restricted characters, and the algorithm for creating 8.3 filenames from long filenames might differ from those under Windows 95.
Client for Microsoft Networks does not authorize tunneling, so tunneling is not used to preserve long filenames on down-level servers connected through the Windows 95 client (for example, a computer running Windows for Workgroups or LAN Manager Services). However, Microsoft Client for NetWare Networks does authorize tunneling, so tunneling can preserve long filenames in connections to older NetWare servers when running Client for NetWare Networks.
Windows 95 can access files on HPFS or NTFS partitions on remote drives. However, there is no built-in support in the release of Windows 95 for adding either of these file systems as another installable file system under Windows 95. Therefore, Windows 95 cannot access either an HPFS or NTFS partition on a local disk drive by using the file system drivers provided with Windows 95. (Other vendors, however, can add HPFS support.)
Please note the following interoperability exceptions for other file systems:
Long filenames can be used on computers running file and printer sharing services and can be viewed on computers using protected-mode Windows 95 network clients. Real-mode network clients running under Windows 95 can see only the 8.3 filename aliases.
If Windows 95 has been configured with File and Printer Sharing for NetWare Networks, any MS-DOS – based NetWare clients using NETX or VLM will see 8.3 filenames computers using Client for NetWare Networks can see long filenames.
Long filenames are supported for NetWare servers if the server is configured to use the OS/2 name space. For information, see Chapter 9, "Windows 95 on NetWare Networks."
Note: Older Microsoft or Microsoft-compatible clients (for example, LAN Manager, Workgroup Add-on for MS-DOS, Windows for Workgroups, and so on) cannot use shared folders that have long filenames. These older network clients might have problems connecting to and using a shared directory with a long filename as the directory name. Defining a short share name does not correct this problem.
LAN Manager with HPFS and HPFS/386 Volumes
HPFS and HPFS/386 partitions on LAN Manager OS/2-based computers have a maximum filename length of 254 characters and use the 8.3 filename alias on the first instance. For example:
longfilenameold.tst --> longfile.tst longfilenamenew.tst --> longfil0.tst
Long filenames on a LAN Manager server with HPFS or HPFS/386 partitions are supported and viewable by Windows 95 protected-mode network clients. Real-mode network clients can see only the 8.3 filename aliases.
LAN Manager workstations with HPFS or HPFS/386 cannot see Windows 95 long filenames. The LAN Manager workstation software has no awareness of the long filename-over-FAT file scheme used by Windows 95.
Windows NT 3.1 with HPFS or NTFS Volumes
Support for long filenames on FAT volumes is identical in Windows NT 3.5 and Windows 95. Therefore, a computer with dual-boot capabilities for Windows NT 3.5 and Windows 95 can see long filenames on local FAT volumes by using both operating systems.
HPFS partitions exist on Windows NT computers only in the case of an upgrade over OS/2. Filenames on Windows NT 3.1 HPFS partitions have a maximum filename length of 254 characters and use the 8.3 filename alias on the first instance. For example:
longfilenameold.tst --> longfile.tst longfilenamenew.tst --> longfil0.tst
Filenames on Windows NT 3.1 NTFS partitions have a maximum filename length of 255 characters and use the 8.3 filename alias on the first instance. For example:
longfilenameold.tst --> longfi~1.tst longfilenamenew.tst --> longfi~2.tst
Long filenames on shared Windows NT 3.1 HPFS and NTFS partitions are supported and viewable by Windows 95 protected-mode network clients. Real-mode network clients can see only the 8.3 filename aliases.
Windows NT 3.1 computers cannot see Windows 95 long filenames. Windows NT 3.1 has no awareness of the long filename-over-FAT file scheme used by Windows 95.
Administrative Considerations for Long Filenames
If you are supporting long filenames at a site with many users, the following issues must be considered:
If you back up files to a server that does not support Windows 95 long filenames, use the LFNBK utility to save and restore long filenames. For information, see "Using the LFNBK Utility for Temporary Compatibility" later in this chapter.
Be aware of utilities that will not work with the new Windows 95 directory entries for long filenames. Some virus scanning programs, disk repair utilities, disk optimizers, and other programs depend on the FAT file system and might not work with long filenames. If you are unsure whether a utility is compatible with the long filename system, check with the manufacturer. If you must use an incompatible program, be sure to turn off long filenames by using the LFNBK utility before proceeding.
Do not use filenames that are more than 50 to 75 characters long. Although filenames can be up to 255 characters, the full path name cannot be more than 260 characters. To save room for moving a file from one directory to another, use filenames shorter than the limit. Besides, filenames that are too long can make browsing a list difficult.
Publish a naming convention for your site so that users are aware of naming considerations and can prevent problems with the long filenames they use. For example, your policy could recommend making the first three or four letters significant, so that the 8.3 filename aliases can be distinguished from each other. The following example shows the alias names for some long filenames:
Status Report for Oct -> STATUS1.TXT Status Report for Nov -> STATUS2.TXT Status Report for Dec -> STATUS~3.TXT
Using the following alternate filenames, you can distinguish between the 8.3 filenames: <pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml">
Oct Status Report -> OCTSTA1.TXT Nov Status Report -> NOVSTA1.TXT Dec Status Report -> DECSTA~1.TXT
You could also recommend that users give files a short filename as part of the long filename. For example: <pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml">
Mktg_rpt - Marketing Report for our new project -> MKTG_R~1.TXT
As part of the naming convention, recommend that users check the properties for files to ensure that the alias (the MS-DOS Name in the properties dialog box) is what they expect it to be.
Tip for Long Filenames in the Root Directory
Usually, it is best to store files in a directory beneath the root directory. This is especially true for files with long filenames. Files with long filenames use more directory entries than files with 8.3 filenames. Because the number of entries in the root is limited to 512, the root directory can fill up with fewer files if long filenames are used.
Notice that typing the command mkdir Examples creates a long filename directory entry that contains the name Examples to preserve the case, plus an 8.3 filename alias entry with the name EXAMPLES for compatibility. In this example, two directory entries are used.
Using the LFNBK Utility for Temporary Compatibility
Most hard disk utility programs released before Windows 95 require updating to work correctly with Windows 95. If you use a hard disk utility that was not created especially for use with Windows 95, you might lose long filenames and you are at risk of losing data. Examples of such programs include the following:
Norton Utilities® by Peter Norton Computing
PC Tools™ by Central Point Software, Inc.
Microsoft Defragmenter for MS-DOS version 6.0, 6.2, 6.21, or 6.22
Stacker 4.0 by STAC Electronics
In special cases, you might need to run backup or disk management utilities created for older versions of Windows or MS-DOS that are not compatible with the extended file system capabilities of Windows 95. Or you might need occasionally to run an application that is not compatible with long filenames. In such cases, you can use the LFNBK utility to remove (and later restore) long filenames on a disk.
To install the LFNBK utility
- From the Windows 95 compact disc, copy LFNBK.EXE to the Windows directory on your computer.
Caution: The LFNBK utility is intended for use only by experienced Windows 95 users with special needs for compatibility with older disk utilities. It is not intended for everyday use by average users.
Microsoft recommends that users rely on the disk management utilities included with Windows 95 or use Windows 95-compatible utilities from other vendors, rather than attempting to use older utilities that are not compatible with Windows 95.
Notice also that the DriveSpace utility included with Windows 95 is compatible with long filenames and can be used without LFNBK to manage compressed disks created with older versions of DriveSpace or DoubleSpace.
The following shows the syntax for LFNBK:
lfnbk [/v] [/b | /r | /pe] [/nt] [/force] [/p] [drive]
The following table lists and describes the parameters for this command.
Reports actions on the screen.
Backs up and removes long filenames on the disk.
Restores previously backed-up long filenames.
Extracts errors from backup database.
Does not restore backup dates and times.
Forces LFNBK to run, even in unsafe conditions.
Finds long filenames, but does not convert them to 8.3 filename aliases. This reports the existing long filenames, along with the associated dates for file creation, last access, and last modification of the file.
To preserve long filenames with disk utilities that do not recognize them
Turn off tunneling.
To do this, in the System option in Control Panel, click the Performance tab, and then click File System. In the File System Performance dialog box, click the Troubleshooting tab, and check the option named Disable Long Name Preservation for Old Programs.
Close all other applications. LFNBK cannot rename open files.
At the command prompt, type lfnbk /b [drive] to back up and remove long filenames.
Restart the computer, and then run the disk utility. If it is an MS-DOS – based utility, run it in MS-DOS Mode. For a Windows-based utility, run it in the usual way.
Turn tunneling on again, and then restart the computer.
At the command prompt, type lfnbk /r [drive] to restore long filenames.
The LFNBK utility actually renames each file with a long filename to its associated alias. The filename changes are stored in the LFNBK.DAT file in the root of the drive where you are running LFNBK. This file is used to restore long filenames (when you run LFNBK with the /r switch).
The following list provides some brief notes for using the LFNBK utility:
You cannot use LFNBK to repair long filename problems.
LFNBK might not be able to rename files with exact matches to long-filename aliases, and the related alias is not guaranteed to be the same as before running LFNBK.
After you run LFNBK and then restart Windows 95, the default Start menu will appear, rather than your custom Start menu. After you run lfnbk /r to restore long filenames, your custom Start menu will also be restored.
If the directory structure changes after you run lfnbk /b, then long filenames cannot be restored with lfnbk /r. For example, if you run a disk utility that prunes or removes subdirectories, LFNBK cannot restore the long filenames within those subdirectories.
Creating Long Filenames at the MS-DOS Prompt
At an MS-DOS prompt or when Windows 95 is started only at the command prompt (from the F8 Startup menu), the keyboard buffer's ability to create long filenames is limited to 127 characters. This is because the default command-line character limitation is 127 characters. In the default configuration, the MS-DOS environment will not allow more than 127 characters in a given command line. (However, in batch files, or for environment variables and other VM elements, the long filename support is 244 characters.)
You can increase the global command-line character limit for the keyboard buffer to its maximum by placing the following line in CONFIG.SYS:
If the shell command is already present with the /u switch, increase the value to 255.
This command will affect all VMs and the Windows 95 command line.
With the command-line character limit set to its maximum of 255 characters, filenames are limited to 255 characters minus the contents of the command line. For example, the command line might contain the following:
copy con "long filename"
In this case, the maximum length of the long filename is 244 characters (255 minus the 11 characters of the command).
Note: It is necessary to put the filename in quotation marks on the command line only if the filename contains special characters such as spaces.
Notice, however, MS-DOS – based applications configured to run in MS-DOS Mode use only the real-mode FAT file system. Because of this, long filenames created in a Windows environment are not visible when the system runs in MS-DOS Mode; only the 8.3 filename aliases are visible.
The same is true of files with long filenames that are copied to a floppy disk subsequently used by a down-level FAT file system such as MS-DOS 6.0, Windows 3.1, OS/2 2.11, Windows NT 3.1, and so on.) On down-level file systems, only the 8.3 filename alias is visible on the floppy disk, even if it contains long filenames created in Windows 95.
Technical Notes on Long Filenames
This section summarizes some technical points with regard to long filenames. This information will be helpful to you if you experience problems with long filenames.
Long filenames cannot be used on SUBST drives.
Windows 95 supports SUBST only for backward compatibility with drives created on older systems. Filenames on SUBST drives must comply with the 8.3 filename rule.
Turning off numeric tails for filename aliases.
If you do not want to use filename aliases that automatically use a numeric tail (~n), you can force the file system to create friendly 8.3 filename aliases, at least for the first instance of the 8.3 filename.
To use friendly alias names instead of numeric tails
Add the value NameNumericTail = 0 in the following Registry key:
Hkey_Local_Machine \System \CurrentControlSet \Control \FileSystem
Turning off the extended file system features.
In extremely rare cases, you might determine that you need to turn off the extended file system features in Windows 95. In this case, you can enable the Windows 3.1 file system by changing the Registry. However, this is not a recommended option.
Using the older Windows 3.1 file system affects many of the features available under Windows 95. Also, the Windows 3.1 file system was not tested extensively under Windows 95 in the same way as the new file system. You can expect the following results if you enable the Windows 3.1 file system:
No support is provided for long filenames
No extended file information is available, such as creation date and time, and last access date
Folders cannot be included with user profiles
To enable the Windows 3.1 file system
At the command prompt, run lfnbk /b to remove long filenames from the hard disk, as described in "Using the LFNBK Utility for Temporary Compatibility" earlier in this chapter.
– Or –
At the command prompt, run scandskw /o to remove long filenames and all extended file attributes from the disk. To remove long filenames from removable disks, include the drive letter with the command; for example, scandskw /o a:
Caution: If you use scandskw /o to remove long filenames, ScanDisk will check all fixed disks and will repair disk errors without warning you. Changes made with scandskw /o cannot be reversed.
In Registry Editor, set the value of Win31FileSystem to 1 in the following Registry key. Then shut down and restart the computer.
Hkey_Local_Machine \System \CurrentControlSet \Control \FileSystem
Technical Notes on Disk Device Support
Windows 95 uses layered block device drivers to manage input and output to block devices such as disks and CD-ROM drives. A block device is a device such as a disk drive that moves information in groups of bytes (blocks) rather than one byte at a time. Layered block device drivers are 32-bit, flat-model device drivers that run in protected mode. These drivers support conventional and SCSI disk drives, plus partitioned and unpartitioned removable media. Windows 95 also uses layered block device drivers to manage Windows 3.x FastDisk drivers, MS-DOS – based real-mode device drivers, and Windows NT miniport drivers.
Each layered block device driver can be loaded dynamically, so the appropriate driver can be loaded or unloaded as needed without restarting the computer. Although the drivers are virtual device drivers (VxDs), they do not use the standard virtual device services and APIs. Instead, the I/O Supervisor provides the services and functions the device drivers need to complete their tasks.
Specifically, the block I/O subsystem in Windows 95 provides the following:
Architecture to support all Plug and Play features
Support for miniport drivers that are compatible with Windows NT
Compatibility support for Windows 3.1 FastDisk drivers and MS-DOS real-mode disk device drivers
Protected-mode drivers that take over real-mode MS-DOS device drivers when it is safe to do so
For more information about the block I/O subsystem, see Chapter 31, "Windows 95 Architecture."
Supported Disk Devices
Windows 95 provides better disk device support than Windows 3.1, but it also ensures compatibility with existing MS-DOS – based and Windows-based disk device drivers. In addition, the disk device drivers in Windows 95 are compatible with Windows NT miniport drivers.
Windows 95 also provides enhanced support for large media using logical block addressing, including hard disks with more than 1024 cylinders. Extensions to the INT 13 disk controller support are provided in the protected-mode disk handler drivers for this support. (Windows 3.1 did not provide this support in its 32-bit disk access drivers.)
The following list shows the types of disk devices supported under Windows 95:
Hard disk drive
The following sections describe support in Windows 95 for IDE, SCSI, high-speed floppy disk, and removable media devices. Information about SCSI and non-SCSI port drivers is also included.
IDE Drives and Controllers
Windows 95 provides improved support for IDE drive configurations, as summarized in this section.
Support for alternate IDE controllers.
Windows 95 provides protected-mode support for the use of two IDE controllers in a computer, or the combination of an IDE controller in a portable computer and an alternate controller in a docking station (available, for example, in some COMPAQ docking station products). IDE controllers provide support for multiple disk drives.
Support for IDE-based CD-ROM drives.
Currently, most disk devices in personal computers use an IDE-based hard disk controller. Adding a CD-ROM drive typically requires adding an additional controller card to provide either SCSI or a proprietary interface for connecting to the CD-ROM drive. Windows 95 supports new, inexpensive CD-ROM drives that connect to IDE-compatible disk controllers.
Any IDE device that includes mechanisms for identification and declaration of resource requirements can take advantage of Plug and Play.
Note: To use Syquest removable IDE drives under Windows 95, the entry RemovableIDE=true must be added to the [386enh] section of SYSTEM.INI
Support for large IDE disk drives.
IDE drives are available that support a logical block addressing (LBA) scheme, allowing them to exceed the 0.5 GB (528 MB) size limitation. Windows 95 provides protected-mode support for IDE disk drives larger than 504 MB. The primary partition and the logical drives in an extended partition are each limited to 2 GB, but multiple 2-GB logical drives can be created in an extended partition.
The cluster size for a drive is defined by the Format program, depending on the size of the local drive, as shown in the following table:
Cluster Sizes for Logical Volumes on Hard Disks
Drive size (MB)
Sectors per cluster
0 – 151
16 – 127
128 – 255
256 – 511
512 – 1023
1024 – 2048
1 FAT type is 12-bit; all other sizes use 16-bit FAT.
You can also use DriveSpace on 1-GB or 2-GB drives to eliminate the inefficiency of using 32K clusters, but in this case you must create multiple compressed drives. You can also use compression in Microsoft Plus! to create a single compressed drive on disks that are up to 2 GB in size.
SCSI Devices and Drivers
Windows 95 provides support for SCSI disk devices, which was not available in Windows 3.1. SCSI support in Windows 95 includes disk SCSI translator drivers, the SCSI Port Manager, and SCSI miniport drivers.
A disk SCSI translator driver (also called a SCSI'izer) are responsible for constructing SCSI command descriptor blocks for a specific device class and carrying out device-level error recovery and logging. There are two of these drivers (one for each class): one for SCSI hard disk devices and one for CD-ROM devices.
SCSI Port Manager manages the interaction between the SCSI'izer and a SCSI miniport driver, initializes the miniport driver, converts the I/O request format, and provides other services for the miniport driver.
The SCSI miniport driver is responsible for detecting and initializing a specific set of SCSI adapters. The driver also handles interrupts, transmits I/O requests to the device, and carries out adapter-level error recovery and logging. Windows 95 supports the use of Windows NT miniport SCSI drivers without modification or recompiling. Compatibility with Windows NT-based miniport drivers ensures broad device support for disk devices under Windows 95, while simplifying the driver development efforts for hardware manufacturers.
Windows 95 provides broad support for popular SCSI controllers. Windows 95 includes 32-bit disk device drivers for popular SCSI controllers from Adaptec, Future Domain, and other manufacturers. Windows 95 also provides compatability support for the Advanced SCSI Programming Interface (ASPI) and Common Access Method (CAM), which allows application and driver developers to submit I/O requests to SCSI devices. This allows existing MS-DOS – based applications and drivers that use the ASPI or CAM specification to work properly under Windows 95. Windows 95 also includes 16-bit and 32-bit drivers to support Windows-based ASPI clients and applications.
Although Windows 95 can use Windows NT miniport drivers, the best choice for a SCSI driver is one that complies with Plug and Play. Most Windows NT miniport drivers ignore configuration information from the SCSI Manager and check I/O ports to identify hardware. Miniport drivers in Windows 95 must honor configuration information without scanning for other adapters if the configuration information is not the default configuration. This is because many adapters supported under Windows 95 have port ranges that conflict with other adapters and are affected adversely by scanning. For example, Artisoft® LANtastic® network adapters occupy a range of port addresses used by Adaptec 154X adapters, and accessing these ports will cause the system to lock up.
Windows 95 provides several .MPD files with Plug and Play capabilities, including the ability to transition from protected mode to real mode (to support MS-DOS – based applications that must run in MS-DOS Mode) and to accept configuration information from the SCSI Manager for dynamically loading and unloading drivers.
For information about troubleshooting SCSI devices, see Chapter 19, "Devices."
High-Speed Floppy Disk Driver
Windows 95 provides protected-mode support for communicating with floppy disk controllers. Windows 95 provides INT 13 hard disk controller support as 32-bit device drivers, which results in improved performance, stability, and system robustness.
Windows 95 provides floppy disk controller support as a 32-bit device driver, and offers improved performance for file I/O to floppy disk drives, plus improved reliability of the system. You can now format a disk or copy files to and from a disk while performing other tasks.
Removable Media and Docking Devices
Windows 95 provides protected-mode support for removable media devices with MS-DOS – compatible partitions, including floppy disk drives and controllers, Bernoulli drives, and CD-ROM, plus docking stations for portable computers. Windows 95 allows the system to lock or unlock the device to prevent the media from being removed prematurely.
Windows 95 also supports an eject mechanism for devices that support it, so that users can use software control to eject media from a device (for example, new floppy disk drives that support software-based media ejection).
Docking refers to the insertion or removal of a device in the system. Devices that can be docked include almost anything, depending on the hardware — monitors, network access, removable hard disk drives, or any removable resource. A docking station is a base unit into which you can insert the portable hardware and which includes drive bays, expansion slots, and additional ports. Port replicators can also be used as docking station substitutes that provide extra functionality not available in the portable docking device.
If a docking change occurs in the computer configuration during operation, such as the insertion of a portable computer into the docking station, the system is notified so that the new device can be configured and applications can be notified of the change.
Windows 95 supports "hot" docking, where the device can be docked or undocked while running at full power, and "cold" docking, where the device must be powered off or restarted before the device can be docked or undocked. Legacy portable computers use cold docking.
In addition, some devices require certain preliminary steps before they can be docked or undocked. For example, if you have a file open and decide to remove the hard disk, the file must be closed. To handle these situations, Windows 95 supports different undocking systems, depending on the type of hardware:
Auto-ejection, which is a software interface that operates a VCR-type ejection mechanism, allowing Windows 95 to request user action to resolve any open resources. The user can save files and so on before the system ejects the dockable resource.
Manual ejection, where the user undocks the resource without using any software interface. Because the system cannot be notified when this occurs, any closing of files or other actions must be performed manually to prevent loss of data.
Non-SCSI Port Drivers
A non-SCSI port driver usually works with a specific adapter, so the driver is retained in memory only if the related adapter is present in the system. Windows 95 includes, for example, port drivers for IDE, ESDI, or NEC floppy disk drives.
A port driver provides the same functionality as the SCSI Manager and miniport driver, but these drivers are monolithic and are not portable to Windows NT. A port driver manages and controls the adapter for a given block device. The port driver detects and initializes the adapter, handles interrupts, transmits I/O requests to the device, and carries out adapter-level error recovery and logging.
Important: Do not use a device= entry in SYSTEM.INI to load a port driver. Windows 95 loads appropriate drivers from the SYSTEM\IOSUBSYS subdirectory in the Windows directory.
VCACHE and CDFS Supplemental Cache
The 32-bit VFAT works in conjunction with a 32-bit, protected-mode cache driver (VCACHE), and replaces and improves on the 16-bit real-mode SMARTDrive disk cache software provided with MS-DOS and Windows 3.1. The VCACHE driver uses an improved caching algorithm over SMARTDrive to cache information read from or written to a disk drive, and results in improved performance for reading information from the cache. Also, the VCACHE driver is responsible for managing the cache pool for CDFS, and the 32-bit network redirectors.
Another big improvement in VCACHE over SMARTDrive is that the memory pool used for the cache is dynamic and is based on the amount of available free system memory. Users no longer need to allocate a block of memory to set aside as a disk cache; the system automatically allocates or deallocates memory used for the cache based on system use. The performance of the system also scales better than earlier versions of Windows, due to the intelligent cache use.
The 32-bit protected-mode CDFS implemented in Windows 95 provides improved CD-ROM access performance over the real-mode MSCDEX driver in Windows 3.1 and is a full 32-bit ISO 9660 CD file system. The CDFS driver replaces the 16-bit real-mode MSCDEX driver, and it features 32-bit protected-mode caching of CD-ROM data. If MSCDEX is specified in the user's AUTOEXEC.BAT when Windows 95 is installed, the 32-bit CDFS driver is used instead.
CDFS has a larger and smarter cache than MSCDEX, optimized just for CD-ROMs and separate from VCACHE. The CDFS driver cache is dynamic and shares the cache memory pool with the 32-bit VFAT driver, requiring no configuration or static allocation on the part of the user.
CDFS reads ahead in parallel with the application so that multimedia presentations play back more smoothly than with earlier versions of Windows. Because CDFS uses a separate cache, the cache memory can be swapped out to the hard disk when CD-ROM activity pauses. This gives applications more room to run and protects the main hard disk cache from being flushed out whenever a very large multimedia stream is played back.
The supplemental cache size for CDFS is used to hold path table, directory, and file information. This particular cache is used to improve CD streaming and to reduce seek latency as effectively as possible with a moderately sized cache. This means that the cache is more complex, using smart priority-based caching schemes to achieve results optimized for CD-ROMs.
For information about configuring the CD-ROM cache to match the characteristics of CD-ROM drive types, see Chapter 17, "Performance Tuning."
Troubleshooting File and Disk Problems
This section provides information for troubleshooting disk and file system problems, problems with disk utilities, and problems with long filenames.
For information about using the Troubleshooting dialog box for File System Properties in the System option in Control Panel, see Chapter 17, "Performance Tuning."
There are performance problems with the floppy disk drive.
You can try preventing the floppy disk device driver from attempting to use first-in, first-out (FIFO). To do this, add the value ForceFIFO=0 to the following Registry key:
Hkey_Local_Machine \System \CurrentControlSet \Services \Class \FDC \0000
Windows 95 cannot access the drive or reports only 2 GB total disk space on larger drive.
In the first release of Windows 95, the network client was designed to maintain compatibility with MS-DOS – based applications that assume a 2-GB drive-size limit. If a network drive, such as an NTFS volume on a Windows NT server, has more than 2 GB of free disk space, Windows 95 reports only that 2 GB are available and 0 bytes are used.
Microsoft does not recommend using Windows 95 with a FAT volume larger than 2 GB created in Windows NT. On a dual-boot computer with both Windows 95 and Windows NT installed, you can read from and write to the drive, but you might experience strange results, such as programs reporting 0 bytes free space on the drive. However, you shouldn't experience data loss when accessing a 4-GB drive.
Disk utilities fail on a Windows 95 volume.
Disk utilities that were not designed for the Windows 95 VFAT file system can find unexpected values in fields that were once reserved for MS-DOS. Use disk utilities designed for Windows 95 instead. You might be able to use some earlier utilities by first running LFNBK, as described in "Using the LFNBK Utility for Temporary Compatibility" earlier in this chapter.
Problems occur with shortcuts after compressing the Windows 95 volume with Stacker.
Stacker does not recognize or accommodate long filenames. If you compress your Windows 95 volume by using the Stacker DOS compression program, your desktop shortcuts will need to be repaired manually. You will also need to move USER.DAT and USER.DA0 from the host volume to your compressed volume. If you are using Stacker, do not run DriveSpace or DoubleSpace.
A CVF will not mount.
Check the D??SPACE.INI file in the root directory of the boot drive. If this file is damaged, use the DriveSpace program to rebuild it.
The d??space /mount command in AUTOEXEC.BAT does not work.
This occurs because Windows 95 Setup deletes or renames the MS-DOS – based versions of DRVSPACE.EXE and DBLSPACE.EXE. To solve this problem, use scandisk /mount as the replacement command live in AUTOEXEC.BAT. The version of ScanDisk provided with Windows 95 has been enhanced for this purpose. For more information, see Appendix A, "Command-Line Commands Summary."
Long-Filename Troubleshooting Tips
Long filenames can cause problems for some disk utilities. Be sure to use disk utilities that are long filename-aware. If you are not sure whether your utility is long filename-aware, consult your disk utility documentation. If long filenames are not mentioned, then your utility probably does not support long filenames.
Using a down-level file system command (such as copy or rename) rather than the Windows 95 equivalent will destroy a long filename.
Because the root directory is limited to 512 entries, you can fill the root directory with fewer files by using long filenames because each long filename takes more than one entry in the directory.
Although you can disable the creation of long filenames, this should be used only if error conditions warrant it and if other troubleshooting efforts have failed. For information about turning off the extended file sysrem features, see "Technical Notes on Long Filenames: earlier in this chapter.
The 8.3 filename alias was changed.
This can happen when you use options such as Copy, Backup, or Restore. For example, if a file with the name LongFileName is associated with an alias LONGFI~2, and this file is copied to a different directory by using the following:
copy LongFileName \TMP\LongFileName
Then the alias associated with this file can become LONGFI~1, if such an alias is not already present in the target directory.
The long filename was destroyed.
This can happen when transferring files to or from file systems that do not support long filenames, when running file searches, or when using certain disk utilities. The long filename cannot be restored.
A long filename was lost after the file was edited on another computer.
This occurs because down-level file systems are not aware of the long filename extensions to the FAT file system.
Hard disk device drivers cause the computer to stall.
The I/O Supervisor, which loads hard disk (block) device drivers, requires the driver's files (having filename extensions .PDR, .MPD, .VXD, and .386) to be located in the SYSTEM\IOSUBSYS subdirectory of the Windows directory.
If the computer locks up during startup or hardware detection, try the following:
Check for Windows NT miniport drivers (.SYS files in the IOSUBSYS directory). These drivers detect the I/O ports and might cause the computer to stop. Replace the Windows NT driver with either a Windows 95 miniport or a real-mode driver.
Check the IOS.INI file for real-mode drivers not replaced by protected-mode drivers.
When loading protected-mode drivers, the real-mode driver generally remains loaded in memory even though the protected-mode driver "takes over." If you suspect a conflict, type rem at the beginning of the line in CONFIG.SYS that calls the real-mode driver.
Users might have problems with devices (such as tape backups) that use ASPI drivers. Try using only real-mode drivers, then try using only protected-mode drivers.
Virus-detection utilities don't remove a virus.
In general, virus-detection utilities created from earlier versions of Windows can detect but not clean viruses from Windows 95. This is because virus-detection utilities use low-level writes to repair the disk. MS-DOS – based utilities can still be run using the lock command.