Increase Block Volume Size In OCI
The purpose of this article is to demonstrate how to increase block volume size in OCI on Linux instances attached to online storage . In this example, the Oracle Golden Gate Marketplace image is provisioned with a default attached block volume size of 500GB for /u02/trails, but our requirement is to increase the volume size to 600GB. In this blog, I am focusing more on resizing the mount point that holds GoldenGate trail files.
This will require two steps to achieve the expansion.
- STEP 1 : Increase the block volume size from the OCI console.
- STEP 2 : Increase the partition on the Linux server CLI using parted utility.



STEP 1 : OCI CONSOLE
- Login to the OCI Console
- As a precaution it is best practice to backup the Block volume however it is not mandatory.
- After the backup completion, go to the Block Volume and click on Edit

Once the resizing gets completed at OCI level it instructs run certain commands at OS level


STEP 2 : Host OS level changes
The volume partition should be unmounted once you log in to the Host otherwise it will show the error message
“umount target is busy”
sudo umount /u02/trails

- sudo lsblk
- sudo parted /dev/sdd
[opc@ogg21cora ~]$ sudo parted /dev/sdd
GNU Parted 3.1
Using /dev/sdd
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit s
(parted) print
Model: ORACLE BlockVolume (scsi)
Disk /dev/sdd: 1258291200s
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 2048s 1073739775s 1073737728s ext4 OGG
(parted) rm 1
(parted) mkpart
Partition name? []? OGG
File system type? [ext2]? ext4
Start? 2048s
End? 100%
(parted) quit
Information: You may need to update /etc/fstab.

Run the resize2fs command
[opc@ogg21cora ~]$ sudo resize2fs /dev/sdd1
resize2fs 1.45.4 (23-Sep-2019)
Filesystem at /dev/sdd1 is mounted on /u02/trails; on-line resizing required
old_desc_blocks = 32, new_desc_blocks = 38
The filesystem on /dev/sdd1 is now 157285888 (4k) blocks long.
That’s it….. Now validate the file system with df -h command.

Oracle documentation References :
- https://docs.oracle.com/en-us/iaas/Content/Block/Tasks/resizingavolume.htm
- https://docs.oracle.com/en-us/iaas/Content/Block/Tasks/extendingblockpartition.htm
Disclaimer: The views expressed on this document are my own and do not necessarily reflect the views of Oracle.