Lesson 1: Supporting and Troubleshooting Hard Disks


Hard disks are fixed storage devices that are connected to a computer by Integrated Device Electronics (IDE) or Small Computer System Interface (SCSI) controllers. Portable hard disks are also available, and they can be connected with universal serial bus (USB) and Institute of Electrical and Electronics Engineers (IEEE) 1394 interfaces. However, because Windows typically treats portable hard disks as removable storage devices, this lesson focuses on fixed hard disks. As a desktop support technician (DST), you must understand how to configure and troubleshoot hard disks in Windows XP. You should also be able to use the tools that Windows XP provides for managing, maintaining, and troubleshooting hard disks.

After this lesson, you will be able to

  • Explain the use of basic and dynamic disks.

  • Manage hard disks by using the Disk Management utility

  • Use the hard disk maintenance tools that are available in Windows XP.

Estimated lesson time: 70 minutes

Understanding Basic and Dynamic Disks

Windows XP Professional supports two types of hard disk storage: basic disks and dynamic disks. Windows XP Home Edition supports only basic disks. You cannot use dynamic disks on portable computers, even if they are running Windows XP Professional.

Exam Tip

When taking the exam, pay close attention to the operating system in use and the type of computer. Remember that you can only use dynamic disks on nonportable computers that are running Windows XP Professional.

Basic Disks

Basic disks are the traditional type of storage that is available in earlier versions of Windows. Basic disks are also the default storage type in Windows XP, so all hard disks begin as basic disks. Windows XP recognizes all disks as basic by default, including all new installations and upgrades from previous versions of Windows. To use a dynamic disk, you must convert a basic disk to a dynamic disk.

On a basic disk, you must create one or more partitions (also called basic volumes). Partitions were covered in detail in Chapter 2, “Installing Windows XP,” but a brief review is in order.

You must configure a basic disk with at least one partition. In fact, most computers that you will encounter have a single hard disk with one partition that takes up all the physical space on the disk. You can also divide a hard disk into multiple partitions for the purpose of organizing file storage or supporting multiple operating systems on a single computer. You can create the following three types of partitions on a basic hard disk:

  • Primary You can configure up to four primary partitions on a computer running a Windows operating system (three partitions if you also have an extended partition on the disk). You can configure any primary partition as the active, or bootable, drive, but only one primary partition is active at a time. Other primary drives are typically hidden from the operating system and are not assigned a drive letter.

  • Extended An extended partition provides a way to exceed the limit of four primary partitions. You cannot format an extended partition with any file system. Rather, extended partitions serve as a shell in which you can create any number of logical partitions.

  • Logical You can create any number of logical partitions inside an extended partition. Logical partitions are normally used for organizing files. All logical partitions are visible, no matter which operating system is started.

Microsoft introduced dynamic disks with Windows 2000, and Windows XP Professional supports dynamic disks. Instead of using partitions, you can divide dynamic disks into dynamic volumes, which support features that basic disks do not, such as the creation of more than four partitions per disk and volumes that span multiple hard disks.

You can extend partitions on dynamic disks, provided that contiguous disk space is available. However, partitions on basic disks cannot span multiple hard disks.

Windows stores partition information for basic disks in the partition table, which is not part of any operating system (it is an area of the drive that is accessible by all operating systems). Other configuration options, such as drive letter assignments, are controlled by the operating system and are stored in the Windows Registry.

Basic disks are generally sufficient for a computer with a single hard disk. Also, if a computer is configured to start multiple operating systems, you must use basic disks instead of dynamic disks.

Dynamic Disks

Windows XP Professional supports dynamic disks (dynamic disks are not supported in Windows XP Home Edition or on portable computers). Dynamic disks offer several advantages over basic disks:

  • You can divide a dynamic disk into many volumes. The basic disk concept of primary and extended partitions does not exist when using dynamic disks.

  • Windows stores configuration information for dynamic disks entirely on the disk. If there are multiple dynamic disks, Windows replicates information to all other disks so that each disk has a copy of the configuration information. This information is stored in the last 1 MB of the disk.

  • You can extend dynamic volumes by using contiguous or noncontiguous disk space. Dynamic volumes can also be made up of areas of disk space on more than one disk.

