Before data can be stored in a new data disk that is attached to an Elastic Compute Service (ECS) instance, you must create and mount one or more file systems on the disk. This topic describes how to partition and format a new data disk on a Windows instance.

Prerequisites

An independent data disk is created and attached to an instance. For information about how to attach data disks to instances, see Attach a data disk.

Background information

Data disks support the GUID Partition Table (GPT) and Master Boot Record (MBR) partition formats.
  • GPT: can recognize partitions larger than 2 TiB in size and allows up to 128 partitions to be created on each disk.
  • MBR: can recognize partitions up to 2 TiB in size and allows up to four primary partitions to be created on each disk.
Note The data disks created along with an instance are automatically partitioned and formatted. You can use them directly without the need to manually partition or format them as described in this topic.

Precautions

When you partition and format a data disk, take note of the following items:
  • Disk partitioning and formatting are high-risk operations. Exercise caution when you partition and format disks. This topic applies only to new data disks.

    If you want to format a data disk to which data has been written, you must create a snapshot for the disk before you format it to prevent data loss. For more information, see Create a snapshot for a disk.

  • In ECS, only data disks can be partitioned, whereas system disks cannot.

    If you use a third-party tool to forcibly partition a system disk, unforeseen risks such as system failures and data loss may occur. You can only extend or create partitions on system disks that have been extended. For more information, see Resize disks online for Windows instances.

Procedure

In the following examples, an instance that runs a Windows Server 2012 R2 64-bit operating system is used.

  1. Open the Disk Management window and find a data disk that is not partitioned or formatted.
    1. Connect to an instance that runs a Windows Server operating system.
    2. On the Windows Server desktop, click the Server Manager icon in the lower-left corner.
      Server Manager
    3. In the Server Manager window, choose Tools > Computer Management in the upper-right corner.
    4. In the left-side navigation pane, choose Computer Management (Local) > Storage > Disk Management.
    5. Find a data disk that is not partitioned or formatted, which is in the Offline state.
      disk01
  2. Right-click the blank area around the disk and select Online.
    When the disk goes online, it enters the Not Initialized state.
  3. Right-click the blank area around the disk and select Initialize Disk.
  4. In the Initialize Disk dialog box, select the disk, select a partition format, and then click OK.
    OK

    You can select GPT or MBR as the partition format.

    • GPT is a new partition format that can define data disks larger than 2 TiB in size. The maximum data disk size that GPT supports is determined based on the operating system and the file systems. In Windows, GPT supports up to 128 primary partitions on each disk.
      Note If your data disk is larger than 2 TiB in size or may need to be extended to larger than 2 TiB, we recommend that you select GPT.
    • MBR can define data disks that are up to 2 TiB in size and supports up to four primary partitions on each disk. If you want to create more partitions on an MBR disk, you must use a primary partition as an extended partition and create logical partitions in the primary partition.
  5. Right-click the Unallocated section and select New Simple Volume.
    New Simple Volume
  6. In the New Simple Volume Wizard dialog box, perform the following operations:
    1. Click Next.
    2. In the Specify Volume Size step, set Simple volume size in MB and click Next.
      If you want to create only a single primary partition on the data disk, use the default value.
    3. In the Assign Drive Letter or Path step, select Assign the following drive letter, select a drive letter, and then click Next.
    4. In the Format Partition step, select Format this volume with the following settings, configure formatting settings, and then click Next.
      Enable file and folder compression
    5. Check the settings and click Finish.

Result

After the data disk is partitioned and formatted, it enters the Healthy state, as shown in the following figure. Disk Management

In This PC, you can find a new drive named New Volume (E:). The data disk is ready for use.