Increase Block Volume Size in OCI

Facebook
Twitter
LinkedIn
Email

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.
Before increasing the size let's validate the size of the existing block volume at the host level and OCI level.
Increase Block Volume OCI
Increase Block Volume Size2
Increase Block Volume Size 3

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
 
Click on Save Changes

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

Increase Block Volume Size BV6

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

Increase Block Volume Size BV7
  • sudo lsblk
  • sudo parted /dev/sdd

Now run the below commands by logging into parted utility. 

				
					[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. 

Increase Block Volume Size BV10

Oracle documentation References : 

  1. https://docs.oracle.com/en-us/iaas/Content/Block/Tasks/resizingavolume.htm
  2. 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. 

Leave a Reply

Your email address will not be published. Required fields are marked *