Mirroring Windows Server 2008 GBT and MBR Boot and System Disks

Follow Techotopia on Twitter Bookmark and Share

From Techotopia

Jump to: navigation, search
PreviousTable of ContentsNext
Creating and Managing Windows Server 2008 Mirrored (RAID 1) VolumesConfiguring and Managing RAID 5 on Windows Server 2008


Purchase and download the fully updated Windows Server 2008 R2 edition of this eBook in PDF and ePub formats for only $9.99  Add to Cart


The focus of this chapter is the mirroring of boot and system disks on Windows Server 2008. It is important to note that the steps necessary for mirroring system disks differs depending on whether the disk uses the MBR or GPT partitioning style. As such, this chapter will cover the steps necessary to mirror both types of Windows Server 2008 system disk.

Contents



[edit] An Overview of GPT and MBR Partition Styles

Before a Windows Server 2008 system disk can be mirrored it is important to identify the partition style used by the disk as this will dictate the technique used to create the mirror. In order for a disk to be used to store data it must first have partitions created on it. These partitions are then formatted with a particular file system (FAT, FAT32 or NTFS) and used either as a basic disk or as dynamic disk. Obviously, the operating system needs some mechanism for organizing and managing these disk partitions and Windows Server 2008 provides two such partitioning styles known as Master Boot Record (MBR) or GUID Partition Table (GPT).

The MBR style was originally developed for x86-based computer systems and is by far the most common style in use at present. GPT, on the other hand, was originally developed for 64-bit Itanium based systems. With the arrival of Windows Server 2008 both x86 32-bit and 64-bit systems support MBR and GPT partition styles. It is important to note, however, that 32-bit systems can only boot from MBR disk partitions and 64-bit systems can only boot from GPT partitions.

Each partition style has different capabilities and partitioning styles. Of most significance is the fact that the two partition styles have very different configurations in terms of special mandatory partitions required in order to store data. In addition, other mandatory partitions are required on each disk style in order to operate as boot and system disks. In terms of MBR disks a master boot record (MBR) partition is required. On GPT disks, EFI system (ESP) and Microsoft Reserved (MSR) partitions must be present in order for the disk to be bootable. It is important, therefore, that these partitions are created as part of the system disk mirroring configuration process.

[edit] Mirroring Boot and System Volumes on an MBR Disk using Disk Management

The process of mirroring boot and system volumes on Windows Server 2008 MBR disks is considerably more straightforward than on GPT disks. For the purposes of this chapter we will be working with a system containing two disk drives. Disk 0 is the system disk and disk 1 is an unallocated disk installed for the purpose of mirroring the system disk. This process can be performed using either the Disk Management interface or from the command prompt using the diskpart tool (covered in the next section). The Disk Management interface can be accessed either from the Server Manager or Computer Management tools. To launch the Server Manager, open the Start menu and click on the Server Manager option, or click on the Server Manager icon in the task bar. Alternatively launch Computer Management from Start -> All Programs -> Administration Tools -> Computer Management or run compmgmt.csc at the command prompt or in a Run dialog.

Before the system disk can be mirrored it must first be converted to a dynamic disk. To achieve this right click on the system drive in the Disk Management graphical view, select Convert to Dynamic Disk... from the popup menu and follow the instructions in the resulting dialog to perform the conversion.

With the system disk now a dynamic disk, all that needs to be done is to add the new disk as a mirror of the system disk. To achieve this right click on the system volume in the Disk Management graphical view and select Add Mirror... from the popup menu. The resulting Add Mirror dialog will list the disk drives available on the system. Select the desired disk (in this case disk 1) as shown below:

Selecting a Mirror Disk for a Windows Server 2008 system volume


With a suitable mirror disk selected, click on Add Mirror to begin the resynching process. During this phase the operating system will copy all the files from the original system volume (including System, Boot, PageFile and Crash Dump) to the mirror disk. It will also create the master boot record (MBR). Finally, Windows will add the mirror as a secondary boot option in the Boot Manager such that it can be selected when the system is rebooted. During the reboot process the boot menu will appear listing the shadow system partition as Microsoft Windows Server 2008 - secondary plex:

