Skip to main content

Create and manage volume

The following is to manage volumes and snapshots attached to VM instances.

Create volume

Create a new volume.

  1. Go to Beyond Compute Service > Virtual Machine in KakaoCloud Console.

  2. Select the Volume menu and click the [Create volume] button located in the upper right.

  3. Enter the required information and click the [Create] button.

    image. Volume creation Create volume

    CategoryDescription
    Volume nameName of the volume
    Description (optional)Description of the volume
    TypeVolume type
    SizeVolume size
    - 1 to 5,120 GB
    Max IOPSMaximum IOPS depending on the set volume size
    - 3,000 IOPS to 16,000 IOPS
    Availability ZoneAvailability zone to create the volume
    Snapshot scheduleWhether or not to create a snapshot schedule

Manage volume

View volume list

Check the list of operating volumes and basic information about each volume.

  1. Go to Beyond Compute Service > Virtual Machine in KakaoCloud Console.

  2. Check the list of currently operating volumes in the Volume menu.

    CategoryDescription
    NameVolume name and description
    IDVolume ID
    StateVolume state
    - Refer to Instance lifecycle
    Attached instanceConnected instances and mount points
    - Click on the instance name to go to the instance's detail page
    - Check the instance ID by hovering over the UUID
    Mount pointMount point
    TypeType of volume
    SizeSize of volume
    Snapshot scheduleConnected snapshot schedule
    AZAvailability zone in which the volume was created
    CreatedVolume creation date and time
    MoreExecute functions for each item
    - Modify volume: Set the volume to apply to the instance
    - Attach/Detach volume: Set and disable the instance to connect
    - Delete when instance is deleted: Delete volume when the instance is deleted
    - Create snapshot: Create a snapshot for a volume
    - Attach/detach snapshot schedule: Set and disable a snapshot schedule to connect
    - Delete volume: Delete the created volume

View volume details

You can view detailed information about the volume, as well as manage snapshot information created from the selected volume.

  1. Go to Beyond Compute Service > Virtual Machine in KakaoCloud Console.

  2. Select a volume from the Volumes menu.

  3. Review the information on the volume's detail page.

    image Volume details

    SectionDescription
    Volume name and description
    Click the [Volume actions] icon to see the list of all available actions.
    Detailed information of the volume:
    - Operational Status: Refer to Volume state for detailed volume status.
    - Size: Size of the volume.
    - Type: Type of the volume.
    Tabs for detailed information:
    - Details tab: Volume ID, name, and other volume details
    - Snapshot tab: Snapshot type, size, and state

View volume by instance

Check volume information attached to the instance.

  1. Go to Beyond Compute Service > Virtual Machine in KakaoCloud Console.
  2. In the Instance menu, select an instance.
  3. Check the volume information for the instance in the Volume menu.

Modify volume

You can modify a volume.

  1. Go to Beyond Compute Service > Virtual Machine in KakaoCloud Console.

  2. In the Volume menu, select the [More] icon and click Modify volume.

    • For the volume size, only values larger than the existing volume size can be entered in 1GB increments. After extending the volume size, update the size of the file system by referring to Extend file system.
  3. Set the volume and click the [Save] button.

Attach volume

The newly created volume is in the Available state and is not attached to an instance. Attach the volume to the instance and connect it to the device according to the followings.

Attach volume from console

Here's how to attach a volume to an instance.

  1. Go to Beyond Compute Service > Virtual Machine in KakaoCloud Console.
  2. In the Volume menu, click the [More] icon and Attach volume.
  3. Enter the required information and click the [Save] button.
info

If you set the Delete when instance is deleted option when attaching a volume to an instance, the attached volume will also be deleted when deleting the instance.

Attach volume on Linux

