Chapter 13. Configuring disks and storage

Configuring storage

Managing MBR disk partitions on basic disks

Managing GPT disk partitions on basic disks

Managing volumes on dynamic disks

One of your most important tasks as a Windows Server administrator is configuring and maintaining storage. Increasingly, servers use both physical drives installed internally and virtual disks from attached storage. Whether you work with virtual disks from attached storage or physical disks installed within servers, you must configure the disks for use by choosing a disk partition style and a disk storage type to use. After you configure drives, you prepare them to store data by partitioning them and creating file systems.

Windows Server supports two techniques for partitioning disks: traditional and standards-based. In this chapter, after discussing disk partition styles and disk storage types, I examine traditional techniques for creating volume sets and arrays. Subsequent chapters look at important disk management topics, including drive encryption, file system management, file sharing, and file security. I look at standards-based techniques for creating and managing volumes in Chapter 17.

Configuring storage

When you install disks, you must configure them for use by choosing a disk partition style and a disk storage type to use. After you configure drives, you prepare them to store data by partitioning them and creating file systems in the partitions. Partitions are sections of physical drives that function as if they are separate units. This enables you to configure multiple logical disk units even if a system has only one physical drive and to apportion disks appropriately to meet the needs of your organization.

Using the Disk Management tools

When you want to manage basic or dynamic disks, one of the tools you can use is Disk Management, which is shown in Figure 13-1. Disk Management also is a snap-in included in Computer Management and can be added to any custom Microsoft Management Console (MMC) you create.

A screen shot of Disk Management, which you can use to manage basic or dynamic disks.

Figure 13-1. Disk Management is the primary tool for managing storage.

Important

Although Disk Management is a trusty favorite for working with disks, it might not be available in future releases of Windows and cannot be used to manage Storage Spaces. Dynamic disks also are being phased out in favor of Storage Spaces and might not be available in future versions of Windows.

Disk Management makes it easy to work with any available internal and external drives on both local and remote systems. When you start Computer Management by tapping or clicking the related option on the Tools menu in Server Manager, you’re automatically connected to the local computer on which you’re running Computer Management. In Computer Management, expand Storage and then select Disk Management. You can now manage the drives on the local system.

To work with a remote system, press and hold or right-click the Computer Management entry in the left pane and select Connect To Another Computer on the shortcut menu. This opens the Select Computer dialog box (shown in Figure 13-2). Type the domain name or IP address of the system whose drives you want to view and then tap or click OK.

A screen shot of the Select Computer dialog box, where you should type the domain name or IP address of the system whose drives you want to view.

Figure 13-2. Select the remote system to manage with Computer Management.

Important

Server Manager also provides a shortcut for remote management. Select All Servers in the left pane, press and hold or right-click the remote server to which you want to connect in the Servers panel, and then select Computer Management. This opens Computer Management and connects to the remote server automatically. Keep in mind that the remote management of computers is a feature that must be enabled. As discussed in Chapter 4 you need to enable inbound rules on the Windows Firewall for each management area you want to work with.

Disk Management has three views:

  • Disk List. Shows a list of physical disks on, or attached to, the selected system. It includes details on type, capacity, unallocated space, and status. It is the only disk view that shows the device type, such as Small Computer System Interface (SCSI) or Integrated Device Electronics (IDE), and the partition style, such as master boot record (MBR) or GUID partition table (GPT).

  • Graphical View. Displays summary information for disks graphically according to disk capacity and the size of disk regions. By default, disk and disk-region capacity are shown on a logarithmic scale, meaning the disks and disk regions are displayed proportionally.

  • Volume List. Shows all volumes on the selected computer (including hard-disk partitions and logical drives). It includes details on volume layout, type, file system, status, capacity, and free space. It also shows whether the volume has fault tolerance and the related disk usage overhead. The fault-tolerance information is for software redundant array of independent disks (RAID) only.

Volume List and Graphical View are the default views. In Figure 13-10, the Volume List view is in the top-right corner, and the Graphical View is in the bottom-right corner. To change the top view, select View, choose Top, and then select the view you want to use. To change the bottom view, select View, choose Bottom, and then select the view you want to use.

The command-line counterpart to Disk Management is the DiskPart utility. You can use DiskPart to perform all Disk Management tasks. DiskPart is a text-mode command interpreter that you invoke so that you can manage disks, partitions, and volumes. As such, DiskPart has a separate command prompt and its own internal commands. Although earlier releases of DiskPart did not allow you to format partitions, logical drives, and volumes, the version that ships with Windows Server 2012 R2 enables you to do this using the internal format command.

You invoke the DiskPart interpreter by typing diskpart at the command prompt. DiskPart is designed to work with physical hard disks installed on a computer, which can be internal, external, or a mix of both. Although it will list other types of disks—such as CD/DVD drives, removable media, and universal serial bus (USB)–connected flash random access memory (RAM) devices—and enable you to perform some minimal tasks, such as assigning a drive letter, these devices are not supported.

After you invoke DiskPart, you can list available disks, partitions, and volumes by using the following list commands:

  • List Disk. Lists all internal and external hard disks on the computer

  • List Volume. Lists all volumes on the computer (including hard-disk partitions and logical drives)

  • List Partition. Lists partitions, but only on the disk you selected

Then you must give focus to the disk, partition, or volume you want to work with by selecting it. Giving a disk, partition, or volume focus ensures that any commands you type act only on that disk, partition, or volume. To select a disk, type select disk N, where N is the number of the disk you want to work with. To select a volume, type select volume N, where N is the number of the volume you want to work with. To select a partition, first select its related disk by typing select disk N and then select the partition you want to work with by typing select partition N.

If you use the list commands again after selecting a disk, partition, or volume, you see an asterisk (*) next to the item with focus. When you are finished working with DiskPart, type exit at the DiskPart prompt to return to the standard command prompt.

Using DiskPart: An example shows a sample DiskPart session. As you can see, when you first invoke DiskPart, it shows the operating system and DiskPart version you are using and the name of the computer you are working with. When you list available disks, the output shows you the disk number, status, size, and free space. It also shows the disk-partition style and type. If there’s an asterisk in the Dyn column, the disk is a dynamic disk. Otherwise, it is a basic disk. If there’s an asterisk in the Gpt column, the disk uses the GPT partition style. Otherwise, it is an MBR disk. You’ll find more information on partition styles in “Using the MBR and GPT partition styles” later in this chapter.

Adding new disks

Windows Server 2012 R2 supports both Standard Format and Advanced Format hard drives. Standard Format drives have 512 bytes per physical sector and are also referred to as 512b drives. Advanced Format drives have 4,096 bytes per physical sector and are referred to as 512e drives. 512e represents a significant shift for the hard-drive industry, and it allows for large, multi-terabyte drives.

When working with physical disks, keep in mind that disks perform physical media updates in the granularity of their physical sector size. 512b disks work with data 512 bytes at a time; 512e disks work with data 4,096 bytes at a time. Having a larger physical sector size is what enables drive capacities to jump well beyond previous physical capacity limits.

Thanks to hot-swapping and Plug and Play technologies, the process of adding new internal disks is much easier than in the past. If a computer supports hot swapping of disks, you can install new internal disks without having to shut down the computer. Just insert the hard disk drives you want to use. If the computer doesn’t support hot swapping, you need to shut down the computer, insert the drives, and restart the computer.

Either way, after you insert the drives you want to use, log on and access Disk Management in the Computer Management tool or in Server Manager. If the new drives have already been initialized, meaning they have disk signatures, they should be brought online automatically when you select Rescan Disks from the Action menu. If you are working with new drives that haven’t been initialized, meaning they lack a disk signature, when you choose to initialize the new disk, Windows Server 2012 R2 opens the Initialize Disk dialog box. In the Initialize Disk dialog box, select either the MBR or GPT partitioning style. When you tap or click OK, Windows writes a disk signature to the disks and initializes the disks with the basic disk type.

If you don’t want to use the Initialize Disk dialog box, you can close it and use Disk Management instead to view and work with the disk. In the Disk List view, the disk is marked with a red downward-pointing arrow icon, the disk’s type is listed as Unknown, and the disk’s status is listed as Not Initialized. You can then press and hold or right-click the disk’s icon and select Online. Press and hold or right-click the disk’s icon again and select Initialize Disk. You can then initialize the disk. In the Initialize Disk dialog box, select either the MBR or GPT partitioning style. Tap or click OK so that Windows can write a disk signature and initialize the disk with the basic disk type.

At an elevated, administrator Windows PowerShell prompt, you can use Get-Disk to list available disks and Initialize-Disk to initialize new disks.

Using the MBR and GPT partition styles

The term partition style refers to the method that Windows Server uses to organize partitions on a disk. Two partition styles are available: MBR and GPT. GPT is becoming the primary disk type for Windows Server and is supported by all current editions of Windows and Windows Server.

GPT is recommended for disks larger than 2 terabytes (TBs) on x86 and x64 systems or any disks used on Itanium-based computers. The key difference between the GPT partition style and the MBR partition style has to do with how partition data is stored.

Note

For this discussion, I focus on the basic storage type and won’t get into the details of the dynamic storage type. That’s covered in the next section. Note also that for virtual machines and Hyper-V specifically, you should use GPT only for data disks and not for boot disks. The reason for this is that Hyper-V emulates a basic input/output system (BIOS) firmware environment and won’t recognize the Extensible Firmware Interface (EFI).

Working with MBR disks

MBR uses a partition table that describes where the partitions are located on the disk. The first sector on a hard disk contains the MBR and a master boot code that’s used to boot the system. The MBR resides outside of partitioned space.

Note

It’s easy to confuse master boot record with boot sector. These are different structures on the hard drive. The master boot record contains the disk signature and partition table and is the first sector of the hard drive. A boot sector contains the BIOS parameter block and marks the first sector of the file system.

MBR disks support a maximum volume size of up to 4 TBs unless they’re dynamic disks and use RAID. Two special types of partitions are associated with them. The first partition type, called a primary partition, is used with drive sections that you want to access directly for file storage. You make a primary partition accessible to users by creating a file system on it and assigning it a drive letter or mount point. The second partition type, called an extended partition, is used when you want to divide a section of a disk into one or more logical units called logical drives. Here, you create the extended partition first and then create the logical drives within it. You then create a file system on each logical drive and assign a drive letter or mount point.

Each MBR drive can have up to four primary partitions or three primary partitions and one extended partition. It is the extended partition that enables you to divide a drive into more than four parts.

Note

These rules apply to MBR disks that use the basic storage type. There’s also a storage type called dynamic. I discuss basic and dynamic storage types in “Working with basic and dynamic disks” later in this chapter.

Working with GPT disks