The Windows Server 2008 boot menu with system mirror listed as secondary plex

[edit] Mirroring Boot and System Volumes on an MBR Disk from the Command Prompt

The system and boot volumes on an MBR disk may also be mirrored from the command prompt using the diskpart tool. Begin by listing the disks attached to the system using the diskpart list disk command:

DISKPART> list disk

  Disk ###  Status      Size     Free     Dyn  Gpt
  --------  ----------  -------  -------  ---  ---
  Disk 0    Online        30 GB    15 GB   *
* Disk 1    Online        17 GB    17 GB        *

In the above output disk 0 is the current system disk and disk 1 is the disk to be used as the shadow system disk. If the disks are not yet dynamic they need to be converted before the remainder of the mirroring set up and can be completed:

DISKPART> select disk 0

Disk 0 is now the selected disk.

DISKPART> convert dynamic

DiskPart successfully converted the selected disk to dynamic format.

DISKPART> select disk 1

Disk 1 is now the selected disk.

DISKPART> convert dynamic

DiskPart successfully converted the selected disk to dynamic format.

Next, we need to select the system volume on disk 0. To obtain a list of volumes, select the disk and use the list volume command:

DISKPART> list volume

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     C                NTFS   Simple        15 GB  Healthy    System
  Volume 1     D                       DVD-ROM         0 B  No Media

In the above example the system volume is listed as Volume 0. To mirror this volume, select the volume and then add disk 1 as a mirror using the add disk= command:

DISKPART> select volume 0

Volume 0 is the selected volume.

DISKPART> add disk=1

DiskPart succeeded in adding a mirror to the volume.

This will initiate the resynching process which may take some time depending on the size of the system volume. When a list volume command is run during this process, the volume status will be listed as Rebuild until the resynching is complete:

DISKPART> list volume

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     C                NTFS   Mirror        15 GB  Rebuild    System
  Volume 1     D                       DVD-ROM         0 B  No Media

When the Status changes to Healthy the mirroring is complete. Next time the system is rebooted the mirror will be listed in the boot menu as Microsoft Windows Server 2008 - secondary plex.

[edit] Mirroring Boot and System Volumes on a GPT Disk

The process to mirror a GPT based system disk on Windows Server 2008 is a slightly more complex process since the EFI and MSR partitions must be created manually on the mirror disk. For the purposes of this tutorial we will be working with a system containing a GPT system disk and a new disk numbered as disks 0 and 1 respectively. The objective will be to mirror the GTP system disk on disk 1.

The mirroring process will be performed from the command prompt using the diskpart tool which can be launched by opening a command prompt and typing diskpart. Once started, diskpart will present the DISKPART> prompt where commands may be entered.

The first step is to list the disks on the system using the list disk command:

DISKPART> list disk

  Disk ###  Status      Size     Free     Dyn  Gpt
  --------  ----------  -------  -------  ---  ---
  Disk 0    Online        30 GB    15 GB   *
  Disk 1    Online        17 GB  1995 MB   *

In the above output, disk 0 is the system disk and disk 1 is the new disk which will be used as the mirror. Before disk 1 can be used, any existing partitions on that disk must be removed. To identify any current partitions, select this disk and list partitions as follows:

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
* Partition 1    Primary             17 GB  1024 KB

Clearly, this disk already contains a partition. If this data is required, be sure to back it up before removing any partitions. Once the backup is complete, select and delete any partitions as follows:

DISKPART> select partition 1

Partition 1 is now the selected partition.

DISKPART> delete partition override

DiskPart successfully deleted the selected partition.

If the disk is currently using the MBR partition style it must be converted to GPT before proceeding. Since the disk no longer contains any partitions this can be now be achieved using the convert command:

