Extending your OCI VM Boot Volume

Loïc Lefèvre
db-one
Published in
Sep 9, 2024

This is a small post to remember how to extend an OCI VM Boot volume to benefit from more than the default 35.5G.

First, create a VM with a customized boot volume, say: 200G.

Right after the OCI VM has been created, log as opc user, then run:

sudo /usr/libexec/oci-growfs -y

To verify that the command ended properly, run:

$ lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 200G 0 disk
├─sda1 8:1 0 100M 0 part /boot/efi
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 198.9G 0 part
├─ocivolume-root 252:0 0 188.9G 0 lvm /
└─ocivolume-oled 252:1 0 10G 0 lvm /var/oled

Also:

$ df -h /

Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ocivolume-root 189G 16G 174G 9% /

--

--