Change root volume partition table format
The default partition table format of the root volume disk for VM instances used as Kubernetes Engine nodes is MBR (Master Boot Record).
The MBR partitioning scheme supports up to 4 partitions and works only with disks smaller than or equal to 2TB.
If a Kubernetes Engine node needs to use a root volume larger than 2TB, the partition table must be changed to GPT (GUID Partition Table), which has no such limitations.
Step 1. Check and modify Kubernetes Engine node volume size
To use a volume larger than 2TB on a Kubernetes Engine node, modify the current volume size accordingly.
-
Go to the KakaoCloud Console > Container Pack > Kubernetes Engine.
-
In the Cluster menu, select your cluster and go to the Node tab to select a specific node.
-
On the node detail page, click the Instance ID to view the instance details.
Node detail page
-
In the Volume tab of the instance detail page, click the [More] icon next to the volume and select Edit volume.
-
In the Edit volume popup, check and modify the volume size to greater than 2TB and save the changes.
Edit volume popup
Step 2. Check current disk and partition information
Check the disk and partition information of the Kubernetes Engine node.
If changing the partition table format of an existing volume, be sure to back up your data before proceeding.
-
Use the
fdisk
command to check current disk information.
In the example below, the disk /dev/vda is about 10GB in size.Check current partition info with fdisksudo fdisk -l
-
Use the
gdisk
command to verify the current partition table format.Check partition format with gdisksudo gdisk -l /dev/vda
- If the output shows “MBR only”, the disk is using an MBR partition table.
Step 3. Change the partition table
-
Use
gdisk
to convert the partition table from MBR to GPT.Convert to GPT and create boot partitionsudo gdisk /dev/vda
-
When converting to GPT, a boot partition must be created.
Use the following command sequence to create a GPT BIOS boot partition:Field Value Partition number
Enter 2
(or leave default)First sector
Enter 34
(or leave default)Last sector
Enter 2047
(or leave default)Partition type code Enter ef02
Create BIOS boot partitionCommand (? for help): n
Partition number (2-128, default 2): 2
First sector (34-1455966, default = 34): 34
Last sector (34-1455966, default = 2047): 2047
Hex code or GUID (L to show codes, Enter = 8300): ef02
Command (? for help): w
Do you want to proceed? (Y/N): y -
Install GRUB on the new partition.
cautionIf GRUB is not installed after switching to GPT, the node may fail to reboot. Install GRUB before rebooting.
Install GRUBsudo partprobe
sudo grub-install /dev/vda -
Reboot the system to apply changes.
Rebootsudo reboot
-
After rebooting, confirm that the disk has been converted to GPT.
Check disk layout with lsblksudo lsblk
Check partition table with fdisksudo fdisk -l
- You should see
Disk label type: gpt
and the BIOS boot partition (vda2
) listed with ~1007K size.
- You should see