Windows 7: Advanced disk and file management

Windows 7 has some advanced file and disk management tools and techniques, including virtual hard disks, links, disk quotas and Windows ReadyBoost.

Jorge Orchilles

Adapted from “Microsoft Windows 7 Administrator’s Reference” (Syngress, an imprint of Elsevier)

Everything in your Windows 7 system relies on how you configure your disks and file systems. If those aren’t properly configured, your system may not run at all. You need to ensure you choose a configuration that best suits your needs. You can also use new advanced features like virtual hard discs (VHDs), creating links, the new Windows ReadyBoost and disc quotas.

Create a VHD

The VHD is basically a hard drive that actually exists as a file. VHDs are generally used with virtual machines. You can also be used with physical machines. VHDs have the .vhd file extension.

You can create VHDs in the Disk Management MMC snap-in. Follow these steps to create a VHD:

  1. Right-click the Disk Management MMC snap-in and select Create VHD. The Create and Attach Virtual Hard Disk window will appear.
  2. Specify a location for the hard disk file.
  3. Specify a size for the VHD.
  4. Choose whether you want to create a dynamically expanding VHD or a fixed-size VHD.
  5. Click OK. The VHD is created.

Use your VHD

Before your system can use a VHD, you must attach the VHD to the system. VHDs you create on a specific system, as in the previous example, are automatically attached. You’ll have to manually attach other VHDs to your system. To attach a VHD to a system, do the following:

  1. Right-click the Disk Management MMC snap-in and select Attach VHD. The Attach Virtual Hard Disk window will appear.
  2. Specify the location of the VHD you’d like to use.
  3. Specify whether you’d like the VHD to be mounted as read-only.
  4. Click OK. The VHD will be attached to your system.

Once VHDs are attached to your system, they appear in the Disk Management snap-in, just like any other disk. If the VHD is new, you’ll have to initialize. After the disk is initialized and online, you can create disk volumes. The disk is then ready for use.

File system fragmentation

Disk fragmentation occurs when files or pieces of files get scattered throughout your disks. Not only do hard disks get fragmented, but removable storage can also become fragmented. This can cause poor disk performance and overall system degradation. This is something you’ll eventually have to deal with.

Windows 7 includes a disk defragmentation utility that can defrag your disks and restore system performance. The tool is called Disk Defragmenter. You can access Disk Defragmenter from Start | All Programs | Accessories | System Tools. You can also get at it by right-clicking on a disk in Windows Explorer, selecting Properties, and then going to the Tools tab.

Disk Defragmenter lets you defragment your disks now, schedule defragmentation for later, or schedule periodic defragmentation. Disk Defragmenter also includes an option for Analyze Disk. If you choose this option, Disk Defragmenter will determine if your system can benefit from running the defragmentation process.

This is important because defragmentation can sometimes take a long time to complete. If it’s not going to benefit your system, there’s no reason to run a defragmentation.

A symbolic link is a pointer that redirects to another location. When you access a symbolic link, a user or system is automatically sent to the file or folder referenced in the symbolic link. Symbolic links are generally put in place for ease of use or application compatibility.

You can use the mklink command to create symbolic links in Windows 7. The syntax and usage of mklink is as follows:

  • MKLINK [[/D] | [/H] | [/J]] Link Target
  • /D – creates a directory symbolic link. Default is a file symbolic link
  • /H – creates a hard link instead of a symbolic link
  • /J – creates a Directory JunctionLink specifies the new symbolic link name
  • Target specifies the path (relative or absolute) to which the new link refers

Relative or absolute

You can create either absolute or relative symbolic links. Absolute links specify the entire path in the link. Relative links only contain the latter portion of the link. With relative links, the beginning portion of the link is based on its location. Relative links generally begin with one of the following or use one of the following formats:

  • Dots – Either (.) or (..). For example, .\test.txt or ..\test.txt
  • Root relative – For example, \test.txt
  • Current directory relative – For example, c:test.txt
  • Just the file name – For example, test.txt

A hard link is a link between two files on a hard disk. When you click a hard link to a file, the OS and applications will behave as though you’re accessing the file itself. You can only use hard links to link files on the same volume.

Windows ReadyBoost

You can use Windows ReadyBoost to speed up the performance of your Windows 7 system. When your system runs out of RAM, it begins using the hard disk to store files it needs to use. This disk access can impact your system performance. To help with this, Microsoft developed ReadyBoost. ReadyBoost lets Windows 7 use a flash drive instead of the hard disk for this storage. Flash drive access can be much faster than hard disk access.

To enable ReadyBoost, take the following steps:

  1. In Windows Explorer, right-click the drive representing the flash drive and select Properties.
  2. Go to the ReadyBoost tab.
  3. Select Use this device.
  4. Specify how much of the drive you want to set aside for ReadyBoost.
  5. Click OK.

Disk quotas

Disk quotas let you specify a limit to the amount of disk space any user can use. This is useful if you have limited amount of disk space available. You can control how much disk space everyone uses, and ensure you have enough space available for the system for things such as application installation, system file storage and paging.

Configure disk quotas

You can configure disk quotas on the various disk volumes within your system. You can actually have two volumes on the same disk with different quotas.

To enable disk quotas, follow these steps:

  1. In the Disk Management MMC snap-in or Windows Explorer, right-click the volume for which you want to enable quotas and select Properties.
  2. Go to the Quota tab. (Note: If you’re using Windows Explorer, you’ll also have to click Show Quota Settings.)
  3. Check the box for Enable quota management. Once you’ve enabled quota management, there are several possible configuration options:
    • Deny disk space to users exceeding quota limit: If you select this option, once a user exceeds his quota, he will no longer be able to write to the disk. This will help prevent a user from going over his quota, but it can cause applications to perform improperly.
    • Limit disk space to: By default, disk space is unlimited. You can specify the limit for the amount of disk space the user can use.
    • Set warning level to: Once you set a disk space limitation, you can also set a warning level. This lets you specify at what level of disk usage the user will begin receiving disk-space warnings.
    • Log event when a user exceeds their quota limit: This specifies whether an event will be logged to the system log when the user exceeds his amount of allocated disk space.
    • Log event when a user exceeds their warning level: This specifies whether an event will be logged to the system log when a user exceeds the amount of disk space usage designated at the warning level.
    • Quota entries: This lets you specify quota options for different users and groups.

Besides these specific disk and file management tools, Windows 7 includes a variety of other local management tools. There’s the Control Panel, the MMC, the Computer Management Console, the Local Group Policy Editor and the Windows Registry. Each of these management tools provides a different function. They all come together to provide a total management solution for all aspects of your Windows 7 system.

Jorge Orchilles

Jorge Orchilles* began his networking career as a network administrator for the small private school he attended. He’s currently a security operating center analyst, and recently completed his Master of Science degree in management information systems at Florida International University.*

©2011 Elsevier Inc. All rights reserved. Printed with permission from Syngress, an imprint of Elsevier. Copyright 2011. “Microsoft Windows 7 Administrator’s Reference” by Jorge Orchilles. For more information on this title and other similar books, please visit elsevierdirect.com.