Create and manage volume
The following is to manage volumes and snapshots attached to VM instances.
Create volume
Create a new volume.
-
Go to Beyond Compute Service > Virtual Machine in KakaoCloud Console.
-
Select the Volume menu and click the [Create volume] button located in the upper right.
-
Enter the required information and click the [Create] button.
Create volume
Category Description Volume name Name of the volume Description (optional) Description of the volume Type Volume type Size Volume size
- 1 to 5,120 GBMax IOPS Maximum IOPS depending on the set volume size
- 3,000 IOPS to 16,000 IOPSAvailability Zone Availability zone to create the volume Snapshot schedule Whether or not to create a snapshot schedule
Manage volume
View volume list
Check the list of operating volumes and basic information about each volume.
-
Go to Beyond Compute Service > Virtual Machine in KakaoCloud Console.
-
Check the list of currently operating volumes in the Volume menu.
Category Description Name Volume name and description ID Volume ID State Volume state
- Refer to Instance lifecycleAttached instance Connected 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 UUIDMount point Mount point Type Type of volume Size Size of volume Snapshot schedule Connected snapshot schedule AZ Availability zone in which the volume was created Created Volume creation date and time More Execute 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.
-
Go to Beyond Compute Service > Virtual Machine in KakaoCloud Console.
-
Select a volume from the Volumes menu.
-
Review the information on the volume's detail page.
Volume details
Section Description ⓵ 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.
- Go to Beyond Compute Service > Virtual Machine in KakaoCloud Console.
- In the Instance menu, select an instance.
- Check the volume information for the instance in the Volume menu.
Modify volume
You can modify a volume.
-
Go to Beyond Compute Service > Virtual Machine in KakaoCloud Console.
-
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.
-
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.
- Go to Beyond Compute Service > Virtual Machine in KakaoCloud Console.
- In the Volume menu, click the [More] icon and Attach volume.
- Enter the required information and click the [Save] button.
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.
-
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 - e.g. Execute the
-
Use the
file -s
command to check the file system type. Ifdata
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 -
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 -
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) -
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
-
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
-
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 -
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 -
Add the above content to the
/etc/fstab
file using the confirmed UUID.Keep volumes connected after system rebootUUID=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.
-
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
-
-
Unmount.
umount command (unmount)[centos@centos-stream-8 test]$ sudo umount /dev/vdb1
-
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
-
-
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 -
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.
-
Start > Run or type the
WIN
+R
shortcut keys. -
In the Run screen, enter
diskmgmt.msc
and click the [OK] button or press Enter. -
Select newly added disk in Disk Management, then right-click and select Online to bring it online.
-
Select the newly added disk, right-click, and select Initialize Disk. When selected, a disk initialization pop-up window will appear.
-
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.
-
After selecting the initialized disk, right-click and select New Simple Volume. When selected, the Simple Volume Creation Wizard pops up.
-
Run the Create Simple Volume Wizard.
-
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.
It is not possible to detach a root volume that is being used by an instance as an OS area.
-
Go to Beyond Compute Service > Virtual Machine in KakaoCloud Console.
-
In the Volume tab > Volume list, select the [More] icon and click Detach volume.
-
Check the volume and instance to be detached and click the [Detach] button.
Expand volume
The following is to Expand volume.
- 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 toExtending
. - 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.
- Go to Beyond Compute Service > Virtual Machine in KakaoCloud Console.
- Click the Volume menu, then select the [More] icon and click Modify volume.
- 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 name | Version | Root volume partition table format | File system |
---|---|---|---|
Ubuntu | 20.04 | GPT | ext4 |
Ubuntu | 22.04 | GPT | ext4 |
Ubuntu | 24.04 | GPT | ext4 |
CentOS Stream | 9 | MBR | xfs |
Rocky Linux | 8.10 | MBR | xfs |
Rocky Linux | 9.4 | MBR | xfs |
Alma Linux | 8.10 | GPT | xfs |
Alma Linux | 9.4 | GPT | xfs |
Windows | 2019 | MBR | ntfs |
Windows | 2022 | MBR | ntfs |
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.
- Linux
- Windows
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
-
Use the
lsblk
anddf
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
-
-
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
-
-
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 commandubuntu@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
-
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 sizeubuntu@volume-test:~$ sudo growpart /dev/vda 1
-
-
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 partitionubuntu@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.
-
If you are using ex4, use the
resize2fs
command, if you are using xfs, use thexfs_growfs
command.- ext4
- xfs
sudo resize2fs /dev/vda1
sudo xfs_growfs -d /
-
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
..
-
The following is to extend a file system in Windows: The following example assumes that there is an instance with a root volume of 50 GB that the user previously created, and explains how to increase the root volume of the instance to 70 GB using the Expand volume feature and then extend the file system.
Step 1. Extend the file system with Disk Management Tool
Extend the file system through the Disk Management tool in Windows:
-
Go to Beyond Compute Service > Virtual Machine in KakaoCloud Console.
-
In the Instance menu, select the [More icon] and click Use RDP to connect.
-
Check the password in the pop-up window and log in to the Windows instance.
-
Right-click the [Windows] icon and the select Disk Management menu.
-
Select Action > Refresh.
-
Right-click the formatted partition on the disk you want to extend its size, and select Expand volume.
- The partition should be adjacent to the right of the partition you want to extend, if it is not adjacent to the drive, Expand volume may be disabled. Additionally, volumes use the Master Boot Record (MBR) partition format and cannot exceed 2 TB.
-
Click the [Next] button in the Expand volume Wizard.
-
Enter the megabytes to extend in Select Space (MB) and click the [Next] button.
- Typically specifies the maximum amount of space available.
-
Click the [Finish] button and check the extended file system.
Step 2. Extend partition with PowerShell
Extend a file system via PowerShell in a Windows environment:
-
Go to Beyond Compute Service > Virtual Machine in KakaoCloud Console.
-
In the Instance menu, select the instance's Show [More] icon > Use RDP to connect.
-
Check the password in the Use RDP to connect pop-up window and log in to your Windows instance.
-
Right-click the [Windows] icon and select Windows PowerShell (Administrator).
-
Check the drive letter of the partition to be extended.
drive letterGet-Partition
-
Rescan the disk.
Disk Rescan"rescan" | diskpart
-
Use the drive letter to determine the minimum and maximum allowed size (in bytes) of the partition.
Disk RescanGet-PartitionSupportedSize -DriveLetter <drive-letter>
-
Extend the partition to the maximum available size.
Partition maximum extension commandResize-Partition -DriveLetter <drive-letter> -Size $(Get-PartitionSupportedSize -DriveLetter <drive-letter>).SizeMax
-
To extend a partition to a specified size, enter the size in GB format in
<size>
.Partition specification size extension commandResize-Partition -DriveLetter <drive-letter> -Size <size>
-