Skip to main content

Chapter III Deka Volume: Block Storage

Deka Volume: Block Storage is the data disk you can attach to the VM. Block storage is used to host a database, support random read/write operations, and keep system files of the running virtual machines. If you need additional storage for your VM you can use Cloudeka Block Storage, a non-root disk.

With block storage, it is easier to modify files because you have access to the specifically required blocks in the volumes. Block storage is mounted as a storage device on the server with underlying file system protocols such as NTFS, ext3/ext4, FAT, and others designed specifically for file operations.

List of Content

Content

3.1 Creating and attaching a storage or disk

You can create a blank disk and attach it to your VM instance. This is a non-root disk.

  • On the main page of the Cloudeka application, select the Storage menu.


Image 3.1 Project Page - Storage



  • Click the Create Storage button


Image 3.2 Create Storage



  • Fill in the Create Storage form, namely:

Table 3.1 Form Create Storage


Column Description
Storage Type - Premium Volume SSD with 2250 - 4500 IOPS
- Premium Volume SSD with 750 - 2500 IOPS
Select Volume Size To determine size of storage that you need
Do you want to attach this storage to an instance or not? You can choose yes if you want attach the storage to an instance, or choose not if you want attach the storage later
Select Instance Select an instance to specify on which VM this storage will be attached
Name Volume Name for the volume
Billing Type - PPU (Pay per use), only instance data
- PPM (Pay per matrix)
- Others (category not included in PPU with fixed monthly billing model) displays components such as root disk, data disk, object storage, etc

Then click the Create Storage button to save the data or Cancel if you don’t want to save the data.


Image 3.3 Form Create Storage




Image 3.4 Form Create Storage



  • There will be a notification if the data is saved successfully “Storage has been successfully created”.


Image 3.5 Notification



3.2 Formatting and mounting a disk

After you create and attach the new disk to a VM, you must format and mount the disk, so that the operating system can use the available storage space.

3.2.1 Formatting & mounting a disk on Windows

  • Open your Windows VM, right-click the Windows Start button and select Disk Management.

    Disk Management is a system utility in Windows that enables you to perform advance storage tasks. Here are some of the things Disk Management is good for:

    • To setup a new drive
    • To extend a volume into space that’s not already part of volume on the same drive
    • To shrink a partition, usually so that you can extend a neighboring partition
    • To change a drive letter or assign a new drive letter


Image 3.6 Windows - Disk Management



  • Disk Management will appear, right click on Disk 1, then click Online. You must bring it online before you can initialize it or create volumes on it.

    The fields in Disk Management include:

Table 3.2 Disk Management


Column Description
Volume Partition and logical drives are known as volumes
Layout The type of the volume
Type The type of Disk
File System The types of file system. Disk Management only supports 3 types of file system: FAT,FAT32, and NTFS
Status The status of volume
Capacity The capacity of each volume in MB or GB
Free Space The free space of each volume in MB or GB
% Free The free space of each volume in %
Disk 0 The single physical drive you have in your system
Disk 1 another single physical drive that you just attached

Disk 0 and Disk 1 are physically different hard disk


Image 3.7 Disk Management



  • Right click on Disk 1, then click Initialize Disk. Initialize Disk erases everything on it and prepares it for use by Windows, You need initialize it before using it. You can only initialize a drive that’s not yet formatted.


Image 3.8 Disk Management - Initialize Disk



  • Disk Management prompts you to select a partition scheme for the new disk. Select GPT and click OK.

    Disk can be divided up into multiple chunks called partition. Each partition has to have a partition style, GPT or MBR. Windows uses the partition style to understand how to access the data on the disk.

Table 3.3 GPT/MBR


Column Description
GPT (GUID Partition Table) The newer GPT partition table style is required on your boot drive by newer computers that use UEFI instead of BIOS. GPT is more robust and allows for volumes bigger than 2TB, and also GPT supports up to 128 partitions on the same hard drive
MBR (Master Boot Record) Old format partition that is used by 32-bit PCs, older PCs, and removable drives such as memory cards. One of these limitations is that MBR only supports up to 4 primary partitions, the next limitation is that partitions using the MBR format have a maximum size of 2TB


Image 3.9 Disk Management - Initialize Disk (GPT)



  • After the disk is initialized, right-click the Unallocated Disk Space and select New Simple Volume.


Image 3.10 Disk Management - New Simple Volume



  • Follow the instructions in the New Simple Volume Wizard to configure a new volume.


Image 3.11 New Simple Volume Wizard



  • In the Specify Volume Size pop-up, click the Next button.

    The field in Specify Volume Size include:

Table 3.4 Specify Volume Size


Column Description
Maximum disk space in MB The maximum size you can use.
Minimum disk space in MB The minimum size you can use
Simple volume size in MB Specify the volume size as needed.


