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:
- Creating Block Volume
- Attaching the Block Volume to the Linux VM Instance
- 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
![](http://15.206.169.97/wp-content/uploads/2020/11/image.png)
Select the root compartment and click on Create Block Volume
![](http://15.206.169.97/wp-content/uploads/2020/11/image-14.png)
Provide the Name and Volume size and Performance, then click on Create Block Volume
![](http://15.206.169.97/wp-content/uploads/2020/11/image-2.png)
The Block volume is successfully created
![](http://15.206.169.97/wp-content/uploads/2020/11/image-3.png)
2. Attaching the Block Volume to the Linux VM Instance
Open the navigation menu. Under Core Infrastructure, go to Compute and click Instances
![](http://15.206.169.97/wp-content/uploads/2020/11/image-4.png)
Click on the instance name
![](http://15.206.169.97/wp-content/uploads/2020/11/image-5.png)
Under Resources select Attached Block Volumes and click on Attach Block Volume
![](http://15.206.169.97/wp-content/uploads/2020/11/image-6.png)
Choose Volume attachment type: ISCSI
Select the volume which created in the previous section
Select the Device Path, then click on Attach
![](http://15.206.169.97/wp-content/uploads/2020/11/image-7.png)
![](http://15.206.169.97/wp-content/uploads/2020/11/image-8.png)
Block Volume is successfully attached
![](http://15.206.169.97/wp-content/uploads/2020/11/image-9.png)
Click on the ellipsis(…) and select iSCSI Commands & Information
![](http://15.206.169.97/wp-content/uploads/2020/11/image-10.png)
Click on copy to copy the COMMANDS FOR CONNECTING
![](http://15.206.169.97/wp-content/uploads/2020/11/image-17.png)
Connect the Linux VM instance as root user and run the iSCSI commands to connect the block volumes
![](http://15.206.169.97/wp-content/uploads/2020/11/image-12.png)
![](http://15.206.169.97/wp-content/uploads/2020/11/image-13.png)
3. Format and Mount the volume on the instance
Verify the newly added disk using fdisk command
![](http://15.206.169.97/wp-content/uploads/2020/11/image-18.png)
Format the newly added Disk /dev/sdb
![](http://15.206.169.97/wp-content/uploads/2020/11/image-19.png)
Verify the new partitioned disk /dev/sdb1
![](http://15.206.169.97/wp-content/uploads/2020/11/image-20.png)
Format and Mount the disk
![](http://15.206.169.97/wp-content/uploads/2020/11/image-21.png)
Create directory “oracle” and mount the newly created disk
![](http://15.206.169.97/wp-content/uploads/2020/11/image-22.png)