GPT disks don’t have a single MBR. With GPT disks, critical partition data is stored in the individual partitions, and there are redundant primary and backup partition tables. Further, checksum fields are maintained to allow for error correction and to improve partition structure integrity.

GPT disks support raw partitions of up to 18 exabytes (EBs) in size and up to 128 partitions per disk. EFI-based computers using GPT disks for boot have two required partitions and one or more optional original equipment manufacturer (OEM) or data partitions. The required partitions are the EFI system partition (ESP) and the Microsoft Reserved (MSR) partition. Although the optional partitions that you see depend on the system configuration, the optional partition type you see the most is the primary partition. Primary partitions are used to store user data on GPT disks. With Windows Server 2012 R2, a typical new disk has the GPT partition style with a recovery partition and an EFI system partition.

Keep in mind that additional GPT disks (data disks) do not require an ESP. Further, a basic GPT disk might not contain primary partitions. For example, when you install a new disk and configure it as a GPT disk, the Windows operating system automatically creates the ESP and MSR partitions, but it does not create primary partitions.

Although GPT offers a significant improvement over MBR, it does have limitations. You cannot use GPT with removable disks, disks that are directly attached using USB or FireWire interfaces, or disks attached to shared storage devices on server clusters.

Caution

To make changes to GPT disks, you should use only Disk Management or DiskPart. If you are working in the EFI firmware environment, you’ll find a version of DiskPart available as well—DiskPart.efi.

Understanding legacy and protective MBRs

Most workstations and servers ship with Unified Extensible Firmware Interface (UEFI). Although UEFI is replacing BIOS and EFI as the top-level firmware interface, it doesn’t replace all the functionality in either BIOS or EFI and typically is wrapped around BIOS or EFI.

With respect to UEFI, GPT is the preferred partitioning scheme, and a protective MBR can be located on any disk that uses the GPT disk layout. A legacy MBR and a protective MBR differ in many important ways. A legacy MBR is located at the first logical block on a disk that is not using the GPT disk layout. The first 512 bytes on an MBR disk have the following layout:

  • The MBR begins with a 424-byte boot code, which is used to select an MBR partition record and load the first logical block of that partition. The boot code on the MBR is not executed by UEFI.

  • The boot code is followed by a 4-byte unique MBR disk signature, which the operating system can use to identify the disk and distinguish it from other disks on the system. The unique signature is written by the operating system and is not used by UEFI.

  • A 2-byte separator follows the disk signature. At byte offset 446, there is an array of four MBR partition records; each record is 16 bytes in length. Block 510 contains 0x55, and block 511 contains 0xAA. Block 512 is reserved.

Each of the four partition records defines the first and last logical blocks that a particular partition uses on a disk. The partition records have the following layout:

  • The MBR partition record begins with a 1-byte boot indicator. For example, a value of 0x80 identifies a bootable legacy partition. Any other value indicates that this is not a bootable legacy partition. UEFI doesn’t use this value.

  • The boot indicator is followed by a 3-byte address identifying the start of the partition. At byte offset 4, a 1-byte value indicates the operating system type, which is followed by a 3-byte value that identifies the end of the partition. UEFI doesn’t use these values.

  • At byte offset 8, a 4-byte value indicates the first logical block of the partition, and a 4-byte value follows, indicating size of the partition in units of logical blocks. UEFI uses both of these values.

If an MBR partition has an operating system type value of 0xEF, firmware must add the UEFI system partition GUID to the handle for the MBR partition. This enables boot applications, operating system loaders, drivers, and other lower-level tools to locate the UEFI system partition, which must physically reside on the disk.

A protective MBR can be located at the first logical block on a disk that is using the GPT disk layout. The protective MBR precedes the GUID Partition Table Header and is used to maintain compatibility with tools that do not understand GPT partition structures.

The purpose of the protective MBR is to protect the GPT partitions from boot applications, operating system loaders, drivers, and other lower-level tools that don’t understand the GPT partitioning scheme. The protective MBR does this by defining a fake partition covering the entire disk.

When a disk has a protective MBR, the first 512 bytes on the disk have the following layout:

  • The protective MBR begins with a 424-byte boot code, which UEFI doesn’t execute.

  • The boot code is followed by a 4-byte disk signature, which is set to zero and isn’t used by UEFI.

  • A 2-byte separator follows the disk signature. This separator is set to zero and isn’t used by UEFI.

  • At byte offset 446, there is an array of four MBR partition records; each record is 16 bytes in length. Only the first partition record—the protective partition record—is used. The other partition records are set to zero.

  • Block 510 contains 0x55, and block 511 contains 0xAA. Block 512 is reserved.

The protective partition record reserves the entire space on the disk after the first 512 bytes for the GPT disk layout. The protective partition record has the following layout:

  • The protective partition record begins with a 1-byte boot indicator that is set to 0x00, which indicates a nonbootable partition. The boot indicator is followed by a 3-byte address identifying the start of the partition at 0x000200, which is the first usable block on the disk.

  • At byte offset 4, a 1-byte value is set to 0xEE to indicate the operating system type as GPT Protective. This is followed by a 3-byte value that identifies the last usable block on the disk, which is the end of the partition (or 0xFFFFFF if it is not possible to represent this value).

  • At byte offset 8, a 4-byte value is set to 0x00000001, which identifies the logical block address of the GPT partition header. This is followed by a 4-byte value indicating the size of the disk minus one block (or 0xFFFFFFFF if the size of the disk is too large to be represented).

Using and converting MBR and GPT disks

Tasks for using MBR and GPT disks are similar but not necessarily identical. Partitions and volumes on MBR and GPT disks can be formatted by using FAT, FAT32, exFAT, NTFS, and ReFS. When you create partitions or volumes in Disk Management, you have the opportunity to format the disk and assign it a drive letter or mount point as part of the volume creation process. Although Disk Management enables you to format the partitions and volumes on MBR disks by using FAT, FAT32, exFAT, NTFS, and ReFS, you can format partitions and volumes on GPT disks by using FAT, FAT32, NTFS, and ReFS. Further, keep in mind that you can use Windows Server Backup to back up MBR and GPT disks and their volumes whether they are formatted with FAT, FAT32, exFAT, NTFS, or ReFS.

You can change partition table styles from MBR to GPT or from GPT to MBR. Changing partition table styles can be useful when you want to move disks between computers or you receive new disks that are formatted for the wrong partition table style. You can convert partition table styles only on empty disks, however. This means the disks must be either new or newly formatted. You could, of course, empty a disk by removing its partitions or volumes.

You can use both Disk Management and DiskPart to change the partition table style. To use Disk Management to change the partition style of an empty disk, start Computer Management from the Administrative Tools menu or by typing compmgmt.msc at the command line, expand the Storage node, and then select Disk Management. All available disks are displayed. Press and hold or right-click the disk to convert in the Graphical View and then tap or click Convert To GPT Disk or Convert To MBR Disk as appropriate.

To use DiskPart to change the partition style of an empty disk, invoke DiskPart by typing diskpart and then selecting the disk you want to convert. For example, if you want to convert disk 3, type select disk 3. After you select the disk, you can convert it from MBR to GPT by typing convert gpt. To convert a disk from GPT to MBR, type convert mbr.

Using the disk storage types

The term storage type refers to the method that Windows Server uses to structure disks and their contents. Windows Server offers several storage types, including basic disk, dynamic disk, removable disk, and virtual disk. The storage type you use doesn’t depend on the processor architecture—it can depend, however, on whether you are working with fixed or nonfixed disks. When you are working with fixed disks, you can use basic, dynamic, or both storage types on any edition of Windows Server, and you can create virtual disks. When you are working with nonfixed disks, the disk has the removable storage type automatically, but generally, you cannot create a virtual disk.

Working with basic and dynamic disks

Basic disks use the same disk structure as early versions of the Windows operating system. When using basic disks, you are limited to creating four primary partitions per disk or three primary partitions and one extended partition. Within an extended partition, you can create one or more logical drives. For ease of reference, primary partitions and logical drives on basic disks are known as basic volumes. Dynamic disks were introduced with early Windows operating systems as a way to improve disk support by requiring fewer restarts after disk configuration changes, improve support for combining disks, and enhance fault tolerance using RAID configurations. All volumes on dynamic disks are known as dynamic volumes.

Windows Server 2012 R2 systems can use both basic and dynamic disks. You cannot, however, mix disk types when working with volume sets. Note also that although you can continue to use dynamic disks with Windows 8.1 and Windows Server 2012 R2, dynamic disks are being phased out in favor of Storage Spaces. If you want to mirror the volume that hosts the operating system, you might want to use dynamic disks because this is one of the best approaches. Otherwise, Microsoft recommends using Storage Spaces instead of dynamic disks.

All disks, regardless of whether they are basic or dynamic, have five special types of drive sections:

  • Active. The active partition or volume is the drive section for system cache and startup. Some devices with removable storage might be listed as having an active partition (although they don’t actually have the active partition).

  • Boot. The boot partition or volume contains the operating system and its support files. The system and boot partition or volume can be the same.

  • Crash dump. The crash dump is the partition to which the computer attempts to write dump files in the event of a system crash. By default, dump files are written to the %SystemRoot% folder, but they can be located on any desired partition or volume.

  • Page file. A page file partition or volume contains a paging file that the operating system uses. Because a computer can page memory to multiple disks, according to the way virtual memory is configured, a computer can have multiple page file partitions or volumes.

  • System. The system partition or volume contains the hardware-specific files needed to load the operating system. The system partition or volume can’t be part of a striped or spanned volume.

The volume types are set when you install the operating system. You can mark a partition as active to ensure that it is the one from which the computer starts. You can do this only for partitions on basic disks. You can’t mark an existing dynamic volume as the active volume, but you can convert a basic disk containing the active partition to a dynamic disk. After the update is complete, the partition becomes a simple volume that’s active.

Using and converting basic and dynamic disks

You can’t use dynamic disks on portable computers. When you are working with desktop computers and servers, you only can use dynamic disks with drives connected to internal controllers (as well as some eSATA controllers). Although you can’t use dynamic disks with portable or removable drives on these computers, you can connect such a drive to an internal controller or a recognized eSATA controller and then use Disk Management to import the drive.

Basic disks and dynamic disks are managed in different ways. For basic disks, you use primary and extended partitions. Extended partitions can contain logical drives. Dynamic disks enable you to combine disks to create spanned volumes, to mirror disks to create mirrored volumes, and to stripe disks by using RAID 0 to create striped volumes. You can also create RAID-5 volumes for high reliability on dynamic disks.

You can change storage types from basic to dynamic and from dynamic to basic. When you convert a basic disk to a dynamic disk, existing partitions are changed to volumes of the appropriate type automatically, and existing data is not lost. Converting a dynamic disk to a basic disk isn’t so easy and can’t be done without taking some drastic measures. You must delete the volumes on the dynamic disk before you can change the disk back to a basic disk. Deleting the volumes destroys all the information they contain, and the only way to get it back is to restore the data from backup.