Windows XP supports the following types of dynamic volumes:

  • Simple volumes Contain disk space from a single disk and can be extended if necessary.

  • Spanned volumes Contain disk space from 2 or more (up to a maximum of 32) disks. The amount of disk space from each disk can vary. You will most often use spanned volumes when a simple volume is running low on disk space and you need to extend the volume by using space on another hard disk. You can continue to extend spanned volumes to include areas from additional hard disks as necessary. When Windows writes data to a spanned volume, it writes data to the area on the first disk until the area is filled, then to the area on the second disk, and so on. There is no fault tolerance in spanned volumes. If any of the disks containing the spanned volume fail, you lose all data in the entire spanned volume.

  • Striped volumes Contain disk space from 2 or more (up to a maximum of 32) disks. Unlike spanned volumes, striped volumes require that you use an identical amount of disk space from each disk. When Windows writes data to a striped volume, it divides the data into 64 KB chunks and writes to the disks in a fixed order. Thus, Windows will split a 128 KB file into two 64 KB chunks and then store each chunk on a separate disk. Striped volumes provide increased performance, because it is faster to read or write two smaller pieces of a file on two drives than to read or write the entire file on a single drive. However, you cannot extend striped volumes and they provide no fault tolerance. If any of the disks that contain the striped volume fail, you lose all data on the volume. Striped volumes are also referred to as RAID 0.

    Exam Tip

    Windows XP does not support fault-tolerant disk configurations. Spanned volumes simply allow you to use different amounts of disk space from multiple hard disks in a single volume. Striped volumes allow you use an identical amount of disk space from multiple hard disks. The advantage of using striped volumes is that Windows can write information to the disk more quickly.

Managing Hard Disks with the Disk Management Tool

As a DST, managing hard disks on users’ computers will be an important part of your job. You must be able to create volumes on hard disks and configure hard disks to suit users’ needs. You use the Disk Management tool to create and manage volumes on fixed and removable disks. You access Disk Management from within the Computer Management window, as shown in Figure 8-1. You can also access Computer Management by using the Administrative Tools icon in Control Panel or by right-clicking My Computer and selecting Manage.

click to expand
Figure 8-1: Use the Disk Management tool to manage fixed and removable storage.

Supporting Basic Disks

You make unallocated space on basic disks available to the operating system by creating a partition and then formatting that partition with the file system of your choice.

Creating a Primary Partition To create a primary partition, follow these steps:

  1. In Disk Management, right-click the unallocated space in which you want to create the primary partition, as shown in Figure 8-2, and then select New Partition.

    click to expand
    Figure 8-2: Creating a partition on a basic disk.

  2. On the Welcome page for the New Partition Wizard, click Next.

  3. On the Select Partition Type page, shown in Figure 8-3, choose Primary partition and click Next.

    click to expand
    Figure 8-3: Selecting a partition type on a basic disk.

  4. On the Specify Partition Size page, enter the amount of disk space in megabytes (MB) that you want to use for this partition and then click Next.

  5. On the Assign Drive Letter Or Path page, choose an available drive letter or a path for a volume mount point and click Next.

  6. On the Format Partition page, choose Format This Partition, select a file system, and then assign a volume label. Click Next.

  7. On the Completion page, click Finish to create and format the partition. Be patient: Windows must perform a number of functions, which can take several minutes.

Creating Extended Partitions To create an extended partition, follow these steps:

  1. In Disk Management, right-click the unallocated space in which you want to create the extended partition and select New Partition.

  2. On the Welcome page for the Create Partition Wizard, click Next.

  3. On the Select Partition Type page, choose Extended Partition and click Next.

  4. On the Specify Partition Size page, enter the amount of disk space in MB that you want to use for this partition and click Next.

  5. On the Completion page, click Finish to create the extended partition.

You are not prompted to assign a drive letter or to format an extended partition because the extended partition serves only as a shell to contain logical partitions. You will format and assign drive letters to logical partitions.

Creating Logical Drives To create a logical drive inside an extended partition, follow these steps:

  1. In Disk Management, right-click the free space in the extended partition where you want to create the logical drive and select Create Logical Drive.

  2. On the Welcome page for the Create Partition Wizard, click Next.

  3. On the Select Partition Type page, choose Logical Drive and click Next.

  4. On the Specify Partition Size page, enter the amount of disk space in MB that you want to use for this logical drive and click Next.

  5. On the Assign Drive Letter Or Path page, choose an available drive letter and click Next.

  6. On the Format Partition page, choose Format This Partition, select a file system, and then assign a volume label. Click Next.

  7. On the completion page, click Finish to create and format the logical drive.

Figure 8-4 shows an extended partition on Disk 1, containing a 502 MB logical drive, and 612 MB of remaining free space.

click to expand
Figure 8-4: Viewing extended and logical partitions in Disk Management.

Formatting Volumes

Formatting a basic or dynamic volume with a file system prepares the volume to accept data. Unformatted volumes contain no file system and are not accessible by using Windows Explorer or any other application.

You can format volumes in the following ways:

  • By using Disk Management and formatting the new volume as it is being created

  • By using Disk Management, right-clicking an existing volume, and then selecting Format

  • By using Windows Explorer, right-clicking the drive letter, and then selecting Format

  • By using a command prompt, using the Format.exe command, and selecting the appropriate parameters

If you format an existing volume that contains data, all data is lost. Windows XP protects itself by preventing you from formatting the system and boot partition for the operating system by using any of the built-in Windows utilities.

