DISK MANAGEMENT





DISK MANAGEMENT

In this section, we examine disk storage types, partitions, and volumes, as well as NTFS disk-related features. The techniques include striping, mirroring, spanning, and RAID-5. We also look at disk quotas, compression, and defragmentation, along with remote storage, libraries, and tape/disk management.

NTFS and FAT/FAT32 Disk Management

NTFS and FAT/FAT32 file systems provide different features and levels of support with respect to disk management. NTFS is the preferred file system because of its expanded functionality. FAT/FAT32 is recommended on a partition only to get access to other Microsoft operating systems such as MS-DOS or Windows 95/98. Otherwise, NTFS should be used because the following features are not available under FAT/FAT32:

  • Compression

  • Dynamic volume configuration

  • Remote storage

  • Disk quotas

  • Mount points

  • Encryption

Disk Management Tools

Windows Server 2003 provides a number of snap-in tools that can be added to the Microsoft Management Console. Some are grouped for convenient system administration. Figure lists the standard functions in each snap-in.

Disk Management Snap-in Tools

Snap-in and Function Location

Function

Local Computer Policy Computer Configuration System Disk Quota

Sets policies for disk quotas on a local machine.

Default Domain Computer Configuration System Disk Quota

Sets policies for disk quotas on a local machine.

Computer Management Storage

Accesses Disk Management, Disk Fragmenter, Logical Drives, and Removal Storage tools.

Standalone Disk Management

Primary disk management tool.

Standalone Disk Fragmenter

Disk fragmentation.

Windows Server 2003 Support Tools Tools Disk Probe

Optional Resource Kit tools that permit examination and editing of disk sectors.

Standalone Removal Storage

Manages removal storage.

Hardware Wizard (available through Control Panel)

Adds/removes storage media.

NOTE

The Diskpart.exe command-line program provides all the functionality of the Disk Manager MMC via the command line. Diskpart also enables storage administrators to expand basic disks, a disk type used by Microsoft Cluster Services.


Disk Storage Types

Windows Server 2003 uses the Disk Management snap-in tool to view, administer, and migrate to disk storage types, partitions, and volumes.

Two disk storage types, basic and dynamic, are supported. The underlying difference between the two is the use of partitions versus volumes for disk management. Both are physical disks, but the basic type contains partitions, extended partitions, logical drivers, and an assortment of static volumes; the dynamic type does not use partitions but dynamically manages volumes and provides advanced storage options, as discussed later.

Partitions are divisions of physical space on the same disk. Volumes can consist of one or more disks or portions of them and must be of the same storage type. Windows Server 2003 initially installs the operating system using a basic disk format. Although the basic format works well, an upgrade to a dynamic disk is required to create spanned, striped, mirrored, or RAID-5 volumes.

UPGRADING A BASIC DISK TO A DYNAMIC DISK

The process of upgrading a disk to dynamic storage is very straightforward. However, several rules can affect this transformation, including the following:

  • In cases where a volume crosses multiple disks, all related disks must be upgraded.

  • Any operating system other than Windows Server 2003 located on a partition or volume will be rendered inoperable.

  • Removable media cannot be upgraded.

  • A basic disk with the boot partition cannot be upgraded; instead, it becomes a simple boot volume after the system is restarted.

  • When a boot partition is upgraded to a simple volume, it can be used to mirror a volume on another disk for redundancy.

The following steps should be taken to upgrade a disk from basic to dynamic:

  • Open the Disk Management snap-in from the MMC or from the Computer Management MMC.

  • Right-click the targeted basic disk, click Upgrade to Dynamic Disk, and follow the remaining steps as prompted.

CAUTION

This upgrade cannot be reversed without serious impact. The only way to return to partitions is to delete all dynamic volumes, so make sure you back up all information on the volumes first. Then use the Revert to Basic Disk command by repeating the procedure outlined in the previous example.


MANAGING PARTITIONS AND BASIC STORAGE

Basic storage provides backward compatibility with Windows NT 4.0 disk schemes. In an upgrade to Windows 2000 and Windows Server 2003, it is established on the existing partition. Windows NT 4.0 volumes can also be preserved using the Disk Management tool.