You should consider a number of things when you want to change the storage type from basic to dynamic. To be converted successfully, an MBR disk must have 1 megabyte (MB) of free space at the end of the disk. This space is used for the dynamic disk database, which tracks volume information. Without this free space at the end of the disk, the conversion will fail. Because both Disk Management and DiskPart reserve this space automatically, you need to be concerned about whether this space is available only if you used third-party disk management utilities. However, if the disk was formatted using another version of the Windows operating system, this space might not be available either.

A GPT disk must have contiguous, recognized data partitions to be converted successfully. If the GPT disk contains partitions that the Windows operating system doesn’t recognize, such as those created by another operating system, you won’t be able to convert a basic disk to a dynamic disk. When you convert a GPT disk, the Windows operating system creates LDM Metadata and LDM Data partitions as discussed in “LDM metadata and LDM data partitions” later in this chapter. GPT disks that are dynamic store the dynamic disk database in the LDM partitions instead of out at the end of the drive as on an MBR disk.

You can’t convert a disk if the system or boot partition uses software RAID. You must stop using the software RAID before you convert the disk.

Both Disk Management and DiskPart can be used to change the storage type.

Using Disk Management to convert a basic disk to a dynamic disk To use Disk Management to convert a basic disk to a dynamic disk, start Computer Management from the Administrative Tools menu or by typing compmgmt.msc at the command line, expand the Storage node, and then select Disk Management. In Disk Management, press and hold or right-click a basic disk that you want to convert, either in Disk List view or in the left pane of Graphical View, and select Convert To Dynamic Disk.

In the Convert To Dynamic Disk dialog box (shown in Figure 13-3), select the disks you want to convert. If you’re converting a RAID volume, be sure to select all the basic disks in the set because they must be converted together. Tap or click OK when you’re ready to continue.

A screen shot of the Convert To Dynamic Disk dialog box, where you can choose which basic disk you want to convert.

Figure 13-3. Select the disks to convert.

Next, as shown in Figure 13-4, the Disks To Convert dialog box shows the disks you’re converting along with details of the disk contents. To see the drive letters and mount points that are associated with a disk, select the disk in the Disks list and then tap or click Details. If a disk cannot be converted for some reason, the Will Convert column will show No, and the Disk Contents column will provide a reason. You must correct whatever problem is noted before you can convert the disk.

When you’re ready to start the conversion, tap or click Convert. Disk Management then warns you that after you finish the conversion, you won’t be able to boot previous versions of the Windows operating system from volumes on the selected disks. Tap or click Yes to continue. If a selected drive contains the boot partition, system partition, or a partition in use, you see another warning, telling you that the computer will need to be rebooted to complete the conversion process.

A screen shot of the Disks To Convert dialog box, where you can confirm that the disk can be converted using the Will Convert column.

Figure 13-4. Confirm that the disk can be converted.

Using DiskPart to convert a basic disk to a dynamic disk To use DiskPart to convert a basic disk to a dynamic disk, invoke DiskPart by typing diskpart and then select the disk you want to convert. For example, if you want to convert disk 2, type select disk 2. After the disk is selected, you can convert it from basic to dynamic by typing convert dynamic.

Using Disk Management to change a dynamic disk back to a basic disk To use Disk Management to change a dynamic disk back to a basic disk, you must first delete all dynamic volumes on the disk. Then press and hold or right-click the disk and select Convert To Basic Disk. This changes the dynamic disk to a basic disk, and you can then create new partitions and logical drives on the disk.

Using DiskPart to convert a dynamic disk to a basic disk To use DiskPart to convert a dynamic disk to a basic disk, invoke DiskPart by typing diskpart and then select the disk you want to convert. For example, if you want to convert disk 2, type select disk 2. If there are any existing volumes on the disk, you must delete them. You can do this by typing clean. However, be sure to move any data the disk contains to another disk prior to deleting the disk volumes.

After you delete all the volumes on the disk, you can convert the disk from dynamic to basic by typing convert basic. This changes the dynamic disk to a basic disk, and you can then create new partitions and logical drives on the disk.

Creating and managing virtual hard disks for Hyper-V

You can use Disk Management to create, attach, and detach virtual hard disks. To create a virtual hard disk, choose Create VHD from the Action menu. In the Create And Attach Virtual Hard Disk dialog box, shown in Figure 13-5, tap or click Browse. Use the Browse Virtual Disk Files dialog box to select where you want to create the .vhd file for the virtual hard disk. Type a name for the virtual hard disk and then tap or click Save.

A screen shot of the Create And Attach Virtual Hard Disk dialog box, where you can specify the location to create the VHD by using Browse.

Figure 13-5. Specify the location, format, and type for the virtual hard disk.

In the Virtual Hard Disk Size field, enter the size of the disk in MB, GB, or TB. Keep in mind that disk sizes aren’t necessarily fixed.

Next, choose a virtual hard disk format. Two virtual hard disk formats are available:

  • Standard virtual disks with the .vhd extension, which are backward compatible with earlier releases of Windows Server and support a maximum disk size of 2,040 GBs.

  • Enhanced virtual disks with the .vhdx extension, which are compatible only with Windows Server 2012 R2 and support enhanced features, including a maximum size of 64 TBs and improved handling of power failures.

Use the Virtual Hard Disk Type options to specify whether the size of the VHD dynamically expands to its fixed maximum size as data is saved to it or uses a fixed amount of space regardless of the amount of data stored on it. When you tap or click OK, Disk Management creates the virtual hard disk.

The VHD is attached automatically and added as a new disk. To initialize the disk for use, press and hold or right-click the disk entry in Graphical View and then tap or click Initialize Disk. In the Initialize Disk dialog box, shown in Figure 13-6, the disk is selected for initialization. Specify the disk type as MBR or GPT and then tap or click OK.

A screen shot of the Initialize Disk dialog box, where you can choose the disk to initialize and set its partition style to MBR or GPT.

Figure 13-6. Specify the disk to initialize and set its partition style.

After initializing the disk, press and hold or right-click the unpartitioned space on the disk and create a volume of the appropriate type. After you create the volume, the VHD is available for use.

After you create, attach, initialize, and format a VHD, you can work with a virtual disk in much the same way as you work with other disks. You can write data to and read data from a VHD. You can boot the computer from a VHD. You can take a VHD offline or put a VHD online by pressing and holding or right-clicking the disk entry in Graphical View and selecting Offline or Online, respectively. If you no longer want to use a VHD, you can detach it by pressing and holding or right-clicking the disk entry in Graphical View, selecting Detach VHD, and then tapping or clicking OK in the Detach Virtual Hard Disk dialog box.

You also can use VHDs created with other programs. If you created a VHD using another program or have a detached VHD you want to attach, you can work with the VHD by completing the following steps:

  1. In Disk Management, tap or click Attach VHD on the Action menu.

  2. In the Attach Virtual Hard Disk dialog box, tap or click Browse. Use the Browse Virtual Disk Files dialog box to select the .vhd or .vhdx file for the virtual hard disk and then tap or click Open.

  3. If you want to attach the VHD in read-only mode, select Read-Only. Otherwise, the VHD will open in read-write mode. Tap or click OK to attach the VHD.

Converting FAT or FAT32 to NTFS

On both MBR and GPT disks, you can convert FAT or FAT32 partitions, logical drives, and volumes to NTFS by using the Convert command. This preserves the file and directory structure without the need to reformat. Before you use Convert, you should check to see whether the volume is being used as the active boot volume or is a system volume containing the operating system. If it is a system volume, Convert must have exclusive access to the volume before it can begin the conversion. Because exclusive access to boot or system volumes can be obtained only during startup, you see a prompt asking whether you want to schedule the drive to be converted the next time the system starts.

As part of the preparation for conversion, you should check to see whether there’s enough free space to perform the conversion. You need a block of free space that’s about 25 percent of the total space the volume uses. For example, if the volume stores 12 GBs of data, you should have about 3 GBs of free space. Convert checks for this free space before running, and if there isn’t enough, it won’t convert the volume.

Caution

Conversion is one-way only. You can convert only from FAT or FAT32 to NTFS. You can’t convert from NTFS to FAT or from NTFS to FAT32 without deleting the volume and re-creating it using FAT or FAT32. You can’t convert exFAT or ReFS volumes to NTFS.

You run Convert at the command line. Its syntax is as follows:

convert volume /FS:NTFS

Here, volume is the drive letter followed by a colon, drive path, or volume name. So, for instance, if you want to convert the E drive to NTFS, type convert e: /fs:ntfs. This starts Convert. As shown in the following example, Convert checks the current file system type and then prompts you to enter the existing volume label for the drive:

The type of the file system is FAT32.
Enter current volume label for drive E:

As long as you enter the correct volume label, Convert continues as shown in the following example:

Volume CORPDATA created 4/10/2014 12:53 PM
Volume Serial Number is AA6B-CEDE
Windows is verifying files and folders...
File and folder verification is complete.
Windows has checked the file system and found no problems.
   91,827,680 KB total disk space.
   91,827,672 KB are available.
   8,192 bytes in each allocation unit.
   11,478,460 total allocation units on disk.
   11,478,459 allocation units available on disk.
Determining disk space required for file system conversion...
Total disk space:            91927860 KB
Free space on volume:        91929680 KB
Space required for conversion:      12080460 KB
Converting file system
Conversion complete

Here, Convert examines the file and folder structure and then determines how much disk space is needed for the conversion. If there is enough free space, Convert performs the conversion. Otherwise, it exits with an error, stating there isn’t enough free space to complete the conversion.

Several additional parameters are available, including /v, which tells Convert to display detailed information during the conversion, and /x, which tells Convert to force the partition or volume to dismount before the conversion if necessary. You can’t dismount a boot or system drive—these drives can be converted only when the system is restarted.

On converted boot and system volumes, Convert applies the same default security as that applied during Windows setup. On other volumes, Convert sets security so that the Users group has access but doesn’t give access to the special Everyone group. If you don’t want security to be set, you can use the /Nosecurity parameter. This parameter tells Convert to remove all security attributes and make all files and directories on the disk accessible to the Everyone group. In addition, you can use the /Cvtarea parameter to set the name of a contiguous file in the root directory to be a placeholder for NTFS system files.

Working with removable disks

Removable is the standard disk type associated with removable storage devices. Working with removable disks is similar to working with fixed disks. Removable storage devices can be formatted by using exFAT, FAT16, FAT32, or NTFS. All current versions of the Windows operating system also support exFAT with removable storage devices.

