When setting up Oracle cloud instance, we would give the instance an initial allocation of volume, and later on we might find that the initial volume size is not enough as we install more and more services into our VPS. In such a situation, we may want to expand the volume size. Here in this blog, I will note down the main processes we need to go through for such a purpose.
First, we want to go to Ref.  for resizing the volume through the web interface, i.e., the Oracle Cloud web console.
Here, we want to first make it clear what type of volume we want to expand. In my case, I was only dealing with the
bootvolume as I wanted to expand the volume where the operation system is installed.
Here follows is a recorded video demonstrating the initial process,
Next, we want to rescan the disk as stated in the step-6 in Ref. . For this, we can refer to Ref.  for the command to execute in our VPS terminal. It should be noticed that specifically on Ubuntu system, the command provided there in the reference will not work. Instead, it should be like this,
sudo dd iflag=direct if=/dev/<device_name> of=/dev/null count=1 echo "1" | sudo tee /sys/block/<device_name>/device/rescan
<device_name>refers to the name of the device to rescan. To obtain the full list of available devices on our VPS, we can run the following command,
lsblk. In my case, my device name is
Then we should use the Oracle CLI tool
oci-growfsto expand the volume. For some VPS instance on Oracle, such tools are by default installed. For some others, like in my case, the Ubuntu system, we have to install the tools by ourselves. For this, we can refer to the instructions in Ref. . After the tools are installed, we can use the following command to expand the volume ,
sudo /usr/libexec/oci-growfs -y