NOTE

It was possible to create striped and mirrored disk sets under Windows NT Server 4.0, but this is not the case with a Windows Server 2003 basic disk. Existing striped and mirrored volumes will be recognized after a Windows Server 2003 upgrade, but you will be restricted to repairing and deleting them. Creating new fault tolerance is reserved for dynamic disk volumes.


Windows Server 2003 basic disks can consist of up to four partitions on a physical drive, and extended partitions larger than 2 GB can be created, as can logical drives. This is done in the same fashion as on Windows NT Server 4.0, except that restarting the computer system is no longer necessary.

Partition Management

The Disk Management snap-in tool supports four primary basic partition and volume administration actions. The following summarizes how to accomplish the partition management tasks:

  • Formatting a partition. This is done through the Disk Management tool All Tasks Format. Although not recommended, you can use the Quick format to format the disk; however, Quick does not scan the disk for bad sectors, and when formatting, all data on the partition is lost.

  • Designating the partition as active. From the Disk Management tool, right-click the targeted partition and select the active (or primary) partition.

  • Assigning drive letters. Open the Disk Management tool, right-click the partition, select Change Drive Letter or Path, and make the designation. Up to 26 letters can be assigned, with drives A and B being reserved for floppy disks.

  • Deleting a partition. From the Disk Management tool, right-click the partition to be removed and select Delete Partition. Remember, this will destroy all the data on the partition.

MANAGING VOLUMES

Dynamic disk simple volumes cannot include partitions or logical drives. They are used strictly for Windows 2000 and Windows Server 2003, not Windows 95/98/NT or MS-DOS. Despite these restrictions, the dynamic disk system offers many advantages, including the ability to use spanned, striped, and mirrored volumes and RAID-5, as well as support of compression. A brief examination of each of these technologies should underscore dynamic disk volumes' inherent flexibility.

NTFS Compression

Compression of files and folders is an excellent way to use disk space efficiently. Although physical disk costs per storage unit continue to fall, it is still appropriate to use compression, especially for archival information.

NTFS file and folder compression is achieved by right-clicking the object in Windows Explorer, selecting Properties, and then selecting the General tab. As shown in Figure, the Advanced Attributes dialog box permits you to select Compress contents to save disk space, and the Confirmation window then permits you to apply the compression only to the current folder or to all subfolders with a check mark as appropriate. A file or folder can be uncompressed by removing the check mark. (You can also assign index attributes and encrypt the connects by selecting the appropriate item in this dialog box.) Compression ratios are generally higher for files such as those created by Word or Excel than for bitmap or graphic files. Applications are usually already optimized for size and generally result in minimal compression.

1. The Advanced File/Folder Screen

graphics/14fig01.gif

When moving and copying compressed files or folders within or between NTFS volumes, the compression state remains; however, when copying or moving an NTFS compressed file or folder to a FAT file system, the compression is lost and the file/folder returns to its normal size. Remember, compression is not supported in the FAT file system.

Spanned Volumes

Spanned volume technology is a method of combining free space on 1 to 32 physical disks into a single volume, with each spanned disk containing various amounts of available space. Storage is accomplished by filling the space on one disk and logically moving to each subsequent spanned disk as data storage is added. This involves the concatenation of data from one disk to another (Figure).

2. A Single 16-GB Spanned Volume Created from Smaller Volumes on Different Disks

graphics/14fig02.gif

CAUTION

Although spanned disks provide greater efficiency, they have two significant downsides. First, fault tolerance is not supported. Second, if one disk in a spanned disk volume fails, the entire volume fails. The only protection for this type of disaster is regular backups.


CREATING A SPANNED VOLUME

Spanned volumes are created from dynamic disks with the Disk Management tool with the following steps:

  1. Open the Disk Management snap-in tool.

  2. Right-click the unallocated volume to be spanned from the dynamic disks, then click Create Volume in Windows 2000 or New Volume in Windows 2003.

  3. In Windows 2000, the Create Volume wizard appears; in Windows Server 2003, the New Volume wizard appears. Click Next, then click Spanned Volume, and then follow the remaining instructions.

