Implementing Disk Management in Windows Server 2008
- 4/16/2008
- Understanding Disk Terminology
- Overview of Disk Management
- Partitions and Volumes
- Setting Disk Quotas
- Enabling File Encryption
- Summary
Overview of Disk Management
While solid state and hybrid disks are starting to find their way into laptops and even some desktops, conventional hard disk storage continues to be the long-term storage method of choice for modern computers, from the mainframe to the desktop. In Windows Server 2008, you must first initialize this conventional hard disk storage and organize it into volumes, drives, and partitions before you can use it.
The primary GUI for managing disks in Windows Server 2008 is the Disk Management console, Diskmgmt.msc, shown in Figure 19-1, which can be run stand-alone or as part of Server Manager. The primary command-line tool for managing disks is DiskPart.exe.
Figure 19-1 The Disk Management console
To open Disk Management, you can start it stand-alone by running Diskmgmt.msc from a command line, or by typing it into the Run dialog box on the Start menu. Disk Management is also part of the Server Manager console, in the Storage section, as shown in Figure 19-2.
Figure 19-2 The Server Manager console
Remote Management
The Disk Management console in Windows Server 2008 lets you manage not only the local hard disks but also drives on other computers running any version of Windows 2000, Windows XP, Windows Server 2003, Windows Vista, or Windows Server 2008, allowing an administrator to manage disk tasks and space allocations from a workstation without having to sit at the computer that is being administered. This capability is a boon for remote site management and also simplifies management of Windows Server 2008 Core.
For details on how to create custom management consoles that connect to remote computers, see Chapter 14, “Managing Daily Operations.”
Dynamic Disks
Dynamic disks were introduced in Windows 2000 Server. By converting a disk to a dynamic disk, you give Disk Management the ability to manage it in new ways, without requiring a reboot in most cases. You can extend a disk volume, span a volume across multiple physical disks, stripe the volume for improved performance, mirror it, or add it to a RAID-5 array—all from the Disk Management console and all without a reboot, after the disk is converted to a dynamic disk. When combined with the new remote management functionality, dynamic disks give the system administrator powerful tools for managing the type and configuration of hard disk storage across the enterprise.
Command Line
Windows Server 2008 includes a full command-line interface for disks. The primary command-line tool is DiskPart.exe. This command-line utility is scriptable or it can be used interactively. Additional functionality is available using Fsutil.exe and Mountvol.exe. As we go through the steps to manage disks in this chapter, we’ll provide the equivalent command lines and a few basic scripts that you can use as the starting point for building your own command-line tools.
The one task that doesn’t appear to have a command-line solution is initializing a new disk. As far as we’ve been able to tell, you need to use Disk Management to initialize new disks before they can be used.
Adding a New Disk
Adding a new disk to a Windows Server 2008 server is straightforward. First, obviously, you need to physically install and connect the drive. If you have a hot-swappable backplane and array, you don’t even have to shut the system down to accomplish this task. If you’re using conventional drives, however, you need to shut down and power off the system.
After you install the drive and power up the system again, Windows Server 2008 automatically recognizes the new hardware and makes it available. If the disk is a basic disk that is already partitioned and formatted, you can use it without initializing, but it will initially appear “offline” in Disk Management. If it’s a brand-new disk that has never been partitioned or formatted, you need to initialize it first. And if it’s a dynamic disk or disks, but from another computer, you need to import it before it’s available. If the disk has never been used before, you’re prompted by the Initialize And Convert Disk Wizard.
Setting a Disk Online
To set an offline disk to online, follow these steps:
Open Disk Management.
Right-click the disk you want to bring online, and select Online from the Action menu, as shown in Figure 19-3.
Figure 19-3 Bringing a disk online using Disk Management
The command-line equivalent is shown in Figure 19-4.
Figure 19-4 Bringing a disk online using the command line
Initializing a New Disk
When you install a brand-new disk that has never been formatted or used by Windows, you need to initialize it. It might initially be shown as offline. If so, you need to first set the disk online, and then initialize it. If the new disk is online, the Initialize Disk dialog box will automatically display when you start Disk Management, as shown in Figure 19-5.
Figure 19-5 The Initialize Disk dialog box
When you initialize the disk, you can choose whether to use Master Boot Record (MBR) or GUID Partition Table (GPT) as the partition style. For any disk larger than 2TB, GPT is recommended. We’re still using MBR for all our disks, except for the one huge SAN volume we have, but we’re leaning toward changing that for all new disks.