First login to Oracle cloud console and locate the instance to which the block volume is attached to. Click on the name of the instance to open the details of that instance.
Click on the Storage tab at the top. It will open the list of storage devices attached to that instance like boot volume and block volumes.
Scroll down and locate the block volume you want to change. Click on its name to show details of that instance.
On the top right you will find “Edit” button. Click on it. You will see options to change various properties of that volume.
Adjust the size of the volume and click update button on bottom right.
It may take couple of minutes to update.
After that login to the instance via SSH and follow this detailed guide.
Environment
Disk: /dev/sdb
Partition: /dev/sdb1
Filesystem: ext4
Mount Point: /blockvolume
Storage Architecture
OCI Block Volume
↓
Linux Disk (/dev/sdb)
↓
Partition (/dev/sdb1)
↓
Filesystem (ext4)
↓
Mount Point (/blockvolume)
When you increase a block volume in OCI, only the disk layer becomes larger. The partition and filesystem do not automatically expand.
Example Scenario
You increase the OCI volume from 100 GB to 200 GB.
Before:
Disk 100G
Partition 100G
Filesystem 99G
After OCI Resize:
Disk 200G
Partition 100G
Filesystem 99G
The additional 100 GB exists but cannot be used until the partition and filesystem are expanded.
Step 1 – Verify Current State
lsblk df -Th /blockvolume sudo fdisk -l /dev/sdbThese commands help determine the size of the disk, partition and filesystem. They establish a baseline before making any changes.
Step 2 – Verify Device Access
sudo dd iflag=direct if=/dev/sdb of=/dev/null count=1| Parameter | Purpose |
|---|---|
| if | Input device |
| of | Discard output |
| count=1 | Read a single block |
| iflag=direct | Bypass cache and perform direct I/O |
This verifies Linux can communicate directly with the underlying storage device.
Step 3 – Rescan the Disk
echo 1 | sudo tee /sys/class/block/sdb/device/rescanThis triggers a kernel-level rescan so Linux refreshes device metadata and detects the new size without a reboot.
Step 4 – Confirm New Disk Size
lsblk sudo fdisk -l /dev/sdbYou should now see the disk reporting its new size while the partition still shows the old size.
Step 5 – Expand the Partition
sudo growpart /dev/sdb 1This modifies the partition table so partition 1 consumes all available free space on the disk.
Before: |======== sdb1 100G ========|—— free ——-|
After: |================ sdb1 200G =================|
Step 6 – Verify Partition Growth
lsblkThe partition size should now match the disk size.
Step 7 – Expand the ext4 Filesystem
sudo resize2fs /dev/sdb1The partition is larger, but the filesystem still uses the old size. resize2fs updates ext4 metadata structures and enables use of all newly available blocks.
Before: Partition 200G Filesystem 99G
After: Partition 200G Filesystem 199G
Step 8 – Verify Available Space
df -Th /blockvolumeThis confirms applications can access the new storage.
Step 9 – Validate Filesystem Metadata
sudo tune2fs -l /dev/sdb1tune2fs displays ext4 internals such as:
- Filesystem UUID
- Block count
- Block size
- Filesystem state
- Reserved block count
- Filesystem features
sudo tune2fs -l /dev/sdb1 | grep -E "Block count|Block size|Filesystem state"Golden Rule:
Every expansion must occur in order:
OCI Volume → Linux Disk → Partition → Filesystem → Verification.
If any layer is skipped, the additional space is not usable.