Elastic Cloud Server Cloud Disk Usage Instructions

Published: 2018-08-21

A cloud disk is similar to a portable hard drive. It 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. Within the same cluster, you can use a cloud disk to copy and transfer data.

Example application scenario: There are two servers, A and B. To copy data from server A to 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 Image to Clone, Create and Migrate Data [Cloud Image]  

Elastic Cloud Host Change Data Center Line (Cluster), Data Automatically Migrates

Elastic Cloud Host Cloud Snapshot Usage Instructions and Data Recovery


I. Cloud Disk Purchase.

1. Server Management -- Manage. In the server control panel, click the "Data Management" button, locate and click Cloud Disk. Or go to Business Management -- Cloud Storage Management -- Cloud Disk Management 

image.png

2. Click Purchase 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.

image.png

II. Mounting and Using a Cloud Disk.

1. Mount. Click the Mount button, select the server in the same cluster to mount to, and Confirm Mount. Tip: A server can mount up to ten cloud disks.

image.png

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.

image.png

Right-click the disk, select New Simple Volume, then follow the prompts and keep clicking Next. Wait for the system to format it automatically, and then it can be used.

image.png

Windows 2003 system does not have the Online step; directly create a new volume.

②. Linux system.

SSH log in to the server (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 query disk information. The disk name after mounting a cloud disk is generally /dev/vdc

Note: If multiple disks are mounted, the names will be sequentially named in English 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.

image.png

Then partition the disk.

Gray content islinux system 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 //The 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     //Query 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 actual names


Note: If multiple cloud disks are mounted, repeat the above operations, but fill in the actual disk names for the disks being operated on, and create different directory names for mounting.

Unmount

Windows system:

Right-click the disk and click Offline.

image.png

Linux system:

[root@ebs-46580 ~]# umount /dev/vdc1  //Enter the command to unmount the partition


After performing the disk unmount operation within the server, go to the cloud disk management interface and click Unmount.

image.png


III. Cloud Disk Management.

image.png

1. Cloud disk renewal. Click the Renew button to renew.

2. Capacity Expansion. Click the Expand button to expand the cloud disk.

Note: After expansion, you need to shut down and then power on again for it to take effect. For Linux systems, after SSH login, enter halt now or init 0 to shut down. After one minute of shutdown, power it on from the console.

image.png

After expansion, refer to the following tutorials to merge disks:

Windows system: https://www.west.cn/faq/list.asp?unid=512

Linux system: https://www.west.cn/faq/list.asp?unid=587 

Note: Whether Windows or Linux, please expand according to the actual situation. When one cloud disk is mounted, Windows generally uses drive E, and Linux generally uses disk name /dev/vdc.