The exFAT file system is the next-generation file system in the FAT (FAT12/16, FAT32) family. exFAT is essentially FAT64. Although it retains the ease-of-use advantages of FAT32, exFAT overcomes the FAT32 4 GB file size limit and the FAT32 32 GB partition size limit on Windows systems. exFAT also supports allocation unit sizes of up to 32,768 KBs. exFAT is designed so that it can be used with and easily moved between any compliant operating system or device.

Note

Windows Vista and later support hot-pluggable media that use NTFS volumes. This feature enables you to format USB flash devices and similar media with NTFS.

Removable disks support network file and folder sharing. You configure sharing on removable disks in the same way you configure standard file sharing. You can assign share permissions, configure caching options for offline file use, and limit the number of simultaneous users. You can share an entire removable disk or share individual folders stored on the removable disk. You can also create multiple share instances.

Removable disks differ from standard NTFS sharing in that there isn’t an extensive underlying security architecture. With exFAT, FAT, or FAT32, the stored folders and files have only basic attributes, including read-only and hidden attribute flags that you can set and basic permissions for read and read/write access for specific users.

Managing MBR disk partitions on basic disks

A disk using the MBR partition style can have up to four primary partitions and up to one extended partition. This enables you to configure MBR disks in one of two ways: using one to four primary partitions or using one to three primary partitions and one extended partition. After you partition a disk, you format the partitions to assign drive letters or mount points.

Creating partitions and simple volumes

The Disk Management user interface has one set of dialog boxes and wizards for both partitions and volumes. The first three volumes on a basic drive are created automatically as primary partitions. If you try to create a fourth volume on a basic drive, the remaining free space on the drive is converted automatically to an extended partition with a logical drive of the size you designate by using the new volume feature it created in the extended partition. Any subsequent volumes are created in the extended partitions and logical drives automatically.

In Disk Management, you create partitions, logical drives, and simple volumes by following these steps:

  1. In the Graphical View of Disk Management, press and hold or right-click an unallocated or free area on the disk and then choose New Simple Volume. This starts the New Simple Volume Wizard. Read the Welcome page and then tap or click Next.

  2. On the Specify Volume Size page, as shown in Figure 13-7, use the Simple Volume Size In MB field to specify how much of the available disk space you want to use for the volume. Keep the following in mind before you set the size and tap or click Next:

    • You can size a primary partition to fill an entire disk, or you can size it as appropriate for the system you’re configuring. Keep in mind that the file system types available when you are formatting the volume depend on the size of the volume you are creating.

    • You can size extended partitions to fill any available unallocated space on a disk. Because an extended partition can contain multiple logical drives, each with its own file system, consider carefully how you might want to size logical drives before creating the extended partition. In addition, if a drive already has an extended partition or is removable, you won’t be able to create an extended partition.

    A screen shot of the Specify Volume Size page, with options for setting the size of the volume in megabytes (MB).

    Figure 13-7. Size the partition appropriately.

  3. If you are creating a primary partition, use the Assign Drive Letter Or Path page, as shown in Figure 13-8, to assign a drive letter or path. You can do one of the following and then click Next:

    • Assign a drive letter by choosing Assign The Following Drive Letter and then selecting an available drive letter in the selection list provided. Generally, the drive letters E through Z are available for use. (Drive letters A and B are used with floppy drives, drive letter C is for the primary partition, and drive letter D is for the computer’s CD/DVD-ROM drive.)

    • Mount a path by choosing Mount In The Following Empty NTFS Folder and then typing the path to an existing folder. You can also tap or click Browse to search for or create a folder.

    • Choose Do Not Assign A Drive Letter Or Drive Path if you want to create the partition without assigning a drive letter or path.

    A screen shot of the Assign Drive Letter Or Path page, with options for assigning a drive letter or mounting the drive in an empty NTFS folder.

    Figure 13-8. Specify how the partition should be used.

  4. Using the Format Partition page, as shown in Figure 13-9, you can opt not to format the partition at this time or you can opt to select the formatting options to use. Formatting creates a file system in the new partition and permanently deletes any existing data. The formatting options are as follows:

    • File System sets the file system type as FAT, FAT32, exFAT, NTFS, or ReFS. FAT volumes can be up to 4 GBs in size and have a maximum file size limit of 2 GBs. FAT32 volumes can be up to 32 GBs in size (a limitation of Windows Server) and have a maximum file size of 4 GBs. exFAT volumes can be up to 256 TBs in size. With ReFS and NTFS, files and volumes can be up to 2 TBs in size on MBR disks and up to 18 EBs in size on GPT disks.

    • Allocation Unit Size sets the cluster size for the file system. This is the basic unit in which disk space is allocated, and by default, it is based on the size of the volume. Note that ReFS volumes have a fixed allocation unit size.

    • Volume Label sets a text label for the partition that is used as its volume name. If you must change a partition’s volume label, you can do this from the command line by using the Label command or from File Explorer by pressing and holding or right-clicking the volume, selecting Properties, and then typing a new label on the General tab.

    • Perform A Quick Format specifies that you want to format the partition without checking for errors. Although you can use this option to save you a few minutes, it’s better to check for errors because this enables Disk Management to mark bad sectors on the disk and lock them out.

    • Enable File And Folder Compression turns on compression so that files and folders on this partition are compressed automatically. Compression is available only for NTFS. For more information about using compression, see “Using file-based compression” in Chapter 15.

    A screen shot of the Format Partition page, where you can choose to format the partition now according to the file system that you select, or you can choose Do Not Format This Volume to format the partition later.

    Figure 13-9. Format the partition now or opt to format the partition later.

  5. Tap or click Next. The final page shows you the options you selected. If the options are correct, tap or click Finish. The wizard then creates the partition and configures it.

Formatting a partition, logical drive, or volume

Before you can use a primary partition, logical drive, or volume, you must format it. Formatting creates the file structures necessary to work with files and folders. If you want to clean out a partition, logical drive, or volume and remove all existing data, you can use formatting to do this as well.

Caution

A partition with unformatted space on a disk is listed with RAW as the file system type. A formatted partition is listed with its appropriate file system type, such as NTFS. If you reformat a formatted partition, you will destroy all data in the partition.

To format a primary partition, logical drive, or volume, follow these steps:

  1. In Disk Management, press and hold or right-click the primary partition, logical drive, or volume you want to format and then choose Format. This opens the Format dialog box, as shown in Figure 13-10.

    A screen shot of the Format dialog box, where you can set File System and Allocation Unit Size.

    Figure 13-10. Set the formatting options and then tap or click OK.

  2. In the Volume Label box, type a descriptive label for the primary partition, logical drive, or volume. In most cases, you want to use a label that helps you and other administrators determine what type of data is stored in the partition or on the logical drive.

  3. Select the file system type. The available types depend on the size of the volume you are formatting. Keep in mind that only NTFS enables you to use the advanced file system features of Windows Server 2012 R2, including advanced file access permissions, compression, encryption, disk quotas, shadow copies, remote storage, and sparse files.

  4. Use the Allocation Unit Size field to specify the basic unit in which disk space should be allocated. In most cases, the default size is the best option to use. Note that ReFS volumes have a fixed allocation unit size.

  5. Select the Perform A Quick Format check box if you want to format the partition without checking for errors. Although this option can save you a few minutes, Disk Management won’t mark bad sectors on the disk or lock them out, and this can lead to problems with data integrity later on.

  6. If you want files and folders to be compressed automatically, select the Enable File And Folder Compression check box. Compression is available only for NTFS. To learn more about compression, see “Using file-based compression” in Chapter 15.

  7. Tap or click OK to begin formatting using the specified options. When prompted to confirm, tap or click OK again.

Configuring drive letters

Each primary partition, logical drive, or volume on a disk can have one drive letter and one or more drive paths associated with it. You can assign, change, or remove driver letters and mount points at any time without having to restart the computer. Windows Server 2012 R2 also allows you to change the drive letter associated with CD/DVD-ROM drives. You cannot, however, change or remove the drive letter of a system volume, boot volume, or any volume that contains a paging file. In addition, on GPT disks, you can assign drive letters only to primary partitions. You cannot assign drive letters to other types of partitions on GPT disks.

To add, change, or remove a drive letter, press and hold or right-click the primary partition, logical drive, or volume in Disk Management and choose Change Drive Letter And Paths. This opens the dialog box shown in Figure 13-11.

A screen shot of the Change Drive Letter And Paths For dialog box, where you can Add, Change, or Remove the drive letter used for the partition, drive, or volume.

Figure 13-11. Configure the drive letter used for the partition, drive, or volume.

Any current drive letter and mount points associated with the selected drive are displayed. You have the following options:

  • Add a drive letter. If the primary partition, logical drive, or volume doesn’t yet have a drive-letter assignment, you can add one by tapping or clicking Add. In the Add Drive Letter Or Path dialog box that opens, select the drive letter to use from the drop-down list and then tap or click OK.

  • Change an existing drive letter. If you want to change the drive letter, tap or click Change, select the drive letter to use from the drop-down list, and then tap or click OK. Confirm the action when prompted by tapping or clicking Yes.

  • Remove a drive letter. If you want to remove the drive letter, tap or click Remove and then confirm the action when prompted by tapping or clicking Yes.

Note

When you change or remove a drive letter, the volume or partition will no longer be accessible using the old drive letter, and this can cause programs using the volume not to work properly, or it can cause the programs to stop running.

After you make a change, the new drive letter or mount point assignment is made automatically as long as the volume or partition is not in use. If the partition or volume is in use, Windows Server 2012 R2 displays the warning shown in Figure 13-12.

This prompt tells you the drive is in use and the new drive letter won’t be assigned until you restart the computer. At this point, you can tap or click No to cancel the change or tap or click Yes to accept the change and continue. If you cancel the change, the new drive letter is not assigned. If you accept the change and continue, the old drive letter remains available for use by users and programs until you restart the computer. When you restart the computer, the new drive letter is applied.

A screen shot of the Disk Management dialog box, which displays a warning, stating that new drive letters are not assigned to in-use drives until the computer is restarted.

Figure 13-12. New drive letters are not assigned to in-use drives until you restart the computer.

Configuring mount points

Any volume or partition can be mounted to an empty NTFS folder as long as the folder is on a fixed disk drive rather than a removable media drive. A volume or partition mounted in such a way is called a mount point. Each volume or partition can have multiple mount points associated with it. For example, you could mount a volume to the root folder of the C drive as both C:EngData and C:DevData, giving the appearance that these are separate folders.

The real value of mount points, however, lies in how they give you the capability to create the appearance of a single file system from multiple hard disk drives without having to use spanned volumes. Consider the following scenario: A department file server has four data drives—drive 1, drive 2, drive 3, and drive 4. Rather than mount the drives as D, E, F, and G, you decide it would be easier for users to work with the drives if they were all mounted as folders of the system drive, which is C:Data. You mount drive 1 to C:DataUserData, drive 2 to C:DataCorpData, drive 3 to C:DataProjects, and drive 4 to C:DataHistory. If you then shared the C:Data folder, users could access all the drives by using a single share.