EXTENDING A SPANNED VOLUME

A spanned volume is extended through the Disk Management snap-in tool. First, the computer system must recognize the space on available disks. To make sure this is properly calculated, select the Action pull-down menu and select Rescan Disks. To actually expand the volume, right-click the spanned volume, select Extend Volume, and then follow the remaining instructions.

Managing Striped Volumes

Striped volumes are similar to spanned volumes in that both permit the use of available space up to 32 disks. However, unlike spanned volumes, which sequentially store data on disks, the striped logical volume distributes the information simultaneously across all its disks. Individual striped volumes are divided into fixed and ordered blocks. Because of this architecture, they have faster I/O.

A failure of a single disk will result in the loss of data on the entire logical striped volume. As discussed later, RAID-5 offers a fault-tolerant version of striped volumes.

A striped volume is created by following these steps:

  1. Open the Disk Management snap-in.

  2. Right-click unallocated space for the dynamic disks, then click Create Volume in Windows 2000 or New Volume in Windows Server 2003.

  3. In Windows 2000, the Create Volume wizard appears; in Windows Server 2003, the New Volume wizard appears. Click Next, click Striped Volume, and then follow the remaining instructions.

Managing Mirrored Volumes

A mirrored volume does exactly what its name implies by duplicating data on multiple physical disks. This fault-tolerant technology is highly recommended for mission-critical data stores. If one disk fails, the other disk continues to operate normally without data loss (Figure).

3. A Mirrored Volume Containing Duplicate Data

graphics/14fig03.gif

Mirrored volumes generally perform better than RAID-5 (discussed in the next section). Moreover, there is no loss of performance when one volume fails. A disadvantage is that mirrored volumes' use of the physical disk is less efficient. They require a minimum of two disks, whereas RAID-5 requires three. Mirrored volumes are created with the Disk Management tool from dynamic disks by following these steps:

  1. Open the Disk Management snap-in tool.

  2. Right-click the unallocated volume to be mirrored from the dynamic disks, and then click Create Volume in Windows 2000 or New Volume in Windows Server 2003.

  3. In Windows 2000, the Create Volume wizard appears; in Windows Server 2003, the New Volume wizard appears. Click Next, then Mirrored Volume, and follow the remaining instructions.

If one of the disks fails and you want to create another mirror, you must manually break the original mirror by using the Disk Management tool. The new mirror is created as in the preceding walk-through.

Managing RAID-5 Volumes

Known as a striped volume with parity under Windows NT, RAID-5 in Windows Server 2003 is a fault-tolerant volume across three or more disks, two of which duplicate the data while the third stores the parity information. If a portion of a disk fails, it can be reconstructed from the data and the parity of the remaining disks. This form of fault tolerance should be considered for environments where disk reading is intense. It is generally a better solution than mirrored volumes, which require a very high redundancy.

RAID-5 can be viewed as a compromise between full redundancy and disk utilization. Remember, mirroring is used for redundancy, striping for greater speed; thus, parity is the middle ground, providing single-bit protection for striped data. Generally, RAID-5 is used when some level of protection is desired but the cost of full mirroring is not justified.

RAID-5 volumes are created with the Disk Management tool from dynamic disks by following these steps:

  1. Open the Disk Management snap-in tool.

  2. Right-click the unallocated volume from the dynamic disks; click Create Volume in Windows 2000, New Volume in Windows Server 2003

  3. In Windows 2000, the Create Volume wizard appears; in Windows Server 2003, the New Volume wizard appears. Click Next, click RAID-5 Volume, and then follow the instructions.

The Disk Management Snap-in Tool

In the previous section, the Disk Management snap-in tool was explored as a way to administer spanned, striped, mirrored, and RAID-5 disk configurations, but it has additional functions. For this reason, it is appropriate to step back for a moment and review this tool in more generic terms.

