To format a data disk on a Linux instance, refer to Linux _ Format and mount a data disk.
If you have already attached a data disk to your ECS instance, you must log on to the instance to partition and format the data disk for use. This document describes how to create a single-partition data disk using a new data disk and format the partition. You can also create multiple partitions on a data disk according to your business needs.
- Disk partitioning and formatting are high-risk operations, so please proceed with caution. This document describes how to deal with a new blank data disk. If you have data on a data disk, make sure that you have created a snapshot of the data disk to avoid any possible data loss.
- ECS only supports partitioning data disks, not system disks. Forcibly partitioning a system disk using a third-party tool may cause unknown risks such as system crashes or data loss.
A data disk purchased along with the instance can be partitioned and formatted without being attached.
This example describes how to partition and format a 20 GB data disk on the 64-bit Windows Server 2012 R2.
On the Windows Server desktop, right click the Start icon, and select Disk Management. The data disk not formatted and partitioned (in this example, Disk 2) is in the Offline status.
Right click the blank area around Disk 2, and select Online in the context menu.
After going online, the status of Disk 2 is displayed as Not Initialized.
Right click the blank area around Disk 2, and select Initialize Disk in the context menu.
In the Initialize Disk dialog box, select Disk 2, and select a partitioning method:
- MBR is still the most common partitioning method. However, this method only supports a maximum partition size of 2 TB and creation of a maximum of four primary partitions. If you want to divide a disk into more than four partitions, you need to take a primary partition as an extended partition and create logical partitions in it.
GPT is a new partitioning method, which is not recognizable to earlier versions of Windows. The maximum partition size that GPT can support is determined by the operating system and the file system. On the Windows operating system, GPT supports creating up to 128 primary partitions.
In this example, we select the MBR partitioning method, and click Yes.
In the Disk Management window, right click the Unallocated area of Disk 2 and select New Simple Volume.
In the New Simple Volume Wizard, do the followings:
- Click Next.
- Specify Volume Size: Specify the size of the simple volume to create. If you need only one primary partition, use the default value, and then click Next.
- Assign Drive Letter or Path: Select a drive letter (in this example, F). Click Next.
- Format Partition: Select the formatting settings, including file system, allocation unit size, and volume label, and confirm whether to Perform a quick format and Enable file and folder compression. Use the default settings here. Click Next.
- Start creating a new simple volume. When a new simple volume has been created, click Finish to close New Simple Volume Wizard.
After the partition formatting is completed, the status of Disk 2 in Disk Management is as shown in the following screenshot.
You can view the new drive New Volume (F:) in This PC, which means the data disk is ready for use.