Help Center/ Elastic Cloud Server/ User Guide/ Disks/ Initializing Data Disks
Updated on 2025-09-08 GMT+08:00

Initializing Data Disks

After you attach a new data disk to a server, you must initialize the disk including creating partitions, creating file systems, and mounting the partitions before you can use the disk.

This section describes the scenarios, operation guide, and partition styles of initializing data disks.

Scenarios

  • System disk

    When a server is created, a system disk is automatically initialized with Master Boot Record (MBR).

  • New data disk
    • If a data disk is created together with a server, EVS automatically attaches it to the server. You only need to initialize it to make it available for use.
    • If a data disk is created explicitly, you need to first attach it to a server and then initialize it.

    For detailed operation instructions, see Table 2.

  • Existing data disk
    An existing data disk is a disk created from a snapshot, a backup, or an image, or a disk detached from another server.
    • You can choose not to initialize the disk and use the disk existing partitions.
    • You can also re-initialize the data disk.

      Re-partitioning a disk will erase all the existing data on the disk, so you are advised to use snapshots to back up the disk data first.

      • In Linux, unmount the partitions, delete them (by running fdisk <disk-name>, entering d and the partition number, and entering w), and then re-initialize the disk.
      • In Windows, delete the partitions (using the volume deletion tool) and then re-initialize the disk.

      For detailed initialization operations, see Table 2.

Impact on the System

  • An initialization operation includes partitioning, which deletes all the data on the disk.
  • If you change the partition style of a disk, data on the disk will be erased. Select an appropriate partition style when initializing disks.
  • Initializing a disk does not delete the snapshots created for the disk, so you can still use snapshots to roll back data to the source disk after the disk is initialized.

Partition Styles

The common disk partitioning styles are Master Boot Record (MBR) and GUID Partition Table (GPT). The following table lists Linux partition tools used for different partition styles.

Table 1 Disk partition styles

Partition Style

Max. Disk Size Supported

Max. Number of Partitions Supported

Description

Linux Partitioning Tool

MBR

2 TiB

MBR supports a maximum of four primary partitions. You can set one of the primary partitions as an extended partition. Typical partition styles are as follows:

  • Four primary partitions
  • Three primary partitions and one extended partition

MBR partitions include primary and extended partitions. The extended partition must be divided into logical partitions before use. For how to create logical partitions, see Creating a Logical Volume Using LVM.

For example, you can create six partitions in the following two ways:
  • Three primary partitions and one extended partition, with the extended partition divided into three logical partitions
  • One primary partition and one extended partition, with the extended partition divided into five logical partitions
  • fdisk
  • parted

GPT

18 EiB (1 EiB = 1,048,576 TiB)

Not limited

GPT partitions are not categorized.

parted

Operation Instructions

The maximum disk size that MBR supports is 2 TiB, and that GPT supports is 18 EiB. If your disk is greater than 2 TiB or you may expand it to over 2 TiB later, use GPT when initializing disks.

Table 2 Disk initialization instructions

Disk Capacity

Partition Style

Partition Type

Operating System

Reference

Capacity ≤ 2 TiB

GPT/MBR

GPT partitions are not classified, and there is no limit on the number of GPT partitions.

MBR partitions can be:

  • Four primary partitions
  • Three primary partitions and one extended partition

The number of logical partitions allowed in the extended partition is not limited, so theoretically you can create as many logical partitions as you want.

If you need five or more partitions, use the "primary partitions + one extended partition" model and then create logical partitions in the extended partition.

Linux

Initializing a Linux Data Disk (Less Than or Equal to 2 TiB)

Windows

Initializing a Windows Data Disk

Capacity > 2 TiB

GPT

GPT partitions are not classified, and there is no limit on the number of GPT partitions.

Linux

Initializing a Linux Data Disk (Greater Than 2 TiB)

Windows

Initializing a Windows Data Disk