Formatting options, shown in Figure 8-5, include the following:

  • Volume Label The character name for a volume of up to 11 characters. This is the name that is displayed in Disk Management and Windows Explorer. You should choose a label that describes the type of information that is stored on the volume, such as System for the volume that contains the operating system or Documents for a volume that contains user documents.

  • File System Allows you choose from the FAT (for FAT16), FAT32, or NTFS file systems (see Chapter 2 for more information on file systems).

  • Allocation Unit Size Allows you change the default cluster size for any of the file systems. Microsoft recommends leaving this value at its default setting.

  • Perform A Quick Format Specifies that you want to format the drive without having Windows perform an exhaustive scan of the drive to check for bad sectors. Select this option only if you have previously performed a full format and are certain that the disk is not damaged.

  • Enable File And Folder CompressionSpecifies that all files placed on the disk will be compressed by default. Compression is always available on an NTFS volume, and you can enable or disable it at any time through the properties of the files and folders on the volume. File And Folder Compression is available only when you format a volume with NTFS.


    Figure 8-5: Formatting a partition using the Disk Management tool.

Assigning Drive Letters to Volumes

When you create a basic or dynamic volume, you assign it a drive letter, such as C or D. The drive letter is used to access the volume through Windows Explorer and other applications. Floppy drives, CD-ROM and DVD drives, removable drives, and tape devices are also assigned drive letters.

To change the currently assigned drive letter for a volume, right-click the volume in Disk Management, select Change Drive Letter And Paths from the action menu, and then click Change. Note that you can change a volume only to a drive letter that is not already being used.

Note

Windows XP does not allow you to modify the drive letter for the system and boot partitions.

Using Volume Mount Points

Windows XP also allows you to mount a volume by using a path instead of assigning a drive letter. For example, you could create a folder named C:\Data. You could then assign the C:\Data path to a new volume labeled Data. When you open the C:\Data folder within Windows Explorer, you would actually see the information that is stored on the Data volume. This type of volume is referred to as a mounted volume, and the folder that the mounted volume is attached to is referred to as a volume mount point. You can create multiple volume mount points for a single volume. You can dismount and move a mounted volume to another volume mount point if necessary.

Mounted volumes provide a method of extending the perceived available space on an existing volume without extending the volume’s actual size. Technically, a mounted volume is a separate volume, but in the user’s eyes it appears to be an extension of an existing volume. Therefore, you can use mounted volumes to increase the amount of disk space that is available on a basic volume to include disk space on another hard disk (remember that you cannot actually extend a basic volume to include space on another disk). Also, mounted volumes provide a method for managing multiple volumes of information from the same drive letter.

Volume mount points are supported on NTFS volumes only. The volume that is being mounted can be formatted with any supported file system.

To add a mounted volume to an existing volume, follow these steps:

  1. By using Windows Explorer, create a folder on an NTFS volume to serve as the volume mount point.

  2. In Disk Management, locate the volume for which you want to modify the drive letter or path information.

  3. Right-click the volume and select Change Drive Letter And Paths from the action menu.

  4. In the Change Drive Letter And Paths For New Volume dialog box, click Add to create a new mounted volume.

  5. In the Add New Drive Letter Or Path dialog box, choose Mount In The Following Empty NTFS Folder and enter the path to the volume mount point, as shown in Figure 8-6.

    click to expand
    Figure 8-6: Mounting a volume into the C:\mounted folder.

  6. Click OK and then click Close.

Mounted volume paths have a different icon in Windows Explorer, as shown in Figure 8-7, and are represented by the <JUNCTION> identifier when viewed at a command prompt, as shown in Figure 8-8.

click to expand
Figure 8-7: Viewing a volume mount point in Windows Explorer (C:\mounted).

click to expand
Figure 8-8: Viewing a volume mount point at a command prompt (C:\mounted).

The following list contains some additional information about drive letters and paths:

  • You cannot assign multiple drive letters to a single volume.

  • You cannot assign the same drive letter to multiple volumes on the same computer.

  • You can mount a volume into multiple paths simultaneously.

  • A volume can exist without a drive letter or mount path assigned; however, the volume will not be accessible by applications.

Converting a Basic Disk to a Dynamic Disk

All disks are basic disks by default. When you need to take advantage of the functionality that dynamic disks provide, you must convert the basic disks to dynamic disks (remember that this feature is available only in Windows XP Professional and that you cannot use dynamic disks on portable computers). You can convert a basic disk to a dynamic disk without losing existing data.

For the conversion to be successful, there must be at least 1 MB of free, unpartitioned space available on the basic disk. This 1 MB is necessary to store the dynamic disk database, which tracks the configuration of all dynamic disks in the computer. If Windows XP Professional created the existing partitions, it will have automatically reserved the 1 MB of space required for the conversion. If another operating system or a third- party utility program created the partitions prior to upgrading, there is a chance that no free space is available. In that case, you will probably have to repartition the drive so that 1 MB of space is reserved as blank space.

During the conversion, all primary and extended partitions become simple dynamic volumes, and the disk will join the local disk group and receive a copy of the dynamic disk database.

