OCI: How to Expand the Root Filesystem to Use The Available Space in the Boot Volume
in Linux
Applies to:
Oracle Cloud Infrastructure - Version N/A and later
Linux x86-64
Goal
OCI instances can be created with a custom Boot Volume size. The size can be between 50 GB and 32,768 GB (32 TB).
But after boot the root (/) file system will only have 39GB.
This document describe how to expand the root filesystem to use the entire boot volume.
Solution
OCI provide a tool to automatically expand the root file system to the available space in the Boot Volume: oci-growfs.
After the boot volume was expanded, run the commands suggested after "Save Changes":
$ sudo dd iflag=direct if=/dev/oracleoci/oraclevda of=/dev/null count=1 $ echo "1" | sudo tee /sys/class/block/`readlink /dev/oracleoci/oraclevda | cut -d'/' -f 2`/device/rescan
Tagged:
12