Did you know that when you create an Oracle Cloud Infrastructure (OCI) compute instance (aka a virtual server in the Oracle Cloud), it will have a boot volume of 50GB. If you want to add another volume to your compute instance, this blog post will guide you through! (Video demonstration link at bottom.) The task seems challenging at first, but once you understand the process, it’s not as hard as first thought.
You must know that there are 3 types of persistent storage available in the Oracle Cloud : Object Storage, Block Storage and File Storage. The objective of this post is to discuss the Block Storage and File Storage.
The Block Volume provides encryption, fault tolerance, performance, and can grow up to 32TB (as of this writing), and acts just like any other block device. However there are some limitations with Block Storage, that you must be aware of: The Block Volume must exist in the same availability domain as the compute instance that is going to use it, and you cannot mount it on multiple instances at the same time. When you create the Block Volume in the OCI Console, you will need to specify a name and the Availability Domain for the volume. To emphasize, the Block Volume must exist in the same availability domain as the compute instance that is going to user it. Let’s say you create a Block Volume of 100GB and you want to mount in on server A. Then both server A and the new Block Volume you just created, must exist in the same availability domain. Once the Block Volume is created, in order to use it, you must attach it to the compute instance. You have two options for attachment type of the volume: iSCI or paravirtualized. The latter method simplifies the process of configuring your block storage. The volume is now mounted, but it’s not partitioned or formatted (meaning: you can’t use it yet). You need to run some Unix commands as root, to create a label, a partition table and a file system on it. Once all is done you can create a mount point, and you can start using it! Watch Video Demo (YouTube).
Due to the limitations of the Block Storage, you might consider File Storage as a storage option for your compute instance, which leverages NFS to share the volume across all the instances in the virtual cloud network. The File Storage is a regional service, it is encrypted, fault tolerant and can grow up to 8EB (Exabytes). Do you know how much an Exabyte is? (I had to look it up too!) 1 EB = 1 billion GB; now that is a lot of storage! The good thing about File Storage is that it is presented as an NFS export, and all the compute instances, in all the Availability Domains can see it. In order to create File Storage, you must adjust the security list of the subnet on which the File System will reside, in order to allow NFS (just look at the ingress rules). When you create the File System, you must specify a name, and an Availability Domain. However the Availability Domain (AD) is somewhat irrelevant, as the File System will be available in all the Availability Domains. When you want to mount it, OCI will generate the mount commands for you! Now it’s easy, just use the provided commands and mount the File Storage on multiple compute instances.
Free Video Tutorial
If you want to see how the above steps are done, watch John Watson’s tutorial with full demo on how to create the Block Storage and File Storage (YouTube) in the OCI!
You may also be interested in How to Configure an OCI Bastion Service (YouTube).
Training with Oracle Certified Master DBA John Watson
If you are ready to immerse yourself in the Oracle Cloud Infrastructure world, we have a great introductory class that will get you started: Oracle Cloud Infrastructure (OCI) Foundations: Getting Started
Stay tuned for more OCI content!