Caution

Recall that after disks have been upgraded to dynamic disks, supporting multiple operating systems is no longer an option.

To convert a basic disk to a dynamic disk, follow these steps:

  1. In Disk Management, right-click the basic disk that you want to convert and select Convert To Dynamic Disk, as shown in Figure 8-9. Make sure that you right-click the actual disk, not one of the partitions on the disk.

    click to expand
    Figure 8-9: Use Disk Management to convert a basic disk to a dynamic disk.

  2. In the Convert To Dynamic Disk dialog box, verify the disks that you want to convert and then click OK.

  3. In the Disks To Convert dialog box, click Convert and then click Yes to confirm.

Windows returns you to the Disk Management tool and begins the conversion.

Note

If the disk contains the system or boot volume or any part of the paging file, you need to restart the computer before the conversion process is complete.

You can verify that Windows completed the conversion by viewing the disk type in Disk Management, as shown in Figure 8-10.

click to expand
Figure 8-10: The dynamic disk type is displayed in Disk Management.

If you right-click the disk and do not see the Convert To Dynamic Disk option, one of the following conditions may exist:

  • The disk has already been converted to dynamic.

  • You have right-clicked a volume instead of the disk.

  • The disk is in a portable computer. Portable computers do not support dynamic disks.

  • There is not 1 MB of available space at the end of the disk to hold the dynamic disk database.

  • The disk is a removable disk, such as a Zip disk or a detachable USB disk device. Dynamic disks are not supported on removable disks.

  • The sector size on the disk is larger than 512 bytes. Windows XP Professional supports dynamic disks only on disks with a sector size of 512 bytes. The vast majority of hard disks use this sector size.

Reverting from a Dynamic Disk to a Basic Disk

To make a dynamic disk locally accessible by an operating system other than Windows XP Professional (for example, to allow a computer running Windows 98 to access the hard disk when you install the hard disk in that computer), you must convert the dynamic disk back to a basic disk. Data is not preserved when reverting to a basic disk; the downgrade process requires that all data be removed from the disk.

Note

Whether a disk is dynamic or basic has no effect on whether clients running any operating system can connect to shared folders on that disk remotely over the network. Computers running previous versions of Windows cannot locally access a dynamic disk when you install the disk into the computer.

To revert from a dynamic disk back to a basic disk, follow these general steps:

  1. Back up all files and folders on the entire disk.

  2. In Disk Management, delete all the volumes from the disk.

  3. Right-click the dynamic disk you want to convert and select Revert To Basic Disk.

  4. Follow the onscreen instructions.

  5. Create an appropriate partition scheme on the disk and format the newly created drives.

  6. Restore data as necessary.

    Exam Tip

    When you convert a basic disk to a dynamic disk, data on the disk is preserved. When you revert a dynamic disk to a basic disk, data on the disk is lost.

Creating a Simple Dynamic Volume

A simple dynamic volume contains space on a single disk. Although similar to a primary basic volume, there are no limits to how many simple volumes you can create on a single disk.

To create a simple volume, follow these steps:

  1. In Disk Management, right-click the unallocated space on which you want to create the simple volume and then select Create Volume.

  2. On the first page of the Create Volume Wizard, click Next.

  3. On the Select Volume Type page, select Simple Volume and click Next.

  4. On the Select Disks page, enter the desired size in MB and click Next.

  5. On the Assign A Drive Letter Or Path page, select a drive letter or enter a path for a mounted volume, and then click Next.

  6. On the Format Volume page, select the file system and enter a volume label. Click Next.

  7. On the Completion page, click Finish to create the volume.

Creating a Striped Dynamic Volume

Striped volumes can contain from 2 to 32 disks. Data is written to and read from multiple disks simultaneously, increasing disk performance. Data is written (striped) in 64 KB blocks. Striped volumes do not provide any fault tolerance. If one or more of the disks in a striped volume fails, all data on the entire volume is lost. Striped volumes are also known as RAID 0.

To create a striped volume, complete the following steps:

  1. In Disk Management, right-click the unallocated space on one of the disks on which you want to create the striped volume and select Create Volume.

  2. On the first page of the Create Volume Wizard, click Next.

  3. On the Select Volume Type page, select Striped Volume and click Next.

  4. On the Select Disks page, select the disks to be included in the striped volume. Adjust the size of the striped volume accordingly and then click Next.

  5. On the Assign A Drive Letter Or Path page, select a drive letter or enter a path for a mounted volume and then click Next.

  6. On the Format Volume page, select the file system and enter a volume label. Click Next.

  7. On the Completion page, click Finish to create the volume.

The amount of disk space that is consumed on each disk in the striped volume must be equal. The disk with the smallest amount of available space limits the maximum amount of space available on a striped volume. For example, assume that you have the following drive configuration on your computer:

  • Disk 0—No space available

  • Disk 1—2 GB available

  • Disk 2—2 GB available

  • Disk 3—1 GB available

