Online Resizing of Block Volumes Using the Console
- Open the navigation menu and click Storage. Under Block Storage, click Block Volumes. In the Block Storage menu on the sidebar, click Boot Volumes. In the Boot Volumes list, click the boot volume you want to resize.
- Click Edit Size or Performance.
-
Specify the new size in VOLUME SIZE (IN GB). You must specify a larger value than the boot volume's current size.
-
Click Save Changes. This opens a dialog that lists the commands to rescan the disk that you need to run after the volume is provisioned. You need to run these commands so that the operating system identifies the expanded volume size. Click the Copy link to copy the commands, and then click Close to close the dialog.
-
Log on to your instance's OS and then paste and run the rescan commands you copied in the previous step into your instance session window. The rescan commands are also provided in Rescanning the Disk for Volumes Attached to Linux-Based Instances.
- Extend the partition and grow the file system using the oci-growfs operation from OCI Utilities.
oci-utils
# url https://github.com/oracle/oci-utils.git
git clone url-of-the-repo
cd oci-utils
python3 ./setup.py build
sudo python3 ./setup.py install
# the following will expand your volume(s)
sudo ./libexec/oci-growfs
2023.7.24 update: oracle cloud 直接把我账号删除了,是oracle cloud的账号删除了,无法登陆,无法找回,无邮件通知,完完全全抹除了,所以谨慎对待oracle cloud
https://docs.oracle.com/en-us/iaas/Content/Block/Tasks/resizingavolume.htm
https://github.com/oracle/oci-utils/issues/136