Note

Wondering why I mounted the drives under C:Data rather than C:, as is recommended in some documentation? The primary reason I did this is to help safeguard system security. I didn’t want users to have access to other directories, which include the operating system directories, on the C drive.

To add or remove a mount point, press and hold or right-click the volume or partition in Disk Management and choose Change Drive Letter And Paths. This opens the Change Drive Letter And Paths For dialog box (as shown in Figure 13-13), which shows any current mount point and mount points associated with the selected drive.

A screen shot of the Change Drive Letter and Paths For Reports dialog box, where you can add or remove a mount point by using the related options.

Figure 13-13. Add or remove a mount point.

You now have the following options:

  • Add a mount point. Tap or click Add. In the Add Drive Letter Or Path dialog box, select Mount In The Following Empty NTFS Folder, as shown in Figure 13-14. Type the path to an existing folder or tap or click Browse to search for or create a folder. Tap or click OK to mount the volume or partition.

    A screen shot of the Add Drive Letter Or Path dialog box, where you can choose the Mount In The Following Empty NTFS Folder and then use Browse to select the path for the new mount point.

    Figure 13-14. Select the path for the new mount point.

  • Remove a mount point. If you want to remove a mount point, select the mount point and then tap or click Remove. When prompted to confirm the action, tap or click Yes.

Note

You can’t change a mount point assignment after making it. However, you can just remove the mount point you want to change and then add a new mount point so that the volume or partition is mounted as appropriate.

Extending partitions

You can extend volumes on both basic and dynamic disks by using either Disk Management or DiskPart. This is handy if you create a partition that’s too small and you want to extend it so that you have more space for programs and data. In extending a volume, you convert areas of unallocated space and add them to the existing volume. For spanned volumes on dynamic disks, the space can come from any available dynamic disk, not only those on which the volume was originally created. Thus, you can combine areas of free space on multiple dynamic disks and use those areas to increase the size of an existing volume.

Before you try to extend a volume, be aware of several limitations. First, you can extend simple and spanned volumes only if they are formatted and the file system is NTFS (and in some instances, ReFS). You can’t extend striped volumes. You can’t extend volumes that aren’t formatted or that are formatted with FAT, FAT32, or exFAT. You can extend NTFS (and in some instances, ReFS) volumes on both basic and dynamic disks by using either Disk Management or DiskPart.

By using Disk Management, you can extend a simple or spanned volume by following these steps:

  1. Open Disk Management. Press and hold or right-click the volume that you want to extend and then select Extend Volume. This option is available only if the volume meets the previously discussed criteria and free space is available on one or more of the system’s dynamic disks.

  2. In the Extend Volume Wizard, read the introductory message and then tap or click Next.

  3. On the Select Disks page, shown in Figure 13-15, select the disk or disks from which you want to allocate free space. Any disks the volume is currently using are selected automatically. By default, all remaining free space on those disks is selected for use.

  4. With dynamic disks, you can specify the additional space that you want to use on other disks. Select the disk and then tap or click Add to add the disk to the Selected list box. In the Selected list box, select each disk that you want to use and, in the Select The Amount Of Space In MB list box, specify the amount of unallocated space to use on the selected disk.

  5. Tap or click Next, confirm your options, and then tap or click Finish.

    A screen shot of the Select Disks page, with options for adding available disks to the extended volume.

    Figure 13-15. Specify the amount of space to add to the volume.

By using DiskPart, you can extend partitions by using the command line. To extend a partition, invoke DiskPart by typing diskpart at the command prompt. List the disks on the computer by typing list disk. After you check the free space of each disk, select the disk by typing select disk N, where N is the disk you want to work with. Next, list the partitions on the selected disk by typing list partition. Select the last partition in the list by typing select partition N, where N is the partition you want to work with.

Now that you’ve selected a partition, you can extend it. To extend the partition to the end of the disk, type extend. To extend the partition by a set amount, type extend size=N, where N is the amount of space to add in megabytes. For example, if you want to add 90 GBs to the partition, type extend size=90000.

Extending disks shows an actual DiskPart session in which a disk is extended. You can use this as an example to help you understand the process of extending disks. Here, disk 2 has 119 GBs of free space, and its primary partition is extended so that it fills the disk.

To extend a partition on a dynamic disk to free space on another disk, you use the following syntax:

extend size=X disk=Y

Here, size=X sets the amount of space to use in megabytes, and disk=Y sets the number of the disk from which to allocate the space. Following this, you could allocate 50 GBs of free space from disk 0 to the selected disk in the previous example (disk 2) by using the following command:

extend size=50000 disk=0

Shrinking partitions

You can shrink volumes on both basic and dynamic disks by using either Disk Management or DiskPart. This is handy if you create a partition that’s too large and you want to shrink it so that you have more space for other partitions. In shrinking a volume, you convert areas of allocated but unused space to free space by removing them from an existing volume.

As with extending volumes, several limitations apply to shrinking volumes. First, you can shrink simple and spanned volumes only if they are formatted and the file system is NTFS. You can’t shrink striped volumes. You can’t shrink volumes that are formatted with FAT, FAT32, exFAT, or ReFS. However, you can shrink volumes that have not been formatted. If a volume is heavily fragmented, you might have to defragment the volume to free up additional space before shrinking.

By using Disk Management, you can shrink a simple or spanned volume by following these steps:

  1. Open Disk Management. Press and hold or right-click the volume that you want to shrink and then select Shrink Volume. This option is available only if the volume meets the previously discussed criteria.

  2. In the field provided in the Shrink dialog box shown in Figure 13-16, enter the amount of space to shrink. The Shrink dialog box provides the following information:

    • Total Size Before Shrink In MB. Lists the total capacity of the volume in megabytes. This is the formatted size of the volume.

    • Size Of Available Shrink Space In MB. Lists the maximum amount by which the volume can be shrunk. This doesn’t represent the total amount of free space on the volume; rather, it represents the amount of space that can be removed, not including any data reserved for the master file table, volume snapshots, page files, and temporary files.

    • Enter The Amount Of Space To Shrink In MB. Lists the total amount of space that will be removed from the volume. The initial value defaults to the maximum amount of space that can be removed from the volume. For optimal drive performance, you want to ensure that the drive has at least 10 percent of free space after the shrink operation.

    • Total Size After Shrink In MB. Lists what the total capacity of the volume in megabytes will be after the shrink. This is the new formatted size of the volume.

    A screen shot of the Shrink dialog box, where you can use Enter The Amount Of Space To Shrink In MB to specify the amount of space to shrink.

    Figure 13-16. Specify the amount of space to shrink from the volume.

  3. Tap or click Shrink to shrink the volume.

By using DiskPart, you can shrink partitions by using the command line. To shrink an NTFS-formatted partition, invoke DiskPart by typing diskpart at the command prompt. List the disks on the computer by typing list disk. After you check the free space of each disk, select the disk by typing select disk N, where N is the disk you want to work with. Next, list the partitions on the selected disk by typing list partition. Select the last partition in the list by typing select partition N, where N is the partition you want to work with.

Now that you’ve selected a partition, you can shrink it. To determine the maximum amount of space by which you can shrink the disk, type shrink querymax. To shrink the partition by the maximum amount, type shrink. To shrink the partition by a set amount, type shrink desired=N, where N is the amount of space to remove in megabytes. For example, if you want to remove 225 GBs from the partition, type shrink desired=225000.

Shrinking disks shows an actual DiskPart session in which you shrink a disk. You can use this as an example to help you understand the process of shrinking disks. Here, you determine that 40 GBs of space are available for shrinking on the selected partition and then you shrink the partition by 32 GBs.

Deleting a partition, logical drive, or volume

Deleting a partition, logical drive, or volume removes the associated file system and all associated data. When you delete a logical drive, the logical drive is removed from the associated extended partition, and its space is marked as free. When you delete a partition or volume, the entire partition or volume is deleted, and its space is marked as Unallocated. If you want to delete an extended partition that contains logical drives, however, you must delete the logical drives before trying to delete the extended partition.

In Disk Management, you can delete a partition, logical drive, or volume by pressing and holding or right-clicking it and then choosing Delete Partition, Delete Logical Drive, or Delete Volume, as appropriate. When prompted to confirm the action, tap or click Yes.

Managing GPT disk partitions on basic disks

GPT disks can have the following types of partitions:

  • ESP

  • MSR partition

  • Primary partition

  • Logical Disk Manager (LDM) Metadata partition

  • LDM Data partition

  • OEM or Unknown partition

Each of these partition types is used and managed in different ways.

ESP

EFI-based computers must have one GPT disk that contains an ESP. This partition is similar to the system volume on a computer with an MBR boot disk in that it contains the files that are required to start the operating system. Windows Server 2012 R2 creates the ESP during setup and formats it by using FAT. Normally, the partition is sized so that it is at least 100 MBs in size or 1 percent of the disk, up to a maximum size of 1,000 MBs.

The ESP is shown in Disk Management but isn’t assigned a drive letter or mount point. All Disk Management commands associated with the ESP are disabled, however, and you cannot store data on it, assign a drive letter to it, or delete it by using Disk Management or DiskPart. The ESP has several directories that contain the operating system boot loader, such as Ia64ldr.efi, and other files that are necessary to start the operating system in addition to utilities such as Diskpart.efi and Nvrboot.efi. Other directories are created as necessary by the operating system.

The only way to access these directories is to use the EFI firmware’s Boot Manager or the MountVol command. If you access the ESP, don’t make changes, additions, or deletions unless you’ve been specifically directed to by a Microsoft Knowledge Base article or other official documentation by an OEM vendor. Any changes you make could prevent the system from starting.

MSR partitions

EFI-based computers that use GPT for boot must have an MSR partition on every GPT disk. The MSR partition contains additional space the operating system might need to perform disk operations. For example, when you convert a basic GPT disk to a dynamic GPT disk, the Windows operating system uses 1 MB of the MSR partition space to create the LDM Metadata partition, which is required for the conversion.

The MSR partition is not shown in Disk Management and does not receive a drive letter or mount point. The Windows operating system creates the MSR partition automatically. For the boot disk, it is created along with the ESP when you install the operating system. An MSR partition is also created automatically when a disk is converted from MBR to GPT and any time you access a GPT disk that doesn’t already have an MSR partition in Disk Management or DiskPart.

If a GPT disk contains an ESP as the first partition on the disk, the MSR partition is usually the second partition on the disk. If a GPT disk does not contain an ESP, the MSR partition is typically the first partition on the disk. However, if a disk already has a primary partition at the beginning of the disk, the MSR partition is placed at the end of the disk.