The Disk Management tool can be added as a standalone Microsoft Management Console snap-in. It is also available as part of the Computer Management snap-in or by selecting Start Programs Administrative tool. As shown in Figure, the Disk Management node contains sections that detail various aspects of the system's storage devices. Hard drives, removable disks, CD-ROMs, and other devices are shown with current status and statistics. In the event that the system administrator doubts that this information is current, or if a new device was just added, clicking Rescan Disks on the Action menu will perform a reevaluation.

4. The Disk Management Snap-in

graphics/14fig04.jpg

In Figure the primary partition is a dark blue banner and the logical drive is a lighter blue. Extended partitions (not shown) are green.

Each partition, volume, or logical drive has unique properties. These properties can be viewed or modified by right-clicking the desired partition, volume, or logical drive and selecting Properties. The Local Disk Properties dialog box is divided into several sections, as shown in Figure.

5. NTFS Disk Properties Management

graphics/14fig05.jpg

DISK PROPERTIES OPTIONS WITH NTFS

The Disk Management tool options are different for NTFS and FAT/FAT32 file systems. Properties tabs for NTFS perform the administrative tasks listed here:

  • General. In addition to providing basic usage statistics, the administrator can compress the drive, allow the Indexing Service to index the disk for fast file searches, and clean up the disk by clicking Disk Cleanup.

  • Tools. These tools support error checking, backup, and disk defragmentation.

  • Hardware. This tab identifies storage devices. Via the Properties tab, new device drivers can be added through the appropriate dialog box.

  • Sharing. This tab lists the sharing status in addition to permissions and caching. New shares with associated permissions levels can also be created.

  • Shadow Copies. New to Windows Server 2003, shadow copies allow the viewing of contents in shared folders as contents existed at a previous time.

  • Web Sharing. This tab establishes whether the disk can be shared on the Web. By default, sharing is not allowed.

  • Quota. This tab enables quota management, as discussed in a later section.

  • Security. This tab establishes which users and groups have access to the disk at various permissions levels.

DISK PROPERTIES OPTIONS UNDER FAT/FAT32

The options available for FAT/FAT32 are more limited than those for NTFS. Its Properties tabs perform administrative tasks as follows (Figure):

  • General. In addition to providing basic usage statistics, the administrator can elect to compress the drive or allow the Indexing Service to index the disk for fast file searches.

  • Tools. These tools support error checking, backup, and disk defragmentation.

  • Hardware. This tab lists the identified storage devices. The Properties tab allows new device drivers to be added through the appropriate dialog box.

  • Sharing. This tab lists the current sharing status in addition to permissions and caching. New shares with associated permissions levels can also be created.

  • Web Sharing. This tab establishes whether the disk can be shared on the Web. The default allows no sharing.

6. FAT Disk Properties Management

graphics/14fig06.gif

DISK QUOTAS

Disk quotas are used to control unbridled storage of data. They can be applied on an individual or a systemwide basis, and permit the system administrator to limit the space allocated for storage of information on a given volume. Quotas are generally recommended. A user is notified when she approaches the maximum allowable disk space, at which point she can delete unwanted files. Alternatively, the user can request additional space for archiving files to backup media. In any case, greater control over disk space is achieved.

Applying Disk Quotas to All Users

Most system administrators initially set the same disk quotas for all system users. As illustrated in the next section, an individual user or group can then receive a unique quota as needed. Applying the same set of disk quotas for all users in a local system is achieved by following these steps:

  1. Open My Computer and right-click the volume (for example, drive D). Select Properties.

  2. Select the Quotas tab. Check Enable quota management.

  3. Complete the form as appropriate.

The Quotas tab (Figure) requires four decisions: first, whether quota management is to be enforced; second, whether to deny additional space if the quota is exceeded; third, the level at which the quota amount and warning must be set; and finally, the type of event logging required.

7. The Disk Quota Properties Tab

graphics/14fig07.jpg

NOTE

Most system administrators will not expressly deny the use of additional space. To deny a user the ability to save a file can result in hostility and loss of data. As an alternative, the system administrator should use the event-logging facility to determine where abuse might be occurring and then contact the user about disk use. Most users will take appropriate action. If a user continues to abuse privileges, then the more radical step of denial can be taken.


