Moneycontrol Brokerage Recos

Monday, November 30, 2026

Online Resizing of Block Volumes

Oracle Cloud Infrastructure (OCI) supports increasing an attached block volume without stopping the compute instance or detaching the disk. However, the extra capacity becomes usable only after the guest operating system and its storage layers recognize it.

Workflow: Backup → OCI volume expansion → OS rescan → partition/LVM expansion (if applicable) → filesystem growth → validation.

1. Reference environment

ComponentExample
PlatformOCI Compute / Oracle Linux 8 or 9
Data volume100 GiB → 200 GiB
Linux device/dev/sdb
Mount point/u02
FilesystemXFS or ext4

The example uses a single-attached SCSI-style data volume. Device names and LVM paths are illustrative; confirm the actual mapping before executing any command.

2. Prechecks and backup

lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT
findmnt /u02
df -hT /u02
sudo pvs
sudo vgs
sudo lvs

Map the device to the OCI volume OCID using the attachment details. Take a completed volume backup and verify recovery readiness. For Oracle databases, use an appropriate RMAN or application-consistent backup strategy; a storage snapshot alone does not guarantee database recoverability. Confirm quota, capacity and IAM permissions.

3. Increase the volume size in OCI

Console: Storage → Block Storage → Block Volumes → select the volume → Edit → set Volume size to 200 GB → Save changes. Wait until the resize completes.

OCI CLI alternative: replace the OCID before execution.

VOLUME_OCID="REPLACE_WITH_VOLUME_OCID"
oci bv volume update --volume-id "$VOLUME_OCID" \
  --size-in-gbs 200 --wait-for-state AVAILABLE

oci bv volume get --volume-id "$VOLUME_OCID" \
  --query 'data."size-in-gbs"'

4. Rescan the disk in Linux

Use the device-specific commands displayed by OCI after the resize. For the verified SCSI device /dev/sdb, Oracle documents the following approach:

sudo dd iflag=direct if=/dev/sdb of=/dev/null count=1
echo 1 | sudo tee /sys/class/block/sdb/device/rescan
lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT
sudo blockdev --getsize64 /dev/sdb

Proceed only when the operating system reports the new size. For multipath or shared iSCSI volumes, use the supported attachment-specific rescan procedure on all relevant paths and hosts; do not resize a shared filesystem independently on each node.

5. Expand the correct storage layer

Existing layoutRequired action
Whole-disk filesystemGrow filesystem directly
Partitioned filesystemGrow partition, then filesystem
LVMGrow partition if present, then PV, LV and filesystem
Oracle ASMUse a supported ASM-specific procedure, not filesystem commands

A. Partitioned filesystem: if partition 1 has contiguous free space after it and growpart is installed:

sudo growpart /dev/sdb 1
lsblk /dev/sdb

Confirm the kernel sees the larger partition. If it does not, stop and arrange an approved recovery or maintenance procedure. For whole-disk filesystems, skip growpart.

B. XFS: grow the mounted filesystem (non-LVM or after LV expansion).

sudo xfs_growfs /u02

C. ext4: use the actual filesystem device instead of the XFS command. For a partitioned non-LVM example:

sudo resize2fs /dev/sdb1

D. LVM: for a partition-backed PV and XFS logical volume, after partition expansion:

sudo pvresize /dev/sdb1
sudo pvs
sudo vgs
sudo lvextend -L +100G /dev/vgdata/lvdata
sudo xfs_growfs /u02

The LV increment is illustrative: choose an approved amount within available VG extents (metadata or alignment can reduce available capacity). For whole-disk PVs use /dev/sdb; for ext4 on LVM use resize2fs on the LV instead. Do not execute all alternatives together.

6. Post-resize validation

lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT
df -hT /u02
findmnt /u02
sudo pvs
sudo vgs
sudo lvs

Confirm the expected filesystem capacity, application read/write health and absence of new storage errors. For database workloads, confirm database health and backup operation.

7. Enterprise considerations

AreaKey precaution
DowntimeNormally no reboot or detach for supported online growth; validate the storage layout first.
RollbackOCI volume expansion cannot be reversed in place; restore to a replacement volume if recovery is needed.
Performance and costReview provisioned capacity, VPU settings and resulting charges.
ASM / RACDo not run growpart or filesystem utilities on ASM disks without an approved ASM-specific design.
Boot volumeSeparate workflow; use OCI oci-growfs on supported Oracle Linux images.

Conclusion: Online resizing is a layered operation. Increasing capacity in OCI is only the first step; verify the OS, partition or LVM, and filesystem before declaring the change complete.

References

OCI — Online Resizing a Block or Boot Volume

OCI — Rescanning the Disk

Oracle — Extend a logical Block Volume