The MSR partition is sized according to the size of the associated disk. For disks up to 16 GBs in size, it normally is 32 MBs in size. For all other disks, it normally is 128 MBs in size.

Primary partitions

You create primary partitions on basic disks to store data. GPT disks support up to 128 partitions, which can be a mix of required and optional partitions. Every primary partition you create appears in the GUID partition entry array within the GPT header. If you convert a basic disk that contains primary partitions to a dynamic disk, the primary partitions become simple volumes, and information about them is then stored in the dynamic disk database and not in the GUID partition entry array.

To create a primary partition, complete the following steps:

  1. In Disk Management Graphical View, press and hold or right-click an area marked Unallocated on a basic disk and then choose New Simple Volume. This starts the New Simple Volume Wizard. Tap or click Next.

  2. The partition is created as a primary partition automatically. Use the Assign Drive Letter Or Path page to assign a drive letter or path. You can also choose Do Not Assign A Drive Letter Or Drive Path if you want to create the partition without assigning a drive letter or path. Tap or click Next.

  3. Use the Format Partition page to set the formatting options. If you opt not to format the partition at this time, you can format the partition later as discussed in “Formatting a partition, logical drive, or volume” earlier in this chapter.

  4. Tap or click Next. The final page shows you the options you’ve selected. If the options are correct, tap or click Finish. The wizard then creates the partition and configures it.

LDM Metadata and LDM Data partitions

Windows Server 2012 R2 creates LDM Metadata and LDM Data partitions when you convert a basic GPT disk to a dynamic GPT disk. The LDM Metadata partition is 1 MB in size and is used to store the partitioning information needed for the conversion. The LDM Data partition is the partition in which the actual dynamic volumes are created.

The LDM Data partition represents sections of unallocated space on the converted disk and sections that had basic partitions that are now dynamic volumes. For example, if a disk had a primary boot partition that spanned the whole disk, the converted disk will have a single LDM Data partition. If a disk had a boot partition and other primary partitions, it will have two LDM Data partitions after the conversion: one for the boot volume and one for the rest of the partitions. Although the LDM Metadata and LDM Data partitions are not shown in Disk Management and do not receive drive letters or mount points, you can use this space by creating primary partitions as discussed in the previous section.

OEM or unknown partitions

GPT disks can have partitions that are specific to OEM implementations, and your vendor documentation should describe what they are used for. The Windows operating system might display these partitions in Disk Management as Healthy (Unknown Partition). You cannot, however, manipulate these partitions in Disk Management or DiskPart. In addition, if an unknown partition lies between two known partitions on a GPT disk, you typically can’t convert the disk from the basic disk type to the dynamic disk type.

Managing volumes on dynamic disks

Any disk using the MBR or GPT partition style can be configured as a dynamic disk. Unlike basic disks, which have basic volumes that can be created as primary partitions, extended partitions, and logical drives, dynamic disks have dynamic volumes that can be created as the following types:

  • Simple volumes. A simple volume is a volume that’s on a single drive and has the same purpose as a primary partition.

  • Spanned volumes. A spanned volume is a volume that spans multiple drives.

  • Striped volumes. A striped volume is a volume that uses RAID 0 to combine multiple disks into a striped set.

  • Mirrored volumes. A mirrored volume is a volume that uses RAID 1 to mirror a primary disk onto a secondary disk that is available for disaster recovery.

  • RAID-5 volumes. A RAID-5 volume is a volume that uses RAID 5 to create a fault-tolerant striped set on three or more disks.

Techniques for creating and managing these volume types are discussed in the sections that follow. Keep in mind that the RAID technology built into the operating system is software-based and is being phased out. Standards-based storage also has software RAID options, and they’re preferred for new server deployments. See Chapter 17 for complete details on Storage Spaces.

Creating a simple or spanned volume

You create simple and spanned volumes in much the same way. The differences between these volume types are subtle:

  • A simple volume uses free space from a single disk to create a volume. Windows can write to the selected disk until there is no more free space available within the volume.

  • A spanned volume is used to combine the disk space on multiple disks to create the appearance of a single volume. Windows always writes to the first disk in the spanned set first, and then, when this disk fills, Windows writes to the second disk, and so on.

If you later need more space, you can extend a simple or spanned volume type by using Disk Management. Here, you select an area of free space on any available disk and add it to the volume. When you extend a simple volume onto other disks, it becomes a spanned volume. Any volume that you want to extend should be formatted by using NTFS or ReFS because only NTFS and ReFS volumes can be extended.

Simple and spanned volumes aren’t fault tolerant. If you create a volume that spans disks and one of those disks fails, you won’t be able to access the volume. Any data on the volume will be lost. You must restore the data from backup after you replace the failed drive and re-create the volume.

To create a simple or spanned volume, complete the following steps:

  1. In Disk Management Graphical View, press and hold or right-click an area marked Unallocated on a dynamic disk and then choose New Simple Volume or New Spanned Volume as appropriate. Read the Welcome page and then tap or click Next.

  2. If you select New Spanned Volume, you next see the Select Disks page shown in Figure 13-17. Use this page to select disks that should be part of the volume and to size the volume segments on the designated disks. Select one or more disks from the list of disks that are available and have unallocated space. Tap or click Add to add the disk or disks to the Selected list box. Next, select each of the disks in turn and then specify the amount of space you want to use on the selected disk. Tap or click Next when you are ready to continue.

    Note

    If you started with a dynamic disk, the disk wizard shows both basic and dynamic disks with available disk space. If you add space from a basic disk that is not a system or boot volume, the wizard will attempt to convert the disk to a dynamic disk before creating the volume set. Before tapping or clicking Yes to continue, make sure you really want to do this because this can affect how the operating system uses the disk.

    A screen shot of the New Spanned Volume, where you can select the disks that should be part of the volume by using the Add, Remove, or Remove All options. When you have finished selecting disks, you can use Select The Amount Of Space In MB to specify how much space to use on each disk.

    Figure 13-17. Select the disks that should be part of the volume and then specify how much space to use on each disk.

  3. Use the Assign Drive Letter Or Path page to assign a drive letter or path. You can also choose Do Not Assign A Drive Letter Or Drive Path if you want to create the partition without assigning a drive letter or path. Tap or click Next.

  4. Use the Format Volume page to set the formatting options. Simple and spanned volumes can be formatted by using FAT, FAT32, NTFS, or ReFS. With spanned volumes, you also can format by using exFAT. If you think you might need to extend the volume at a later date, you might want to use NTFS because NTFS can be easily extended. If you opt not to format the partition at this time, you can format the partition later as discussed in “Formatting a partition, logical drive, or volume” earlier in this chapter.

  5. Tap or click Next. The final page shows you the options you selected. If the options are correct, tap or click Finish. The wizard then creates the volume and configures it.

Configuring RAID 0: Striping

RAID level 0 is disk striping. With disk striping, two or more volumes—each on a separate drive—are configured as a striped set. Unlike spanning, Windows breaks the data to be written into blocks called stripes and then writes the stripes sequentially to all disks in the set. So, if there are three disks in the set, Windows writes part of the data to the first disk, part of the data to the second disk, and part of the data to the third disk; this process of alternating among the disks is called striping.

Although the boot and system volumes shouldn’t be part of a striped set, you can place volumes for a striped set on up to 32 drives, but in most circumstances, sets with 2 to 5 volumes offer the best performance improvements. When 3 to 32 drives are used, the major advantage of disk striping is speed. Data can be accessed on multiple disks by using multiple drive heads, which improves performance considerably. When you try to use more than 32 drives, the performance improvement decreases significantly.

When you create striped sets, you want to use volumes that are approximately the same size. Disk Management bases the overall size of the striped set on the smallest volume size. Specifically, the maximum size of the striped set is a multiple of the smallest volume size. For example, if the smallest volume is 100 GBs, the maximum size for a three-disk striped set is 300 GBs.

You can maximize performance by using disks that are on separate disk controllers. This enables the system to access the drives simultaneously. Keep in mind that this configuration offers no fault tolerance. If any hard disk drive in the striped set fails, the striped set can no longer be used, which essentially means that all data in the striped set is lost. You need to re-create the striped set and restore the data from backups.

You can create a striped set by following these steps:

  1. In the Disk Management Graphical View, press and hold or right-click an area marked Unallocated on a dynamic disk and then choose New Striped Volume. This starts the New Striped Volume Wizard. Read the Welcome page and then tap or click Next.

  2. Create the volume as described in “Creating a simple or spanned volume” earlier in this chapter. The key difference is that you need at least two dynamic disks to create a striped volume.

After you create a striped volume, you can use the volume just like any other volume. You can’t extend a striped set after it’s created. Therefore, you should carefully consider the setup before you implement it.

Recovering a failed simple, spanned, or striped disk

Simple disks are the easiest to troubleshoot and recover because only one disk is involved. Spanned or striped disks, however, have multiple disks, and the failure of any one disk makes the entire volume unusable. The drive status might show as Missing, Failed, Online (Errors), Offline, or Unreadable.

The Missing (and sometimes Offline) status usually happens if drives have been disconnected or powered off. If the drives are part of an external storage device, check the storage device to ensure that it is connected properly and has power. Reconnecting the storage device or turning on the power should make the drives accessible. You then must start Disk Management and rescan the disks by selecting Rescan Disks from the Action menu. When Disk Management finishes, press and hold or right-click the drive that was missing and then choose Reactivate.

The Failed, Online (Errors), and Unreadable statuses indicate input/output (I/O) problems with the drive. As before, try rescanning the drive and then try to reactivate it. If the drive doesn’t come back to the Healthy state, you might need to replace it.

Moving dynamic disks

One of the advantages that dynamic disks have over basic disks is that you can easily move them from one computer to another. For example, if, after setting up a server, you decide that you don’t really need its two additional hard disk drives, you could move them to another server where they could be used better. Before you move disks, you should access Disk Management on the server where the dynamic disks are currently installed and check their status. The status should be Healthy. If it isn’t, you should fix any problems before moving the disks.

Next, check to see whether any dynamic disks that you want to move are part of a spanned, extended, mirrored, striped, or RAID-5 set. If they are, you should make a note of which disks are part of which set and plan to move all disks in a set together. If you are moving only part of a disk set, you should be aware of the consequences. For spanned, extended, or striped volumes, moving only part of the set makes the related volumes unusable on the current computer and on the computer to which you are planning to move the disks. If you plan to move only one disk of a mirrored volume, you should break the mirror before you move it. This ensures that you can keep using the disks on both computers. For RAID-5 volumes, you should move all the disks in the set if possible. If you move only part of the RAID-5 set, you might find that you can’t use the set on either computer.

