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-
- Increase the boot volume size to a higher value and use Linux growpart to increase the size for root ( / ).
- 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-
- Login to OCI console
- Navigate to the compute instances
- Stop the instance
- Detach the boot volume
- Go to the detached boot volume
- Select Edit and change the volume size to 150
-
Now start the instance via OCI console
-
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-
-
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]
So finally our root ( / ) partition has increased to 141.8G !
Thanks for sharing informative post.
ReplyDeleteAI Course Online in Bangalore
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/
ReplyDeleteIt is so nice article thank you for sharing this valuable content
ReplyDeleteWorkday Studio Training
Workday Studio Online Training
It is so nice blog. I was really satisfied by seeing this blog.
ReplyDeleteworkday integration online training
workday integration course