Attach Block Volume

Attaching a block volume to an instance in Oracle cloud

Oracle cloud Attach block volume

In this article I will describe how to create a block volume and attaching it to an instance in Oracle cloud. We will be covering the following sections:

  1. Creating Block Volume
  2. Attaching the Block Volume to the Linux VM Instance
  3. Format and Mount the volume on the instance

1. Creating Block Volume

Open the navigation menu. Under Core Infrastructure, go to Block Storage and click Block Volumes

Select the root compartment and click on Create Block Volume

Provide the Name and Volume size and Performance, then click on Create Block Volume

The Block volume is successfully created

2. Attaching the Block Volume to the Linux VM Instance

Open the navigation menu. Under Core Infrastructure, go to Compute and click Instances

Click on the instance name

Under Resources select Attached Block Volumes and click on Attach Block Volume

Choose Volume attachment type: ISCSI
Select the volume which created in the previous section
Select the Device Path, then click on Attach

Block Volume is successfully attached

Click on the ellipsis(…) and select iSCSI Commands & Information

Click on copy to copy the COMMANDS FOR CONNECTING

Connect the Linux VM instance as root user and run the iSCSI commands to connect the block volumes

3. Format and Mount the volume on the instance

Verify the newly added disk using fdisk command

Format the newly added Disk /dev/sdb

Verify the new partitioned disk /dev/sdb1

Format and Mount the disk

Create directory “oracle” and mount the newly created disk