Oracle Cloud Infrastructure- Changing root partition of Oracle Linux instance 7.8

In this post, I'll describe a problem in OCI with respect to storage extension and possible solution with stepwise implementation process.

Scenario

I have provisioned a new compute instance with a default setting including the boot volume size of OCI i.e.  46.6 GB. The partition available to root ( / ) became ~39 GB post OS installation. 

Requirement

A requirement came where I need at least 100GB in my root ( / ) so the installation of that necessary production should go under respective directories viz. /opt or /u01 etc. 

Approach

I have figured out two approaches-
  1. Increase the boot volume size to a higher value and use Linux growpart to increase the size for root ( / ).
  2. Attach a new block volume with required capacity and mount it to required location viz  /opt or /u01 etc. 

Solution

This article considers the first approach. For the second approach, check out my this post with necessary steps as a subpart of the post.

Steps-
  1. Login to OCI console
  2. Navigate to the compute instances
  3. Stop the instance
  4. Detach the boot volume
  5. Go to the detached boot volume
  6. Select Edit and change the volume size to 150
  7.  Now start the instance via OCI console
  8. Once the instance starts, SSH to the instance and check the current volume size: as 
  9.  Now, we need to grow the root volume size. Linux 7 provides the utility package cloud-utils-growpart  to change size but first check the existence of this package first using below command-
  10.  Step 9 is ok, Let's proceed to increase the size as- 
    $ sudo su
    # growpart /dev/sda 3
    CHANGED: disk=/dev/sda partition=3: start=17188864 old: size=80486399,end=97675263 new: size=108640222,end=125829086 [Values may differ]
  11. Finally, verify the new volume and space in root ( / )

So finally our root ( / ) partition has increased to 141.8G !

Comments

  1. This is such a great resource that you are providing and you give it away for free. This is really a nice and informative, containing all information and also has a great impact on the new technology. We are technology/news/smartphone company, If you want to read such useful news then, Visit us: https://techmie.com/


    ReplyDelete

Post a Comment

Popular posts from this blog

Oracle SOA Suite- Implementing Email Notification

Oracle SOA Suite 12c- PKIX path building failed & unable to find valid certification path to requested target

Migration of Oracle SOA Suite Composite from 11g to 12c