If you attempt to create a striped volume with Disks 1, 2, and 3, the maximum volume size that you can create is 3 GB. Because Disk 3 has only 1 GB of space available, you are limited to using only 1 GB from each of the disks in the set. However, if you create a striped volume using only Disks 1 and 2, the maximum volume size you can create is 4 GB because both disks have 2 GB of available space.

Extending Volumes

Windows XP Professional supports extending volumes on both basic and dynamic disks, whereas Windows XP Home Edition supports extending volumes only on basic disks. You extend volumes on basic disks by using the DiskPart command-line utility. You can extend volumes on dynamic disks using either the Disk Management utility or the DiskPart command-line utility.

Extending Volumes on Basic Disks You can extend primary partitions and logical drives on basic disks if the following conditions are met:

  • The volume to be extended is formatted with NTFS.

  • The volume is extended into contiguous, unallocated space (adjacent free space) that follows the existing volume (as opposed to coming before it).

  • The volume is extended on the same hard disk. Volumes on basic disks cannot be extended to include disk space on another hard disk.

  • The volume is not the system or boot volume. The system or boot volumes cannot be extended.

You extend volumes by running the DiskPart utility from the command line, selecting the appropriate volume, and then executing the following command:

 extend [size=n] [noerr] 
See Also

For further information on the use of DiskPart, refer to the section entitled “Managing Disks from the Command Line” later in this chapter.

Extending Volumes on Dynamic Disks You can extend a simple volume as long as it has been formatted with NTFS. You do this by attaching additional unallocated space from the same disk, or from a different disk, to an existing simple volume. Disk space that is used to extend a simple volume does not have to be contiguous. If the additional space comes from a different disk, the volume becomes a spanned volume. Spanned volumes can contain disk space from 2 to 32 disks.

If the volume is not formatted with NTFS, you must convert the volume to NTFS before you can extend it.

You extend simple volumes by using Disk Management or the DiskPart command-line utility. Perform extensions of simple volumes with DiskPart the same way that you perform extensions of basic volumes.

To extend a simple volume using Disk Management, follow these steps:

  1. In Disk Management, right-click the simple volume that you want to extend and select Extend Volume.

  2. On the first page of the Extend Volume Wizard, click Next.

  3. On the Select Disks page, select the disk(s) that contain free space that you want to attach to this volume, enter the amount of space for each disk, and then click Next.

  4. On the Completion page, click Finish to extend the volume.

Figure 8-11 shows the Select Disks page on a single-drive system. In this case, the maximum available space on the selected disk that you can use to extend the volume is 2048 MB.

click to expand
Figure 8-11: Extending a simple dynamic volume in Disk Management.

You are not prompted for any information concerning drive lettering or formatting because the added space assumes the same properties as the existing volume.

Moving Disks

If a computer fails but the hard disks are still functional, you can install the disks into another computer to ensure that the data is still accessible. However, you need to consider the following issues that are associated with moving disks:

  • You cannot move dynamic disks to computers running Windows 95, Windows 98, Windows Millennium Edition (Windows Me), Windows NT 4.0 or earlier, or Windows XP Home Edition because these operating systems do not support dynamic disks. To move a disk to these operating systems, you must first convert it to a basic disk.

  • When moving spanned or striped volumes, move all disks that are associated with the volume at the same time. If one disk is missing from a spanned or striped volume, none of the data on the entire volume is accessible.

  • Windows XP Professional does not support volume sets or stripe sets that were created in Windows NT 4.0. You must back up the data, delete the volumes, install the disks into the Windows XP Professional computer, create new volumes, and then restore the data. Alternatively, you can install the disks into a computer running Windows 2000 (which does support Windows NT volume and stripe sets), convert the disks to dynamic disks (which converts volume sets to spanned volumes and stripe sets to striped volumes), and then install the disks into a computer running Windows XP Professional.

After moving disks, the disks appear in Disk Management on the new computer. Basic disks are immediately accessible. Dynamic disks initially appear as foreign disks and need to be imported before you can access them.

Importing Foreign Disks

All dynamic disks on a computer running Windows XP Professional are members of the same disk group. Each disk in the group contains the dynamic disk database for the entire group, stored in the 1 MB reserved disk area at the end of the disk. When you move a dynamic disk from one computer to another, Windows displays it as a foreign disk because it does not belong to the local disk group. You must import foreign disks, which merges the disk’s information into the dynamic disk database on the new computer and places a copy of the database on the newly installed disk.

To import a foreign disk, follow these steps:

  1. In Disk Management, right-click the disk that is marked Foreign and select Import Foreign Disks from the action menu.

  2. Select the disk group that you want to import (there may be more than one foreign disk group if you have moved multiple disks from different computers into the same computer running Windows XP Professional).

  3. In the Foreign Disk Volumes dialog box, review the information to ensure that the condition for the volumes in the disk group being imported is displayed as OK. If all the disks for a spanned or striped volume are not present, the condition is displayed as incomplete. You should resolve incomplete volume conditions before continuing with the import.

  4. If you are satisfied with the information that is in the Foreign Disk Volumes dialog box, click OK to import the disks.