Applying disk quota policies to an entire domain is similar. Open the Default Domain snap-in for the target domain, select Computer Configuration, select Administrative Templates, select Disk Quotas, and configure each policy in the right pane.

Applying Disk Quotas to Individual Users

As with most things, there are exceptions to disk quotas. Once a global standard is set, it is possible to set limits for individuals or groups. Individual quotas are set by clicking Quota Entries in the Quota tab. The Quota Entries for Local Disk is then displayed, as shown in Figure. Select the Quota pull-down menu and then choose New Quota. Add the users and groups to which you want to apply individual quotas. In the dialog box, select the disk quota constraints to be applied.

8. Quota Entries

graphics/14fig08.gif

DISK FRAGMENTATION MANAGEMENT

Saved data is stored in the first available location on the physical drive. To make a drive its most efficient, a file can be broken up and stored in a number of locations—a process known as "fragmenting." This process ordinarily does not compromise file integrity because the parts are indexed for reassembly. When a large number of files are fragmented, however, indexing can affect performance. In this case, reconstructing a file may require several reads of the hard drive to find all the fragments. To correct fragmentation performance losses, a method known as "defragmentation" is provided to periodically "reorganize" the disk drive to gather the fragments.

Analyzing and Defragmenting a Drive

Defragmentation first collects information about the physical drive and the fragmented files. It then rewrites the disk to rejoin fragmented files in continuous blocks. The analysis and defragmentation of a drive is accomplished with the Disk Defragmenter snap-in tool (Figure) as follows:

  1. Open the Disk Defragmenter snap-in tool.

  2. Select Analyze for the target volume.

  3. After the analysis is complete, Windows Server 2003 will prompt you if defragmentation is appropriate. Select Defragment.

9. The Disk Defragmenter Snap-in Tool

graphics/14fig09.jpg

Removable Media and Library Management

The Removable Media snap-in tool assists in the identification, modification, and management of removable media libraries and devices like ZIP drives, CD-ROMs, and DVDs. As shown in Figure, removable storage deals with administration of Media, Media Pools, Libraries, Work Queue, and Operator Requests. The tool also permits the insertion and rejection of robotic library media. The Removable Storage tool supports the creation of media inventories, properties viewing, and mounting/dismounting.

10. The Removable Media Snap-in Tool

graphics/14fig10.gif

WORKING WITH LIBRARIES

In the context of this discussion, a library is the combination of storage media and devices that permit the reading and writing of a given removable medium. The type of media can vary widely. For example, in more sophisticated systems, a transport mechanism known as a robotic library (also called a tape or disc changer or jukebox) is used to locate and mount a piece of media into the read or into the read/write device. Depending on the robotic library's features, many other items can be managed with the Removable Media tool. The use of such devices is generally manufacturer dependent, so consult the user or administrative manuals for the device.

A much simpler type of library is the single media device that is not automatically loaded or changed, such as a CD-ROM, DVD player, or ZIP drive. The following examples are based on the use of such a simple, standalone library.

Enabling or Disabling a Library

The enabling or disabling of a library involves a few simple steps, as follows:

  1. Open the Removable Storage snap-in tool.

  2. Open the physical device console tree.

  3. Right-click the library component and select Properties.

  4. On the General tab, verify that Enable library is selected in order to enable this library, or remove the check to disable it (Figure).

    11. The Library Properties General Tab with a Library Enabled

    graphics/14fig11.gif

Changing the Media Type

Change the media type for a library as follows:

  1. Open the Removable Storage snap-in tool.

  2. Open the physical device console tree.

  3. Right-click the library component and select Properties.

  4. On the Media tab, select Change.

  5. In the Change Media Types dialog box, add or remove the media types as desired.

Initiating a Library Inventory

To create an inventory for the library, take the following steps:

  1. Open the Removable Storage snap-in tool.

  2. Open the physical device console tree.

  3. Right-click the library component and select Inventory.

Working with Media Pools