To move the disks, open Computer Management and then, in the left pane, select Device Manager. In the Device List, expand Disk Drives. This shows a list of all the physical disk drives on the computer. Press and hold or right-click each disk that you want to move and then select Uninstall. If you are unsure which disks to uninstall, press and hold or right-click each disk and select Properties. In the Properties dialog box, click the Volumes tab and then choose Populate. This shows you the volumes on the selected disk. In Computer Management, select Disk Management. Press and hold or right-click each disk that you want to move and then select Remove Disk.

After you perform these procedures, you can move the dynamic disks. If the disks are hot swappable and this feature is supported on both computers, remove the disks from the original computer and then install them on the destination computer. Otherwise, turn off both computers, remove the drives from the original computer, and then install them on the destination computer. When you’re finished, restart the computers. On the destination computer, access Disk Management and then select Rescan Disks on the Action menu. When Disk Management finishes scanning the disks, press and hold or right-click any disk marked Foreign and tap or click Import. You should now be able to access the disks and their volumes on the destination computer.

Note

When you move dynamic disks, the volumes on those disks should retain the drive letters they had on the previous computer. If a drive letter is already used on the destination computer, a volume receives the next available drive letter. If a dynamic volume previously did not have a drive letter, it does not receive a drive letter when moved to another computer. In addition, if auto-mounting is disabled, the volumes aren’t automatically mounted, so you must manually mount volumes and assign drive letters.

Configuring RAID 1: Disk mirroring

For RAID 1, disk mirroring, you configure two volumes on two drives identically. Data is written to both drives. If one drive fails, no data is lost because the other drive contains the data. After you repair or replace the failed drive, you can restore full mirroring so that the volume is once again fault tolerant.

By using disk mirroring, you gain the advantage of redundancy. Because disk mirroring doesn’t write parity information, mirrored volumes can usually offer better write performance than disk striping with parity. The key drawback, however, is that disk mirroring has a 50 percent overhead, meaning it effectively cuts the amount of storage space in half. For example, to mirror a 750 GB drive, you need another 750 GB drive. That means you use 1,500 GBs of space to store 750 GBs of information.

As with disk striping, you’ll often want the mirrored disks to be on separate disk controllers. This provides redundancy for the disk controllers. If one of the disk controllers fails, the disk on the other controller is still available. When you use two disk controllers to duplicate data, you’re using a technique known as disk duplexing rather than disk mirroring—but why mince words?

You can create a mirrored set either by using two new disks or by adding a mirror to an existing volume. As with other RAID techniques, mirroring is transparent to users. Users see the mirrored set as a single volume that they can access and use like any other drive.

Creating a mirrored set by using two new disks

To create a mirrored set by using two new disks, start Disk Management. In Graphical View, press and hold or right-click an area marked Unallocated on a dynamic disk and then choose New Mirrored Volume. This starts the New Mirrored Volume Wizard. Tap or click Next. Create the volume as described in “Creating a simple or spanned volume” earlier in this chapter. The key difference is that you must create two identically sized volumes, and these volumes must be on separate dynamic drives. The volumes can be formatted by using NTFS or ReFS. You won’t be able to continue past the Selected Disks page until you select the two disks that you want to work with.

When you tap or click Finish, you return to the main Disk Management window, and Disk Management creates the mirrored set. During the creation of the mirror, you see a status of Resynching. This tells you that Disk Management is creating the mirror. When this process finishes, you’ll have two identical volumes. Both volumes will show the same drive letter in Disk Management, but the separation of volumes is transparent to users. Users see the mirror set as a single volume. The volume status should be listed as Healthy. This is the normal status for volumes. If the status changes, you might need to repair or resync the mirrored set, as discussed in “Resolving problems with mirrored sets” later in this chapter.

Adding a mirror to an existing volume

You can also use an existing volume to create a mirrored set. For this to work, the volume you want to mirror must be a simple volume and you must have an area of unallocated space on a second dynamic drive with an equal or larger amount of space than the existing volume. When you add a mirror onto this unallocated space, Disk Management creates a volume that is the same size and file system type as the simple volume you are mirroring. It then copies the data from the simple volume to the new volume by using a process called resynching.

To add a mirror to an existing volume, start Disk Management. In Graphical View, press and hold or right-click the simple volume you want to mirror and then select Add Mirror. This opens the Add Mirror dialog box. Use the Disks list to select a location for the mirror and then tap or click Add Mirror. Windows Server 2012 R2 begins the mirror creation process, and you see a status of Resynching on both volumes.

When the resynching is complete, you have two identical copies of the original volume. Although both volumes show the same drive letter in Disk Management, the separation of volumes is transparent to users. Users see the mirror set as a single volume.

Mirroring boot and system volumes

Disk mirroring is often used to mirror boot and system volumes. Mirroring these volumes ensures that you can boot the server in case of a single drive failure.

Mirroring boot and system volumes on MBR disks

When you want to mirror boot or system volumes on MBR disks, the process is straightforward. You start with two disks, which I’ll call Disk 0 and Disk 1, where Disk 0 has the system files and Disk 1 is a new disk. The system disk is typically a basic disk that must be upgraded to a dynamic disk before you can mirror it—mirroring is possible only on dynamic disks.

To begin, upgrade Disk 0 to a dynamic disk and then upgrade Disk 1 as discussed in “Using and converting basic and dynamic disks” earlier in this chapter. In Disk Management, press and hold or right-click the boot or system volume that you want to mirror and then select Add Mirror. This opens the Add Mirror dialog box. Select the disk onto which you want to add the mirror (Disk 1 in the example) and then tap or click Add Mirror. Windows Server 2012 R2 begins the mirror creation process, and you see a status of Resynching on both volumes. When the resynching is complete, the status should change to Healthy.

During the creation of the mirror, the operating system should add an entry to the system’s Boot Manager that enables you to boot to the secondary mirror. Resolving a primary mirror failure is much easier with this entry in the Boot Manager file than without it because all you need to do is select the entry to boot to the secondary mirror. If you mirror the boot volume and a secondary mirror entry is not created for you, you could modify the boot entries in the Boot Manager to create one by using the BCD Editor (bcdedit.exe).

If a system fails to boot to the primary system volume, restart the system and select Boot Mirror - Secondary Plex for the operating system you want to start. The system should start up normally. After you successfully boot the system to the secondary drive, you can schedule the maintenance necessary to rebuild the mirror if desired.

Mirroring boot and system volumes on GPT disks

Mirroring boot and system volumes on GPT disks isn’t the same as for MBR disks. Primarily, this is because GPT disks used to boot the operating system have an ESP and an MSR partition that must be created on the disk in a certain order. Thus, to mirror boot and system volumes on GPT disks, you must create the necessary partitions on the second disk of the mirrored set and tell the operating system that these partitions can be used for booting.

Note

As stated previously, not all computers are capable of booting to GPT disks. Only EFI-based computers can boot to GPT disks.

To get started, you need two disks that use the GPT partition style and the basic storage type. One of the disks should already be designated as the boot volume. I’ll refer to this volume as Disk 0. The other disk should be identical in size or larger than the boot volume. I’ll refer to this volume as Disk 1. Disk 1 should be a clean disk, meaning it can’t already have partitions on it; so, if necessary, copy any data on the disk to another disk or make a backup of the data and then delete any existing partitions. You can use DiskPart to do this by completing the following steps:

  1. At the command prompt, invoke DiskPart by typing diskpart. List the disks available on the system by typing list disk.

  2. Select the disk you’ll use as the secondary boot disk. Following the example, this is Disk 1, so you type select disk 1.

  3. List the partitions on this disk by typing list partition.

  4. If there are any existing partitions, select and delete each partition in turn. For example, if the disk has Partition 1, you type select partition 1 and then type delete partition override. The Override parameter ensures that you can delete nonuser partitions.

After you make sure the second disk doesn’t contain any partitions, list the available disks again by typing list disk and then select the disk you’ll use as the current boot disk. Following the example, this is Disk 0, so you type select disk 0. List the partitions on this disk by typing list partition. The output you see will be similar to the following:

Partition ###   Type         Size         Offset
-------------   -----------------------   -------
Partition 1     System       316 MB       32 KB
Partition 2     Primary      9992 MB      312 MB
Partition 3     Reserved     32 MB        9 GB

The output shows you which partitions are being used as the ESP and MSR partitions. The ESP is listed with the partition type System. The MSR partition is listed with the partition type Reserved. Note the size of each partition. Here, System is 316 MBs, and Reserved is 32 MBs.

You now must create the ESP and MSR partitions on the second disk by completing the following steps:

  1. In DiskPart, select this disk to give it focus. Following the example, you type select disk 1.

  2. Afterward, you create the ESP first by typing create partition efi size=N, where N is the size previously noted, such as size=316.

    Note

    The target disk must still be basic at this point. If you already converted the disk to dynamic, steps 2 and 3 will result in errors.

  3. Create the MSR partition by typing create partition msr size=N, where N is the size previously noted, such as size=32.

  4. If you type list partition, you should see that both partitions have been created and are sized appropriately, like as follows:

    Partition ###     Type          Size        Offset
    -------------     -----------------------   -------
    Partition 1       System        316 MB      32 KB
    Partition 2       Reserved      32 MB       316 MB

Next, you must prepare the ESP for use by assigning it a drive letter, formatting it, and copying over the necessary startup files from the current boot volume. To do this, follow these steps:

  1. In DiskPart, select the partition by typing select partition 1.

  2. Assign a drive letter by typing assign letter=X, where X is the drive letter, such as letter=H.

  3. Format the ESP as FAT. Following the example, you type format /fs=fat quick.

  4. After formatting is complete, select the current boot volume. Following the example, you type select disk 0.

  5. Type select partition 1 to select the ESP on the current boot volume.

  6. Assign this partition a drive letter by typing assign letter=X, where X is the drive letter to assign, such as letter=I.

  7. Exit DiskPart by typing exit.

  8. Use the XCOPY command to copy all the files from the ESP on the current boot volume to the ESP on the second disk. Following the example, you type xcopy i:*.* h: /s /h. The /s and /h parameters ensure that hidden system files are copied.

You now must convert both drives to the dynamic storage type. Start with the second disk and then convert the current boot disk. Follow these steps:

  1. Invoke DiskPart by typing diskpart.

  2. Select the disk you are going to use as the secondary boot disk. Following the example, this is Disk 1, so you type select disk 1.

  3. Convert the disk by typing convert dynamic.

  4. Select the current boot disk. Following the example, this is Disk 0, so you type select disk 0.

  5. Convert the disk by typing convert dynamic.

  6. Exit DiskPart by typing exit.

  7. You must shut down and restart the computer to complete the conversion process for the current boot disk. In some cases, this process takes several reboots to complete.

Note

You don’t have to delete the drive letters assigned in the previous procedure. These drive letters will not be reassigned after the restart.