Removing Disks from the Dynamic Disk Database

If you remove a dynamic disk from a computer running Windows XP, Disk Management displays the disk as either Offline or Missing because the disk’s configuration is still present in the dynamic disk database stored on the other disks on the computer. You can remove the missing disk’s configuration from the dynamic disk database by right-clicking the disk and selecting Remove Disk.

Managing Disks Remotely

You can perform disk functions on a remote computer by connecting to that computer through Computer Management. To connect to a remote computer in Computer Management, follow these steps:

  1. From the Start menu, right-click My Computer and select Manage to open the Computer Management window.

  2. In the Computer Management window, right-click Computer Management and select Connect To Another Computer from the action menu, as shown in Figure 8-12.

    click to expand
    Figure 8-12: Connecting to another computer in Computer Management.

  3. In the Select Computer dialog box, select the computer that you want to manage remotely and then click OK. Computer Management displays the remote computer’s information, and you can manage the disks on that computer by using the Disk Management tool.

Managing Disks from the Command Line

You can use the Diskpart.exe command to execute disk-management tasks from a command prompt and to create scripts for automating those tasks that you need to perform frequently or on multiple computers.

Executing DiskPart from a command prompt opens the DiskPart command interpreter. When you are in the DiskPart command interpreter, the command prompt changes to DISKPART>. You can view available commands for the DiskPart tool by typing commands at the DiskPart command prompt, as shown in Figure 8-13. Note that you use the Exit command to close the DiskPart command interpreter and return to the normal command prompt.

click to expand
Figure 8-13: Viewing DiskPart command options.

One feature that is not available in DiskPart is the capability to format volumes. To format volumes, you must use the Format.exe command from the standard command prompt.

Maintaining Disks3

The Windows XP Professional operating system includes several utilities for maintaining hard disks. This section covers the following utilities:

  • Chkdsk.exe

  • Disk Defragmenter

  • Disk Cleanup

Performing Error Checking by Using Chkdsk.exe

In Windows XP, you perform error checking on hard disks by using the Chkdsk.exe command-line utility. Chkdsk verifies and repairs the integrity of the file system on a volume. If file system errors are detected on a volume, Chkdsk schedules itself to run automatically the next time Windows XP is started and fixes the errors. As a DST, you should encourage users to run Chkdsk periodically. You should also use Chkdsk as one of your initial troubleshooting steps when you suspect a hard disk problem.

You can run Chkdsk with or without additional parameters. When you simply type chkdsk at the command prompt with no additional parameters, Chkdsk analyzes the disk and generates a report, but does not repair errors. To fix errors, you must use one of the following additional parameters:

  • /f Locks a volume and fixes errors, scheduling a repair on the next restart if the volume contains files currently in use.

  • /r Locks a volume, locates bad sectors, and recovers readable information.

Chkdsk can take a long time to repair a volume. When a volume is being repaired, it is locked and inaccessible. If Chkdsk cannot lock the volume, it will offer to repair the volume at the next computer restart. The boot volume can never be locked while the computer is up and running, and you can repair it only by restarting the computer.

In addition to command-line Chkdsk, Windows also provides a graphical utility. To access the graphical version of Chkdsk, shown in Figure 8-14, right-click the volume letter in Windows Explorer, select the Tools tab, and in the Error-Checking section, click Check Now.


Figure 8-14: Using the graphical version of Chkdsk.

start sidebar
Real World—Autochk.exe and Chkntfs.exe

The Autochk.exe command-line utility is the version of Chkdsk that runs only when Windows XP starts. Autochk is used instead of Chkdsk in the following situations:

  • When a file system error is detected and a volume needs repair

  • When Chkdsk is run on the boot volume

  • When Chkdsk cannot gain exclusive use of the volume

    Normally, when Chkdsk is run on a volume other than the system or boot partition, it dismounts the volume, locks it, and proceeds. However, if Chkdsk cannot dismount the volume (normally because one or more files cannot be closed), you are prompted to run Autochk at next startup.

    When Autochk runs, the computer can be unavailable for a significant time. The Chkntfs.exe command-line utility enables you to control which volumes will be checked by Autochk. If Autochk is scheduled to scan hard disks the next time the computer starts, you can use Chkntfs prior to restarting to perform the following tasks:

  • Check the status of volumes

  • Exclude dirty volumes from being checked by Autochk

  • Cancel scheduled Autochk sessions

end sidebar

Using the Disk Defragmenter

Fragmented files and folders are stored in locations scattered throughout the disk rather than in one contiguous location. The more fragmented a file or folder is, the more reads it takes to access, and the more Windows performance suffers. Fragmentation generally occurs when files are frequently added and removed from the disk or when the disk begins to fill up. In both of these cases, it can be difficult for the operating system to locate a contiguous area of the disk to write to, and data can become fragmented.

Defragmentation refers to the process of rearranging the various pieces of files and folders on the disk into contiguous spaces, thereby improving performance. In Windows XP, you use the Disk Defragmenter tool to defragment hard disks. In addition to defragmenting the existing files and folders, Disk Defragmenter can also consolidate free space, making it less likely that a new file or folder will become fragmented in the near future.

You access Disk Defragmenter from the Start menu by selecting All Programs, Accessories, System Tools, and then Disk Defragmenter. This utility first performs an analysis of the selected volume and lets you know if the drive would benefit from being defragmented.

Figure 8-15 shows a Disk Defragmenter Analysis Report. In this case, the disk is significantly fragmented (23%) and would benefit from defragmentation.

click to expand
Figure 8-15: Viewing a Disk Defragmenter analysis report.

A defragmentation in process is shown in Figure 8-16. The Analysis display gives an indication of the amount and location of fragmented files. The Defragmentation display shows the progress that is being made as the defragmentation progresses.

click to expand
Figure 8-16: Viewing a defragmentation in process.

Windows XP also provides a command-line version of Disk Defragmenter, called Defrag.exe. Figure 8-17 shows the parameters available with Defrag.exe.

click to expand
Figure 8-17: Viewing the Defrag.exe command-line parameters.

For optimal performance, you should perform disk defragmentation in the following circumstances:

  • After you have deleted a large number of files, to defragment and consolidate disk space.

  • Before you add a large number of files, to ensure that the newly added files occupy contiguous disk space.

  • After installing application programs, to defragment and consolidate disk space. Application programs can use temporary files during installation. After these files are deleted, disk space allocation is no longer optimal.

  • After installing Windows XP, to ensure optimal operating system performance.

Disk defragmentation is best performed during periods of low system activity. Prior to running Disk Defragmenter, consider deleting unnecessary files to free up disk space and to minimize the work that Disk Defragmenter has to do.

Disk Cleanup

If a computer is getting low on available hard disk space, you can delete certain types of files to create more available space. Users may not be aware of which files they can delete safely, so Windows includes the Disk Cleanup utility to help with this process.

You access the Disk Cleanup utility, shown in Figure 8-18, from the Start menu by selecting All Programs, Accessories, System Tools, and then Disk Cleanup. When you start Disk Cleanup, the utility calculates the amount of space that you can gain by deleting selected items. The following list describes the most common options in Disk Cleanup:

  • Downloaded Program Files Files that have been downloaded from the Internet and stored in the Downloaded Program Files folder on the hard disk.

  • Temporary Internet Files Copies of previously visited Web pages that are stored on the hard disk for faster access the next time you need to view the same Web pages.

  • Recycle Bin Files that have been deleted but not yet removed from the hard disk.

  • Temporary Files Files that are used for temporary workspace by any number of applications and that are usually stored in the TEMP folder. Temporary files are supposed to be deleted by the application that created them, but that does not always happen.

  • Temporary Offline Files Files that have been cached locally for use when the network is offline. You can remove them from the computer, but synchronize beforehand to ensure that all changes have been copied to the network.

  • Compress Old Files Compresses infrequently used files on NTFS partitions, which often saves a significant amount of disk space.

    click to expand
    Figure 8-18: Using the Disk Cleanup utility to delete unnecessary files.

    Tip

    The Disk Cleanup options list is built dynamically, based on the types of data present in the computer when the utility is started. Therefore, this example does not represent all the options you may encounter—only the most common ones.

To delete any of the listed items, you must select the item. As you select items for deletion, Disk Cleanup displays the total amount of disk space that you will gain. By default, only Downloaded Program Files, Temporary Internet Files, and Temporary Offline Files are selected for deletion.

Troubleshooting Disks and Volumes

Disk Management displays the status of each disk and volume. If you refer to Figure 8- 1, you notice that all disks are online and all volumes are showing the desired status of Healthy.

Disk status types are as follows:

  • Online Displayed by basic and dynamic disks. The disk is accessible. No user action is required.

  • Online (Errors) Displayed by dynamic disks only. The disk is accessible, but input/output (I/O) errors have been detected. If the I/O errors are intermittent, right-click the disk and select Reactivate Disk. This normally returns the disk to Online status.

  • Offline Or Missing Displayed by dynamic disks only. This disk is not accessible. Attempt to rescan the disks on the computer by selecting Rescan Disks from the Action menu in Disk Management. If the scan is unsuccessful, look for a physical reason for the drive failure (cables disconnected, no power to disk, failed disk). If you must replace a failed drive, first delete all volumes on the disk and then right-click the disk and select Remove Disk.

  • Foreign Displayed by dynamic disks only. The disk has been moved to this computer from another computer. Right-click the disk and select Import Foreign Disk. If you do not want to keep the information on the disk, you can select Convert To Basic Disk, and all information on the disk will be lost.

  • Unreadable Displayed by basic and dynamic disks. The disk is not accessible. Disks may show this status while they are initializing. If a disk continues to show this status, the disk may have failed entirely. Restart the computer to determine whether the disk will become accessible. If it is a dynamic disk, attempt to repair the disk by right-clicking it and selecting Rescan Disks.

  • Unrecognized The disk is an unknown type, and Windows XP cannot recognize it.

  • No Media This status is on drives with removable media, such as a CD-ROM drive, when the drive is empty.