A media pool is any compilation of disks or tapes with the same administrative properties. Multiple media pools can be supported, but they must all be of the same type—disks and tapes cannot be mixed. More than one media pool constitutes a library, which can include media pools of different type and property settings. Since common properties are applied to a media pool, they can also be addressed with multiple libraries (Figure).

12. Creating a Media Pool

graphics/14fig12.gif

Creating a Media Pool

Media pools are created by following these steps:

  1. Open the Removable Storage snap-in tool.

  2. Right-click Media Pools and select New Media Pool.

  3. On the General tab, complete the Name and Description text boxes.

  4. On the General tab, select media from the Contains media of type drop-down list.

  5. On the General tab, set the Allocation/Deallocation policy desired.

Deleting an Application Media Pool

Application media pools are deleted by following these steps:

  1. Open the Removable Storage snap-in tool.

  2. Open the Media Pools console tree.

  3. Click the targeted media pool and select Delete.

Moving Media to Another Media Pool

To move media to another media pool, take the following steps. Remember that the media type and administrative properties of the pool to be moved must be the same as those of the destination media pool.

  1. Open the Removable Storage snap-in tool.

  2. Open the Media Pools console tree.

  3. Click Physical Locations and select the desired application library. Select Media.

  4. From the right details pane, drag and drop the tape or disk to the destination media pool.

OPERATOR REQUEST MANAGEMENT

The Removal Storage tool permits management of certain operator requests. The options include how to respond to requests, deleting requests from the log, canceling pending operations, and altering the mount order.

Responding to Operator Requests

Operator requests are stored for about an hour after they have been processed. To instruct Windows Server 2003 to respond to them, follow these steps:

  1. Open the Removable Storage snap-in tool.

  2. Open the Operator Requests console tree.

  3. In the right details pane, right-click the targeted request.

  4. To enforce the request, select Complete.

  5. To disregard the request, select Refuse.

Canceling a Pending Operations Request

If a request for a medium is incorrectly made or inappropriately timed, it can be canceled as follows:

  1. Open the Removable Storage snap-in tool.

  2. Open the Work Queue console tree.

  3. Right-click the request to be canceled and click Cancel Request (or Delete).

Changing the Mount Order of a Work Queue

Windows Server 2003 makes it easy to change the order in which tapes or disks are mounted. Follow these steps to change the mount order:

  1. Open the Removable Storage snap-in tool.

  2. In the details pane, right-click the mount operation and click Re-order Mounts.

  3. Through the Change Mount Order, select the medium and move it to the beginning, the end, or another location.

SECURING REMOVABLE STORAGE

The Removable Storage snap-in affords ways of determining which users have permission to use removal media and associated devices. The system administrator can add, modify, or delete users and their respective permissions by selecting the Securities tab of the media's or device's Properties. Refer to Chapter 9 for additional information regarding general permissions settings.

Remote Storage

The Remote Storage facility automatically archives the least used files to another device when space on the local partition or volume becomes tight. Remote storage occurs only when local disk space is required. When the file is needed again, it is retrieved and saved locally.

Remote storage is often maintained on removable storage libraries but always in the same media pool. This means that remotely stored data must all be on one media type with identical administrative properties. Optical disks are not supported for remote storage. Also note that retrieval of remotely stored files is only as fast as the storage device. Thus, if it is necessary to robotically find, mount, and read a tape, for example, the user can anticipate a low to moderate delay.

Remote storage is not automatically installed with the operating system but through the Windows Server 2003 Setup. After installation, it is necessary to verify that a sufficiently large and free media pool exists that is formatted for Windows Server 2003 NTFS.

The administrator establishes the rules and criteria for remote storage, and only those files that meet these specific policies will be eligible for movement. The Remote Storage tool provides a list of default inclusion and exclusion settings for files, which can also be removed or modified. Use the Remote Storage snap-in tool to manage file rules and associated tasks.


 Python   SQL   Java   php   Perl 
 game development   web development   internet   *nix   graphics   hardware 
 telecommunications   C++ 
 Flash   Active Directory   Windows