Gambar 3.12 New Simple Volume Wizard - Specify Volume Size



  • Then on Assign Drive Letter or Path, select Assign the following drive letter, then click Next.

    The field in Assign Drive Letter or Path include:

    • Assign the following drive letter, this option if you want assign the volume to a drive letter.
    • Mount in the following empty NTFS folder, you can mount (make a drive accessible) in a folder rather than a drive letter if you want. This makes the drive appear as just another folder. You can mount drives only in empty folders on NTFS volumes.
    • Do not assign a drive letter or drive path, You can choose this option if you don’t want to assign a drive letter or drive path.


Image 3.13 New Simple Volume Wizard - Assign Drive Letter or Path



  • Next is Format Partition, select Format this volume with the following settings, you can use any partition format you like, but for this example choose NTFS. Also, click the checklist on Perform a quick format to speed up the process. Then click next.


Image 3.14 New Simple Volume Wizard - Format Partition



  • The last step is to click Finish


Image 3.15 New Simple Volume Wizard - Finish



  • After you have completed the format wizard and volume, check the Status column in the list of mounted disks to make sure that the new disk has a Healthy. Now the disk is ready to use.


Image 3.16 Disk Management



3.2.2 Formating & mounting a disk on Linux

  • On your Linux VM, to do this we need to be the root user and run the following command: fdisk -l, as we can see the new hard drive, 10GB, is assigned to the path /dev/vdb.


Image 3.17 VM Linux



  • After the new hard disk has been identified, the next step is partitioning, for this, we will use the following syntax:
fdisk /dev/vdb
  • Common fdisk parameter are:
    • n: Create a new partition.
    • P: Print the partition table.
    • d: Remove a partition.
    • q: It leaves without saving the change.
    • w: Save the changes and exit the command. With this in mind we will perform the following process once the fdisk /dev/vdb command has been executed: Enter the letter n to create the new partition. - Enter the letter p to define as a primary partition - Number 1 to establish a single partition of the new disk. - Establish the value of the first sector which is 2048 by default. - Establish the value of the last sector which is 20971519. - Save the changes using the letter w.


Image 3.18 VM Linux - Fdisk



  • We can see that the process is executed correctly. If we run fdisk -l we can look at the changes in the new disk (/dev/vdb).


Image 3.19 VM Linux - Fdisk - New Disk



  • Next step is to format the new hard drive with the desired file system using the command
mkfs.ext4 /dev/vdb1

(mkfs is make file system).


Image 3.20 VM Linux - MKFS



  • After that we need to create a new directory, in this tutorial we create a new directory called /data:
mkdir /data


Image 3.21 VM Linux - New Directory



  • Next step we mount the new disk in the desired location, in this tutorial we have created a new directory called /data. use command
mount /dev/vdb1/ /data


Image 3.22 VM Linux - Mount



  • If we want that partition to be mounted permanently, it will be necessary to edit the file /etc/fstab using the preferred editor and to enter the following line. We keep the change.
/dev/vdb1 /data ext4 default 0 0


Image 3.23 VM Linux - Mount Permanent




Image 3.24 VM Linux - Mount Permanent



  • After that, use df -h command to see mounted hard drive.


Image 3.25 VM Linux - df -h



3.3 Increase Storage Size

You can increase the size of your storage disk when your VM instance requires additional storage space. But, You can only resize a storage disk to increase its size, you cannot decrease the size of storage disk. You need to detach the storage from your VM before you Increase the storage.

  • Open the Storage page, by selecting the Storage menu.


Image 3.26 Storage Page



  • In the Action column, click More then select Detach from Instance.


Image 3.27 Storage Page - Detach from Instance



  • Click the Confirm button to start the detach storage process.


Image 3.28 Storage Page - Detach Storage



  • There will be a notification if the detach storage process is successful “storage has been successfully detached”.


Image 3.29 Notification



  • On the Storage page in the Action column, click More then select Increase Size.


Image 3.30 Storage Page - Increase Size



  • Select the desired storage size, minimum size 20GB. Then click the Resize Volume button to continue the resizing process or click Cancel if you don’t want to change any data.


Image 3.31 Increase Storage Size



  • There will be a notification if the resizing process is successful “storage has been successfully increased”.


Image 3.32 Notification



  • On the Storage page in the Action column, click More then select Attach to Instance.


Image 3.33 Storage - Attach to Instance



  • Select Instance then click Confirm to continue the process or Cancel to return to the Storage page.


Image 3.34 Storage - Attach to Instance - Confirm



  • There will be a notification if the attach is successful “storage has been successfully attached”.


Image 3.35 Notification



3.4 Delete Storage

Before you delete storage, make sure to detach your storage from the instance first.

  • On the Storage page in the Action column, click More then select Delete.


Image 3.36 Storage - Delete



  • Click the Confirm button to start the process of deleting data storage or cancel if you don’t want to continue the process.


Image 3.37 Deleted Confirmation



  • If the Storage is successfully deleted, a pop up will appear “Storage has been successfully deleted”


Image 3.38 Delete Storage



×