Volume status types and the recommended action (if required) are as follows:

  • Healthy The volume is accessible and has no detected problems.

  • Healthy (At Risk) If the disk status is Online (Errors), the volumes will be accessible, but all volumes will display this status. Restoring the disk to Online will clear this status from the volume.

  • Initializing The volume is in the process of initializing. No action is required. Once the initialization is complete, the volume should show a status of Healthy.

Practice: Manage Hard Disks

In this practice, you will check the status of existing volumes on your computer using Disk Management and also change the drive letter for a volume. You will use Disk Cleanup to delete unnecessary files from a volume and then defragment a volume using Disk Defragmenter.

Exercise 1: Check the Status of Existing Volumes

start example
  1. From the Start menu, right-click My Computer and then select Manage.

  2. In the Computer Management window, select Disk Management.

  3. After the Disk Management display initializes, record the description in the Status column for each volume on your computer.

end example

Exercise 2: Change the Drive Letter for a Volume

start example
  1. From the Start menu, right-click My Computer and then select Manage.

  2. In the Computer Management window, select Disk Management.

  3. Right-click a volume in the Disk Management display and select Change Drive Letter And Paths.

  4. In the Change Drive Letter And Paths dialog box, click Change.

  5. In the Change Drive Letter Or Path dialog box, select a new drive letter from the Assign The Following Drive letter drop-down list and then click OK.

  6. Click OK again to return to the Disk Management window.

end example

Exercise 3: Run Disk Cleanup

start example
  1. From the Start menu, point to All Programs, Accessories, System Tools, and then select Disk Cleanup. Disk Cleanup often takes a few minutes to open because it first calculates how much space you can free up on the computer’s disk drive.

  2. In the Select Drive dialog box, select the volume to clean up from the drop-down list. Click OK.

  3. In the Disk Cleanup dialog box, review the files to be deleted. Click OK when finished.

  4. Click Yes to verify that you want to perform these actions.

end example

Exercise 4: Defragment a Volume

start example
  1. Close all open programs.

  2. Turn off screen savers and antivirus software.

  3. From the Start menu, point to All Programs, Accessories, System Tools, and then select Disk Defragmenter.

  4. Select a volume from the list and click Analyze. After several minutes, Disk Defragmenter shows you the analysis of the volume.

  5. If the volume is significantly fragmented (more than 10%), click Defragment to begin the defragmenting process. Note that this process can take quite awhile (even a few hours), depending on the size of the volume and the amount of data it contains.

end example

Lesson Review

The following questions are intended to reinforce key information presented in this lesson. If you are unable to answer a question, review the lesson materials and try the question again. You can find answers to the questions in the “Questions and Answers” section at the end of this chapter.

  1. What is the process of rearranging files and folders into contiguous blocks called?

  2. On what types of computers can you use dynamic disks?

  3. What actions must you take to revert from a dynamic disk to a basic disk? What limitations does this process impose?

Lesson Summary

  • Windows XP Professional provides the Disk Management utility to configure, manage, and monitor hard disks and volumes. Using this utility, you can accomplish tasks such as the creation and formatting of volumes, moving disks from one computer to another, and remote disk management. You can use additional disk utilities such as Disk Defragmenter and Chkdsk to ensure optimal disk performance.

  • Windows XP Professional supports two types of disk storage: basic disks and dynamic disks. Windows XP Home Edition and portable computers support only basic disks.

  • All disks are basic disks by default. When you need to take advantage of the functionality that dynamic disks provide, you must upgrade the basic disks to dynamic disks (remember that this feature is available only in Windows XP Professional and Windows 2000 Professional). You can perform this operation with no loss of data.

  • You must format a volume before it can accept data, and each volume can be formatted with only a single file system. Volumes are usually assigned drive letters, such as C or D, which are used to reference the volume from within the operating system and through applications.

  • Mounted volumes provide a method of extending the perceived available space on an existing volume without extending the volume’s size. Technically, a mounted volume is a separate volume, but in the user’s eyes it appears to be an extension of an existing volume.




MCDST Self-Paced Training Exam 70-271(c) Supporting Users and Troubleshooting a Micro[... ]ystem
MCDST Self-Paced Training Exam 70-271(c) Supporting Users and Troubleshooting a Micro[... ]ystem
ISBN: N/A
EAN: N/A
Year: 2006
Pages: 195

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