DISKPART> convert GPT

DiskPart successfully converted the selected disk to GPT format.

The next step is to gather information about the partitions contained on the current system disk. To do so select the system disk and list the partitions:

DISKPART> select disk 0
DISKPART> list partition

Partition ###  Type              Size     Offset
-------------  ----------------  -------  -------
Partition 1    System             304 MB    32 KB
Partition 2    Primary          12996 MB   304 MB
Partition 3    Reserved            32 MB    13 GB

In the above output, Partitions 1 and 3 are the EFI and MSR partitions respectively. In order to accurately mirror the system disk these partitions also need to created on the mirror disk using the create partition command and the efi and msr options as follows:

DISKPART> select disk 1

Disk 1 is now the selected disk.

DISKPART> create partition efi size=304

Diskpart succeeded in creating the specified partition.

DISKPART> create partition msr size=32

Diskpart succeeded in creating the specified partition.

DISKPART> list partition

 Partition ###  Type              Size     Offset
 -------------  ----------------  -------  -------
 Partition 1    System             304 MB  1024 KB
*Partition 2    Reserved            32 MB   305 MB 

Having created the EFI and MSR partitions the EFI partition must be formatted with a FAT file system and populated with the files from the EFI partition on the primary system disk. Before this can be achieved, the partitions need to be assigned drive letters:

DISKPART> select disk 1

Disk 1 is now the selected disk.

DISKPART> select partition 1

Partition 1 is now the selected partition.

DISKPART> Assign letter=H

DiskPart successfully assigned the drive letter or mount point.

DISKPART> select disk 0

Disk 0 is now the selected disk.

DISKPART> select partition 1

Partition 1 is now the selected partition.

DISKPART> Assign letter=I

DiskPart successfully assigned the drive letter or mount point.

Once a drive letter have been assigned, open a second command prompt window to format the EFI partition and copy the system file. Note that it may be necessary to launch the command prompt with elevated privileges. To do this, locate the command prompt in the Start menu, right click on it and select Run as Administrator.

C:\Windows\system32>format h: /fs:fat /q /y
The type of the file system is RAW.
The new file system is FAT.
QuickFormatting 304M
Initializing the File Allocation Table (FAT)...
Format complete.

  318,586,880 bytes total disk space.
  318,586,880 bytes available on disk.

        8,192 bytes in each allocation unit.
       38,890 allocation units available on disk.

           16 bits in each FAT entry.

Volume Serial Number is 9C31-AB3A

C:\Windows\system32>xcopy i:\*.* h: /s /h

With the disk populated with the mandatory partitions, both the disks must be converted to dynamic disks using the convert command:

DISKPART> select disk 1

Disk 1 is now the selected disk

DISKPART> convert dynamic

Diskpart successfully converted the selected disk to Dynamic format.

DISKPART> select disk 0

Disk 0 is now the selected disk

DISKPART> convert dynamic

You must reboot your computer to complete this operation.

DISKPART> exit

After exiting from diskpart it will be necessary to reboot the system (possibly twice) for the conversion of the system disk to take effect. Once the disks are converted to dynamic disks the final stage in the process is to add disk 1 as the mirror for the system disk. Once again start up diskpart and execute the following commands:

DISKPART> select disk 0

Disk 0 is now the selected disk

DISKPART> select volume C

Volume 0 is the selected volume.

DISKPART> add disk=1

DiskPart succeeded in adding a mirror to the volume.

This will initiate the mirroring process which may take some time depending on the size of the system volume as Windows Server 2008 carries out the resynching process. In addition to resynching the mirrored volumes Windows will also add the mirrored disk to the boot configuration such that it will be listed as the Microsoft Windows Server 2008 - secondary plex option on the boot menu next time the system is booted.


Purchase and download the complete, updated Windows Server 2008 R2 edition
of this eBook in PDF and ePub formats for only $9.99

Add to Cart

Views
Personal tools

Find us on Facebook