In a Linux environment, access the instance via SSH to set up the file system and mount point.

  1. Use the lsblk command to check whether the volume attached from the console is properly connected as a device.

    • e.g. Execute the lsblk command to confirm that the newly created 8G size volume is connected to /dev/vdb.
    lsblk command (check device connection)
    ubuntu@volume-attach-1:~$ lsblk
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    vda 252:0 0 20G 0 disk /boot
    vdb 252:16 0 8G 0 disk
  2. Use the file -s command to check the file system type. If data is output, it means that there is no file system on the device.

    file -s command (check file system type)
    ubuntu@volume-attach-1:~$ sudo file -s /dev/vdb
    /dev/vdb: data
  3. If there is no file system, create a file system using the mkfs -t command.

    mkfs -t command (without file system)
    ubuntu@volume-attach-1:~$ sudo mkfs -t xfs /dev/vdb
    meta-data=/dev/vdb isize=512 agcount=4, agsize=65536 blks
    = sectsz=512 attr=2, projid32bit=1
    = crc=1 finobt=1, sparse=1, rmapbt=0
    =reflink=1
    data = bsize=4096 blocks=262144, imaxpct=25
    = sunit=0 swidth=0 blks
    naming =version 2 bsize=4096 ascii-ci=0, ftype=1
    log =internal log bsize=4096 blocks=2560, version=2
    = sectsz=512 sunit=0 blks, lazy-count=1
    realtime =none extsz=4096 blocks=0, rtextents=0
  4. Confirm that the file system was created properly.

    file -s command (check file system creation)
    ubuntu@volume-attach-1:~$ sudo file -s /dev/vdb
    /dev/vdb: SGI XFS filesystem data (blksz 4096, inosz 512, v2 dirs)
  5. Use the mkdir command to create a mount point directory to use the volume.

    • The mount point is the location where files are read and written after the volume is mounted.
    mkdir command (create mount point directory)
    ubuntu@volume-attach-1:~$ sudo mkdir -p /data/vdb
  6. Use the mount command to attach the directory and volume created in the previous step.

    mount command (attaching directories and volumes)
    ubuntu@volume-attach-1:~$ sudo mount /dev/vdb /data/vdb
  7. Use the lsblk command to check whether the file system and mount point have been applied properly.

    lsblk command (check file system and mount point enforcement)
    ubuntu@volume-attach-1:~$ sudo lsblk
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    vda 252:0 0 20G 0 disk /boot
    vdb 252:16 0 8G 0 disk /data/vdb
  8. To maintain the attached volume even after system reboot, first check the UUID of the device.

    lsblk command (check device's UUID)
    ubuntu@volume-attach-1:~$ lsblk -o +UUID
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT UUID
    vda 252:0 0 20G 0 disk /boot 876da551-d737-4350-9cd9-bb3fc9069bff
    vdb 252:16 0 1G 0 disk /data/vdb 2d332f0b-1771-4b83-bd5c-7e9d1cc91ed2
  9. Add the above content to the /etc/fstab file using the confirmed UUID.

    Keep volumes connected after system reboot
    UUID=2d332f0b-1771-4b83-bd5c-7e9d1cc91ed2 /data/vdb xfs defaults,nofail 0 2

Attach volume on Linux(xfs)

For instances created with OS images using the XFS file system (such as CentOS Stream 8, Rocky Linux 8, etc.), there may be an issue where the instance fails to connect to a restored snapshot of the root volume due to duplicate UUIDs after creating a snapshot and restoring it to the same instance. Proceed with the following steps.

  1. Mount the file system using the nouuid option.

    • In case of temporary use, this problem can only be solved with this procedure.

      mount command (mount and nouuid options)
      [centos@centos-stream-8 test]$ sudo mount -t xfs -o nouuid /dev/vdb1 /home/centos/test
  2. Unmount.

    umount command (unmount)
    [centos@centos-stream-8 test]$ sudo umount /dev/vdb1
  3. Regenerate the UUID.

    • For a permanent solution, proceed with the relevant procedure.

      xfs_admin command (uuid regeneration)
      [centos@centos-stream-8 test]$ sudo xfs_admin -U generate /dev/vdb1
      Clearing log and setting UUID
      writing all SBs
      new UUID = ff714d9b-8c90-40e2-9e2f-12623220e1cf
  4. Set the newly created UUID to the restored snapshot volume.

    xfs_admin command (UUID update)
    [centos@centos-stream-8 test]$ sudo xfs_admin -U ff714d9b-8c90-40e2-9e2f-12623220e1cf /dev/vdb1
    Clearing log and setting UUID
    writing all SBs
    new UUID = ff714d9b-8c90-40e2-9e2f-12623220e1cf
  5. Mount the restored snapshot to the instance mount point.

    mount command (remount)
    [centos@centos-stream-8 test]$ sudo mount /dev/vdb1 /home/centos/test

Attach volume on Windows

In a Windows environment, connect to the instance via remote desktop to initialize disks and allocate volumes.

  1. Start > Run or type the WIN + R shortcut keys.

  2. In the Run screen, enter diskmgmt.msc and click the [OK] button or press Enter.

  3. Select newly added disk in Disk Management, then right-click and select Online to bring it online.

  4. Select the newly added disk, right-click, and select Initialize Disk. When selected, a disk initialization pop-up window will appear.

  5. After checking the newly added disk, select the GPT partition table and click the [OK] button.

    • To connect a disk exceeding 2TB, select a GPT partition table.
  6. After selecting the initialized disk, right-click and select New Simple Volume. When selected, the Simple Volume Creation Wizard pops up.

  7. Run the Create Simple Volume Wizard.

  8. In the Simple Volume Wizard, follow the instructions to select volume size, drive letter assignment, format options, etc., then exit to complete the volume connection.

Detach volume

Detach volumes that are no longer in use.

info

It is not possible to detach a root volume that is being used by an instance as an OS area.

  1. Go to Beyond Compute Service > Virtual Machine in KakaoCloud Console.

  2. In the Volume tab > Volume list, select the [More] icon and click Detach volume.

  3. Check the volume and instance to be detached and click the [Detach] button.

Expand volume

The following is to Expand volume.

info
  • After extending the volume size, use file system-related commands to extend the size of the file system.
     ㄴ Extending volume can be started after the volume state changes to Extending.
  • In order to apply a new volume QoS (Quality of Service) after extending the volume size, the following actions are required depending on the volume type.
     ㄴ If it is a root volume, Shelve (terminate) the instance. Then, run unshelve (start) the instance.
     ㄴ If it is an additional volume, run detach (detach) the volume and then attach (attach) the volume.
  1. Go to Beyond Compute Service > Virtual Machine in KakaoCloud Console.
  2. Click the Volume menu, then select the [More] icon and click Modify volume.
  3. Enter the capacity to extend in Size and click the [Save] button.

Extend filesystem

In order to Expand volume size and store data in the added disk space, directly connect to the instance and update the size of the file system and partition. After extending the volume size, use the file system and partition-related commands in your instance to extend the file system as follows. Note that the procedures may vary depending on the file system and partition configuration of your instance.

The partition table format and file system type for each OS provided by KakaoCloud are as follows.

OS nameVersionRoot volume partition table formatFile system
Ubuntu20.04GPT              ext4
Ubuntu22.04GPText4
Ubuntu24.04GPText4
CentOS Stream9MBRxfs
Rocky Linux8.10MBRxfs
Rocky Linux9.4MBRxfs
Alma Linux8.10GPTxfs
Alma Linux9.4GPTxfs
Windows2019MBRntfs
Windows2022MBRntfs
info

Changing the file system or partition does not modify or delete the data on the volume. Before changing file systems and partitions, it is recommended to backi up volumes containing important data so that you can revert the changes if necessary.

The procedure for extending the system that can be applied to ext4 and xfs, the most widely used Linux file systems, is as follows. The following Linux example demonstrates how to extend the volume and extend the partition and file system of an instance with a pre-created 50GB root volume to increase its size to 80GB.

Step 1. Connect instance

In the terminal, use the ssh command to connect to the instance. For a details of the connection process, please refer to Create and connect instance.

Step 2. Check partition and file system info

  1. Use the lsblk and df commands to check the partition and extend the file system.

    • e.g. If you look at the partition information before extending the volume, the 50G-sized root volume is connected to the device name /dev/vda, and the 30G-sized non-root volume is connected to /dev/vdb. The root volume, /dev/vda device, has a vda1 partition of 50G size.

      lsblk command (before extending volume)
      ubuntu@volume-test:~$ sudo lsblk
      NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
      vda 252:0 0 50G 0 disk
      ├─vda1 252:1 0 49.9G 0 part /
      ├─vda14 252:14 0 4M 0 part
      └─vda15 252:15 0 106M 0 part /boot/efi
      vdb 252:16 0 30G 0 disk /data
  2. After extending the root volume size, run the lsblk command to check the extended root volume.

    • e.g. When executing the lsblk command after extending the root volume size to 80G, the size of the /dev/vda device is extended to 80G, but the size of the vda1 partition remains unchanged at 50G.

      lsblk command (after extending volume)
      ubuntu@volume-test:~$ sudo lsblk
      NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
      vda 252:0 0 80G 0 disk
      ├─vda1 252:1 0 49.9G 0 part /
      ├─vda14 252:14 0 4M 0 part
      └─vda15 252:15 0 106M 0 part /boot/efi
      vdb 252:16 0 30G 0 disk /data
  3. By executing the df command, you can check the file system type of the volume attached to the instance.

    • e.g. The size of the /dev/vda1 partition is still 50G, and view information that it is using ext4.

      df command
      ubuntu@volume-test:~$ sudo df -Th
      Filesystem Type Size Used Avail Use% Mounted on
      ..
      /dev/vda1 ext4 49G 1.5G 47G 3% /
      ..
      /dev/vdb ext4 30G 45M 28G 1% /data

Step 3. Extend partition

  1. Use the growpart command to extend the partition size to its maximum size.

    • e.g. Run the growpart command to extend the vda1 partition size.

      Extend partition size
      ubuntu@volume-test:~$ sudo growpart /dev/vda 1
  2. After expansion, run the lsblk command to check the size of the extended partition.

    • e.g. After expansion, run the lsblk command to confirm that the vda1 partition size has been extended to 80G.

      Confirm after extending partition
      ubuntu@volume-test:~$ lsblk
      NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
      vda 252:0 0 80G 0 disk
      ├─vda1 252:1 0 79.9G 0 part /

Step 4. Extend file system

Extend the file system to store data in the extended space.
Commands vary depending on the file system type.

  1. If you are using ex4, use the resize2fs command, if you are using xfs, use the xfs_growfs command.

    sudo resize2fs /dev/vda1
  2. Check the extended file system with the df command. After completely extending the file system, you can save data to the added disk space without having to reboot the instance.

    • Execute the df command to confirm that the /dev/vda1 file system has been extended to 80G.

      df command (after file system expansion)
      ubuntu@volume-test:~$ df -Th
      Filesystem Type Size Used Avail Use% Mounted on
      /dev/vda1 ext4 78G 1.6G 76G 2% /
      ..
      /dev/vdb ext4 30G 45M 28G 1% /data
      ..