Introduction


Before you can start using a filesystem on a computer, you have to configure the disks, drives, and volumes. You have to split up the disks into volumes and assign drive letters to the volumes. You have to format a volume with a filesystem such as NTFS or FAT32. The filesystem you choose dictates the security, encryption, file storage efficiency, and performance of your file storage system.

Once you have usable volumes in place, there are many ongoing maintenance tasks you should do to keep your disks healthy. You'll want to periodically defragment your volumes so that new files aren't spread across many separate chunks, which decreases file access performance. You'll want to check your volumes for errors to ensure there aren't any bad sectors. And if you start running low on space, you may want to clean up a volume or see which users are using the most space. If disk space usage is a concern for you, you can implement the Windows quota feature that lets you limit the amount of space users' use. In this chapter we cover all of these tasks and more.

Using a Graphical User Interface

The two primary graphical interfaces for managing disks, drives, and volumes are Windows Explorer and the Disk Management MMC snap-in. With Windows Explorer, you can right-click a drive, select Properties, and perform functions such as enabling quotas, running disk cleanup, performing defragmentation, and running an error check of a volume.

The Disk Management snap-in lets you perform lower-level disk administration and volume management than Windows Explorer allows. With it you can create new volumes, assign drive letters, format volumes with a particular filesystem, and convert basic disks to dynamic disks. You can access this snap-in by opening the Computer Management snap-in in Administrative Tools and clicking on Disk Management in the left pane under Storage.

Using a Command-Line Interface

Several important new command-line utilities have been added to Windows XP to help with managing disks and volumes. diskpart and fsutil give you control over managing disks, drives, and volumes from the command line. These new tools also provide interfaces for running in batch mode, which make them easy to script.

Table 7-1 lists all the command-line tools used in this chapter.

Table 7-1. Command line tools used in Chapter 7

Tool

Location

Recipes

chkdsk

%SystemRoot%\system32

7.10

cleanmgr

%SystemRoot%\system32

7.7

compact

%SystemRoot%\system32

7.9

defrag

%SystemRoot%\system32

7.8

diruse

Windows Support Tools

7.14

diskpart

%SystemRoot%\system32

7.1-2, 7.5

diskperf

%SystemRoot%\system32

7.3

diskuse

Windows Resource Kit

7.14

format.com

%SystemRoot%\system32

7.4

fsutil

%SystemRoot%\system32

7.15-17

label

%SystemRoot%\system32

7.6

net

%SystemRoot%\system32

7.12

subst

%SystemRoot%\system32

7.13


Using Downloadable Software

Recipe 7-8 discusses a couple of third-party tools for defragmenting disks. Recipe 7-11 describes the free Joeware tool (i.e., http://www.joeware.net) called writeprot; with it you can make a disk read-only. Recipe 7-14 covers the DiskPie utility, which you can use to find large files and folders.

Using VBScript

Table 7-2 lists the WMI classes used in this chapter. The only WSH solution is the MapNetworkDrive method in Recipe 7-12.

Table 7-2. WMI classes used in Chapter 7

WMI class

Description

Recipes

CIM_Datafile

Enumerate and manage files.

7.14

Win32_Directory

Enumerate directories.

7.9

Win32_DiskDrive

Enumerate and manage physical disks.

7.1

Win32_DiskQuota

Enumerate the quota usage for a particular user.

7.16-17

Win32_LogicalDisk

Enumerate and manage logical disks.

7.1, 7.10, 7.16-17

Win32_MappedLogicalDisk

Enumerate and manage mapped network drives.

7.1

Win32_QuotaSetting

Enumerate and manage disk quota settings on volumes.

7.15




Windows XP Cookbook
Windows XP Cookbook (Cookbooks)
ISBN: 0596007256
EAN: 2147483647
Year: 2006
Pages: 408

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net