Elastic Cloud Server Cloud Disk Usage Instructions
Published: 2018-08-21
A cloud disk is similar to a mobile hard drive and can be mounted to any server in the same cluster (it can only be mounted to one server at a time).
When the server disk is insufficient, you can activate a cloud disk to store data, but the cloud disk cannot be merged into the current disk (partition). It can only be assigned a separate disk drive letter, and in Linux it is mounted as a separate partition. In the same cluster, you can use the cloud disk to copy and transfer data.
Example application scenario: There are two servers, A and B. To copy data from server A to server B, first mount the cloud disk to server A and copy the data to the cloud disk, then unmount it and remount it to server B.
Note: Cloud disks do not provide snapshots, so it is recommended to regularly back up very important data locally.
Other related tutorials:
Elastic Cloud Host Uses Cloud Images to Clone New Instances and Migrate Data [Cloud Image]
Elastic Cloud Host Data Automatically Migrates When Changing Data Center Line (Cluster)
Elastic Cloud Host Cloud Snapshot Usage Instructions and Data Recovery
I. Purchasing a cloud disk.
1. Server Management -- Manage. In the server control panel, click the "Data Management" button, then find and click Cloud Disk. Or go to Business Management -- Cloud Storage Management -- Cloud Disk Management

2. Click to purchase a cloud disk and activate it according to your needs. Note: The cloud disk name can only consist of English letters and numbers, and underscores can be used.

II. Mounting and using a cloud disk.
1. Mounting. Click the Mount button, select the server in the same cluster to mount it to, and confirm mounting. Tip: A server can mount up to ten cloud disks.

2. Disk partitioning and unmounting.
Disk partitioning
①. Windows system.
Log in to the server remotely, enter compmgmt.msc in Run to open Computer Management, find Disk Management, then right-click the disk and select Online.

Right-click the disk, select New Simple Volume, then keep clicking Next according to the prompts, and wait for the system to automatically format it before use.

Windows 2003 system does not have the Online step; directly create a new volume.
②. Linux system.
Log in to the server via SSH (if you do not know how to log in, please refer to: https://www.west.cn/faq/list.asp?unid=417 )
Enter fdisk -l to check disk information. The disk name of a mounted cloud disk is generally /dev/vdc
Note: If multiple disks are mounted, the names will be assigned in alphabetical order as /dev/vdd, /dev/vde, /dev/vdf, /dev/vdg, etc., so when mounting multiple disks, please pay attention to checking the disk names.

Then partition the disk.
Gray content islinuxsystem display contentRed is the command to be entered//Green content is command or display content explanation
[root@ebs-46580 ~]# fdisk /dev/vdc //Disk partitioning command. Note that if multiple disks are mounted, /dev/vdc should be replaced with the actual disk name
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): n //Create a new partition
Command action
e extended
p primary partition (1-4)
p //Primary partition
Partition number (1-4): 1 //First partition
First cylinder (1-20805, default 1): //Press Enter directly
Using default value 1 //Press Enter directly
Last cylinder, +cylinders or +size{K,M,G} (1-20805, default 20805):
Using default value 20805
Command (m for help): w //Save
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@ebs-46580 ~]# mkfs.ext4 /dev/vdc1 //Format
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
655360 inodes, 2621422 blocks
131071 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2684354560
80 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@ebs-46580 ~]# mkdir /test //Create a directory for mounting; /test can be changed to the name you need
[root@ebs-46580 ~]# mount /dev/vdc1 /test //Mount the disk to /test
[root@ebs-46580 ~]# df -lh //Check mount status
Filesystem Size Used Avail Use%% Mounted on
/dev/vda1 30G 2.7G 26G 10% /
tmpfs 939M 0 939M 0% /dev/shm
/dev/vdb1 9.1G 2.1G 6.6G 24% /home
/dev/vdb2 11G 49M 9.9G 1% /home2
/dev/vdc1 9.8G 23M 9.2G 1% /test //The partition just mounted
[root@ebs-46580 ~]#echo "/dev/vdc1 /test ext4 defaults 0 0">>/etc/fstab //Write to the partition table; /dev/vdc1 and /test should be based on the actual names
Note: If multiple cloud disks are mounted, repeat the above operations, but fill in the actual disk name for the disk being operated on, and create different directory names for mounting.
Unmounting
Windows system:
Right-click the disk and click Offline.

Linux system:
[root@ebs-46580 ~]# umount /dev/vdc1 //Enter the command to unmount the partition
After unmounting the disk within the server, go to the cloud disk management interface and click Unmount.

III. Cloud disk management.

1. Cloud disk renewal. Click the Renew button to renew.
2. Expansion. Click the Expand button to expand the cloud disk.
Note: After expansion, you need to shut down and then start up again for it to take effect. In a Linux system, after logging in via SSH, enter halt now or init 0 to shut down. After one minute, start up again from the console.

After expansion, refer to the following tutorials to merge the disk:
Windows system: https://www.west.cn/faq/list.asp?unid=512
Linux system: https://www.west.cn/faq/list.asp?unid=587
Note: Whether it is a Windows or Linux system, please expand according to the actual situation. When mounting one cloud disk, Windows is generally drive E, and in Linux the disk name is generally /dev/vdc.