When the conversion process is complete, log on to the system and then follow these steps to mirror the boot drive:

  1. Invoke DiskPart by typing diskpart.

  2. Select the current boot disk. Following the example, this is Disk 0, so you type select disk 0.

  3. Add the disk to use as the second drive to this volume to create the mirrored set. Following the example, you type add disk=1.

    DiskPart then begins the mirror creation process by synchronizing the data on both volumes.

During the creation of the mirror, the operating system should add an entry to the system’s Boot Manager that allows you to boot to the secondary mirror. Resolving a primary mirror failure is much easier with this entry in the Boot Manager file than without it because all you need to do is select the entry to boot to the secondary mirror. If you mirror the boot volume and a secondary mirror entry is not created for you, you could modify the boot entries in the Boot Manager to create one by using the BCD Editor (bcdedit.exe).

If a system fails to boot to the primary system volume, restart the system and select Boot Mirror - Secondary Plex for the operating system you want to start. The system should start up normally. After you successfully boot the system to the secondary drive, you can schedule the maintenance necessary to rebuild the mirror if desired.

Now if you shut down the system and restart it, you should be able to boot successfully to either the primary or the secondary boot disk.

Configuring RAID 5: Disk striping with parity

RAID 5, disk striping with parity, offers fault tolerance with less overhead and better read performance than disk mirroring. To configure RAID 5, you use three or more volumes, each on a separate drive, as a striped set, similar to RAID 0. Unlike RAID 0, however, RAID 5 adds parity error checking to ensure that the failure of a single drive won’t bring down the entire drive set. In the event of a single drive failure, the set continues to function with disk operations directed at the remaining disks in the set. The parity information can also be used to recover the data by using a process called regeneration.

RAID 5 works like this: Each time the operating system writes to a RAID-5 volume, the data is written across all the disks in the set. Parity information for the data, used for error checking and correction, is written to disk as well, but it’s always written on a separate disk from the one used to write the data. For example, if you are using a three-volume RAID-5 set and save a file, the individual data bytes of the file are written to each of the disks in the set. Parity information is written as well but not to the same disk as one of the individual data bytes. Thus, a disk in the set could have a chunk of the data or the corresponding parity information, but not both. This, in turn, means that the loss of one disk from the set doesn’t cause the entire set to fail.

Like any type of RAID, RAID 5 has its drawbacks. First, if multiple drives in the set fail, the entire set will fail and you won’t be able to regenerate the set from the parity information. Why? If multiple drives fail, there won’t be enough parity information to use to recover the set. Second, having to generate and write parity information every time data is written to disk slows down the write process (and, in the case of software RAID, reduces processing power). To compensate for the performance hit, hardware RAID controllers have their own processors that handle the necessary processing—and this is why hardware RAID is preferred over software RAID.

Okay, so RAID 5 gives you fault tolerance at some cost to performance. It does, however, have less overhead than RAID 1. By using RAID 1, you have 50 percent overhead, which effectively cuts the amount of storage space in half. By using RAID 5, the overhead depends on the number of disks in the RAID set. With three disks, the overhead is about one-third. If you have three 750 GB drives using RAID 5, you use 2250 GBs of space to store about 1,500 GBs of information. If you have additional disks, the overhead is reduced incrementally but not significantly.

To create a RAID-5 set, start Disk Management. In Graphical View, press and hold or right-click an area marked Unallocated on a dynamic disk and then choose New RAID-5 Volume. This starts the New RAID-5 Volume Wizard. Tap or click Next. Create the volume as described in “Creating a simple or spanned volume” earlier in this chapter. The key difference is that you must select free space on three or more dynamic drives.

When you tap or click Finish, you return to the main Disk Management window and Disk Management creates the RAID-5 set. During the creation of the set, you see a status of Resynching. This tells you that Disk Management is creating the RAID-5 set. When this process finishes, you have three or more identical volumes, all of which show the same drive letter in Disk Management. Users, however, see the RAID-5 set as a single volume. The volume status should be listed as Healthy. This is the normal status for volumes. If the status changes, you might need to repair or regenerate the RAID-5 set as discussed in “Resolving problems with RAID-5 sets” later in this chapter.

Breaking or removing a mirrored set

Windows Server 2012 R2 provides two ways to stop mirroring. You can break a mirrored set, which creates two separate but identical volumes, or you can remove a mirror, which deletes all the data on the removed mirror.

To break a mirrored set, follow these steps:

  1. In Disk Management, press and hold or right-click one of the volumes in the mirrored set and then choose Break Mirrored Volume.

  2. Confirm that you want to break the mirrored set by tapping or clicking Yes. If the volume is currently in use, you see another warning dialog box. Confirm that it’s okay to continue by tapping or clicking Yes.

    Windows Server 2012 R2 then breaks the mirrored set, creating two independent volumes.

To remove a mirror, follow these steps:

  1. In Disk Management, press and hold or right-click one of the volumes in the mirrored set and then choose Remove Mirror. This opens the Remove Mirror dialog box.

  2. In the Remove Mirror dialog box, select the disk from which to remove the mirror. If the mirror contains a boot or system volume, you should remove the mirror from the secondary drive rather than from the primary. For example, if Drive 0 and Drive 1 are mirrored, remove Drive 1 rather than Drive 0.

  3. Confirm the action when prompted. All data on the removed mirror is deleted.

Resolving problems with mirrored sets

Occasionally, data on mirrored volumes can get out of sync. Typically, this happens if one of the drives in the set goes offline or experiences temporary I/O problems and, as a result, data can be written only to the drive that’s online. To reestablish mirroring, you must bring both drives online and then resynchronize the mirror, but you must rebuild the set using a disk with the same partition style—either MBR or GPT. The corrective action you take depends on the drive status.

Note

When mirroring boot volumes, Windows requires you to use the same partition style. With data volumes, you can mirror between MBR and GPT.

The Missing or Offline status usually happens if drives have been disconnected or powered off. If the drives are part of an external storage device, check the storage device to ensure that it is connected properly and has power. Reconnecting the storage device or turning on the power should make the drives accessible. You then must start Disk Management and rescan the missing drive by selecting Rescan Disks on the Action menu. When Disk Management finishes, press and hold or right-click the drive and choose Reactivate Volume. The drive status should change to Regenerating and then to Healthy. If the volume doesn’t return to the Healthy status, press and hold or right-click the volume and then choose Resynchronize Mirror.

A status of Failed, Online (Errors), or Unreadable indicates I/O problems with the drive. As before, try rescanning the drive and then try to reactivate the drive. The drive status should change to Regenerating and then to Healthy. If the volume doesn’t return to the Healthy status, press and hold or right-click the volume and then choose Resynchronize Mirror.

If these actions don’t work, you must remove the failed mirror, replace the bad drive, and then rebuild the mirror. To do this, follow these steps:

  1. Press and hold or right-click the failed volume and then select Remove Mirror.

  2. You now must mirror the volume on an Unallocated area of free space on a different disk. If you don’t have free space, you must create space by shrinking a volume, deleting other volumes, or replacing the failed drive.

  3. When you are ready to continue, press and hold or right-click the remaining volume in the original mirror and then select Add Mirror. This opens the Add Mirror dialog box.

  4. Use the Disks list to select a location for the mirror and then tap or click Add Mirror. Windows Server 2012 R2 begins the mirror creation process, and you see a status of Resynching on both volumes.

Repairing a mirrored system volume

When you mirror a system volume, an entry that enables you to boot to the secondary mirror is added to the system’s boot configuration data, so if a system fails to boot to the primary system volume, restart the system and select Boot Mirror - Secondary Plex for the operating system you want to start. The system should start up normally. After you successfully boot the system to the secondary drive, you can schedule the maintenance necessary to rebuild the mirror if desired.

Rebuilding mirrored system volumes on MBR disks

To rebuild the mirror, you must complete the following steps:

  1. Shut down the system and replace the failed drive. Restart the system, using the secondary drive.

  2. In Disk Management, press and hold or right-click the remaining volume in the mirrored set and choose Break Mirrored Volume. Tap or click Yes at the prompts to confirm the action.

  3. Press and hold or right-click the volume again and choose Add Mirror. Use the Add Mirror dialog box to select the second disk to use for the mirror and then tap or click Add Mirror.

If you want the primary mirror to be on the drive you added or replaced, perform these additional steps:

  1. Use Disk Management to break the mirrored set again.

  2. Make sure that the primary drive in the original mirror set has the drive letter that was previously assigned to the complete mirror. If it doesn’t, assign the appropriate drive letter.

  3. Press and hold or right-click the original system volume, select Add Mirror, and then re-create the mirror.

Rebuilding mirrored system volumes on GPT disks

For GPT disks, rebuilding mirrored system volumes is a bit different. To rebuild the mirror, shut down the system and replace the failed drive and then restart the system, using the secondary drive. In Disk Management, press and hold or right-click the remaining volume in the mirrored set and choose Break Mirrored Volume. Tap or click Yes at the prompts to confirm the action. After this, you can use the secondary boot disk as your primary boot disk and follow the procedures outlined in “Mirroring boot and system volumes on MBR disks” earlier in this chapter to re-enable mirroring properly, using the secondary disk as the primary.

Resolving problems with RAID-5 sets

Most problems with RAID-5 sets have to do with the intermittent or permanent failure of a drive. If one of the drives in the set goes offline or experiences temporary I/O problems, parity data cannot be properly written to the set and, as a result, the set’s status shows as Failed Redundancy and the failed volume’s status changes to Missing, Offline, or Online (Errors).

You must bring all drives in the RAID-5 set online. If the status of the problem volume is Missing or Offline, make sure that the drive has power and is connected properly. You then must start Disk Management and rescan the missing drive by choosing Rescan Disks from the Action menu. When Disk Management finishes, press and hold or right-click the drive and choose Reactivate. The drive status should change to Regenerating and then to Healthy. If the volume doesn’t return to the Healthy status, press and hold or right-click the volume and then tap or click Regenerate Parity.

A status of Failed, Online (Errors), or Unreadable indicates I/O problems with the drive. As before, try rescanning the drive and then try to reactivate the drive. The drive status should change to Regenerating and then to Healthy. If the volume doesn’t return to the Healthy status, press and hold or right-click the volume and then tap or click Regenerate Parity.

If one of the drives still won’t come back online, you must repair the failed region of the RAID-5 set. Press and hold or right-click the failed volume and then select Remove Volume. You now must press and hold or right-click an unallocated space on a separate dynamic disk with the same partition style—either MBR or GPT—and choose Repair Volume. This space must be at least as large as the region to repair, and it can’t be on a drive the RAID-5 set is already using. If you don’t have enough space, Repair Volume is unavailable and you must free space by shrinking a volume, deleting other volumes, or replacing the failed drive.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset