Hard disk drives become much bigger and it's common to use a 2TB or 4TB disk. Many servers are built with hardware RAID arrays, the virtual disk may be larger than 10TB. If you build a RAID 5 array with 3 3TB hard disks, the virtual disk in Disk Management is 6GB. If this disk is initialized as MBR, you can only use 2TB space, the remaining 4TB disk space is shown as Unallocated at the end. This space cannot be used to create new volume or expand other partition. To use full disk space, you must convert disk from MBR to GPT. If there are 4 partitions on a disk and Windows doesn't allow creating more volume, you also need to change MBR disk to GPT. In this article I'll introduce how to convert MBR to GPT in Windows Server 2012 (R2) with MBR2GPT command tool and third party disk converter.
Convert MBR to GPT in Server 2012 Disk Management (destructive)
To convert MBR to GPT in Windows Server 2012 R2, there are several ways. Windows has built-in Disk Management and diskpart command tool to help convert disk type, but you must delete all partitions on the MBR disk in advance.
In diskpart command prompt window, type help convert GPT and you'll see the syntax, note and example of convert command.
In Disk Management console, when you right click the front of a MBR disk, there is also an option, but the "Convert to GPT Disk" option is grayed out if there's a partition on it.
With MBR2GPT.exe (Microsoft provided) and NIUBI Partition Editor, you can convert MBR to GPT in Server 2012 without losing data. Before starting, make sure the MBR disk that you want to convert is data disk or system disk, because the method is different.
How to convert MBR to GPT for non-system disk (nondestructive)
If there's only data on the MBR disk, it is extremely easy and fast to convert it to GPT without losing data, only several clicks are needed.
Steps to convert MBR to GPT in Windows Server 2012 R2 without operating system:
- Download NIUBI Partition Editor, right click the front of the MBR disk and select "Convert to GPT Disk".
- Simply click Yes to confirm, then a pending operation is added.
- Click Apply on top left to execute, done. (All operations before clicking Apply only work in virtual mode.)
Watch the video how to convert disk from MBR to GPT in Windows Server 2012:
How to convert MBR to GPT in Windows Server 2012 for system disk
If there's operating system on the MBR disk, it's a bit complicated, because all system files must keep intact and the OS must boot correctly after converting to GPT. There are some 3rd-party software that claim to be able to convert MBR disk to GPT with operating system in it, but few can ensure 100% system bootable. If you want to convert a system disk from MBR to GPT, it is suggested to run MBR2GPT.exe which is a command prompt tool and provided by Microsoft.
Server 2012 mbr2gpt.exe command prompt
MBR2GPT.exe is running from command prompt. On Windows Server 2019 and Windows 10 (1703 and later versions), you can convert MBR to GPT with this command in Windows. But to run mbr2gpt in Server 2012 (R2), you need bootable media with Windows Preinstallation Environment (Windows PE).
To convert disk with MBR2GPT in Windows 2012 server, your disk partition must meet the requirements below. Otherwise, the conversion can't be successful. But don't worry, before any change to the disk is made, MBR2GPT validates the layout and geometry of the selected disk, if any of these checks fails, the conversion will not proceed and an error message will be returned. Your disk partition won't be damaged.
① Precondition to run MBR2GPT cmd in Server 2012 R2:
- There should be no Logical drive on this MBR disk.
- There should be 3 or less Primary partitions on this MBR disk.
- One of the partitions is set as active and is the system partition.
- All partitions on this MBR disk are recognized by Windows, that means there are no EXT2/EXT3 and other types of Linux or Mac partitions.
② Common issue and corresponding solution
"Validating layout, disk sector size is: 512 bytes Disk layout validating failed for disk 0", "MBR2GPT: Conversion failed". This is the most common error message while converting MBR disk to GPT in Windows Server 2012 and other versions. If you received such error, check your disk partition configuration again.
In most of Windows 2012 server system disk, there are System Reserved, C: (for OS) and D drive. If all these partitions are Primary, you can convert disk to GPT successfully. If your disk partition layout doesn't meet the requirements, follow the methods to modify:
③ Expand System Reserved partition (optional)
For Windows to remain bootable after the conversion, an EFI system partition (ESP) must be in place. MBR2GPT will shrink the System Reserved partition first. If there is not enough free space in System Reserved partition, MBR2GPT will shrink C drive, then the EFI partition will be created behind C drive after converting to GPT disk.
When right clicking the EFI partition in Disk Management, all options are grayed out. That means Disk Management cannot shrink or extend this partition. However, it doesn't matter to NIUBI Partition Editor, because it can shrink, extend and move EFI partition without losing file in it.
④ How to run mbr2gpt.exe in Server 2012 to change MBR to GPT (cmd)
As I said above, MBR2GPT.exe is built in Windows Server 2019 and Windows 10, it is not included in early Windows versions. To run MBR2GPT in Server 2012 (R2), you need Windows Preinstallation Environment and run command prompt from it.
Steps to convert mbr to gpt in Windows Server 2012 (R2) with MBR2GPT cmd:
Step 1: Download Windows Server 2019 ISO and create bootable DVD or USB flash drive with Windows built-in or third-party tool. If you use VMware, Hyper-V virtual machine, you just need to select this ISO file and boot from it.
Step 2: Boot from this bootable media, simply click Next in first Windows Setup window, then click Repair your computer on th bottom left corner of next window.
Step 3: Click Troubleshoot in next window, then click Command Prompt.
Step 4: Just input 2 commands to complete converting.
- mbr2gpt /convert
As you see, the command window reports conversion completed successfully.
Because I extended the System Reserved partition, restart server and boot to UEFI, as you see, disk 0 is converted to GPT and the EFI partition is created on left side of C drive.
Besides converting MBR to GPT for Server 2012, NIUBI Partition Editor helps you convert partition between Primary and Logical, convert NTFS to FAT32 without losing data. It also helps you shrink, extend, move, merge, copy, wipe partition and much more.