Last updated：2021-08-03 18:56:33
After a KEC instance is created, you must log in to its operating system and mount local data disks. Optional login methods include console (WebVNC) login, SSH login, and remote connection. For more information, see Connect to instances.
This topic describes how to mount a local data disk. The formatting method described in this topic applies to a data disk of up to 2 TB. If the data disk is larger than 2 TB, refer to Partition and format a data disk of over 2 TB.
fdisk -l to view information about the data disks mounted to the KEC instance.
Partition the data disks. A data disk named vdb is used as an example.
fdisk/dev/vdb to partition the data disk.
n to create a partition.
p to create a single partition, or
e to create multiple partitions.
d. Enter the partition number. Optional values are 1 to 4.
e. Set the first sector of the partition. If you press the Enter key, the value 2048 is used by default.
f. Set the last sector of the partition. If you press the Enter key, the maximum value is used by default.
w to complete the partitioning and exit.
Format the new partition vdb1 of the data disk. The ext4 file system is used as an example. Enter
Create a mount point. In this example, the mount point is named data. Enter
mount /dev/vdb1 /data to manually mount the partition vdb1 to the mount point data.
df -h to view the mounted file system.
You must set the partition vdb1 to automatically mount at startup. Otherwise, you cannot see the file system upon startup.
vim /etc/fstab to open the /etc/fstab file.
/dev/vdb1 /data ext4 defaults 0 0 to the end of the file.
Log in to the KEC instance and open Computer Manager.
On the left navigation pane, choose Storage > Disk Management.
Right-click the target data disk and select Online.
Initialize the disk. You can select the MBR or GPT partition format. If the disk size is larger than 2 TB, select the GPT partition format.
Right-click the mounted data disk and select New Volume.
In the New Volume Wizard, use the default server and disk settings and click Next.
Set the volume size and click Next.
Assign a drive letter or folder and click Next.
Select a file system, set the allocation unit size and a volume label name, and then click Next. This example uses the default settings.
Confirm your parameter values and click Create.
Launch This PC.
Check for any new volume in the Devices and Drives section. In this example, you can see New Volume (D:), which indicates that the data disk is mounted.
You can perform data read and write operations on the partition where a volume is created.
Did you find the above information helpful?
Please give us your feedback.
Thank you for your feedback.