Oracle Cloud block storage size question

Like I said before, in OCI the boot volume size is governed by the parent image, since it contains the partitioning table. Even if you increase the boot volume size from 48 to 100 GB, the resulting OS will still only use 48 GB.

Thus, you need to use a different parent image. And like I wrote, either you create it yourself in Virtualbox, or you use an existing VM as a template and create a custom image from it.

  • Create a VM
  • Stop the VM
  • Expand the existing boot volume in place with offline resizing
  • Detach the boot volume
  • Attach the boot volume to a second instance as a block volume
  • Run parted to edit the partitioning table
  • Run xfs_growfs to grow the file system
  • Detach the volume from the second instance
  • Attach the volume to the original instance as a boot volume
  • Restart the instance and check everything is okay
  • Stop the instance
  • Create a custom image from the boot volume
  • Use this image as a source for Packer

That’s the best practice supported by Oracle. Actually, it would be possible to script it in Packer using oci-cli, I think.

Ralf