You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Oracle Linux – How to Grow Boot Volume

Applies To:

Linux OS – Version Oracle Linux 7.0 to Oracle Linux 9.0 [Release OL7 to OL9]

Linux x86_64 on Oracle Public Cloud

 

Goal:

This document describes how to change grow Boot Volume for Oracle Linux version 7 onwards.

Solution:

1) Go to OCI Portal and select the instance you are interested in.

Under Resources section select Boot Volume_



2) Then Click Edit button. Enter the new size and click “Save Changes”:

 


3) Then, SSH to instance and as root user follow next steps:

 

[root@ ~]# partprobe
 
[root@ ~]# echo 1 > /sys/class/scsi_device/<DISK>/device/rescan
 
[root@ ~]# lsblk
NAME              MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda                 8:0   0  80G 0 disk                     <--- New size
├─sda1               8:1   0 100M 0 part /boot/efi
├─sda2              8:2   0   1G 0 part /boot
└─sda3              8:3   0 45.5G 0 part
 ├─ocivolume-root 252:0   0 35.5G 0 lvm /
 └─ocivolume-oled 252:1   0  10G 0 lvm /var/oled
 
[root@ ~]# growpart /dev/sda 3
CHANGED: partition=3 start=2304000 old: size=95371264 end=97675264 new: size=165468127 end=167772127
 
[root@ ~]# pvresize /dev/sda3
 Physical volume "/dev/sda3" changed
 1 physical volume(s) resized or updated
 
[root@ ~]# vgs
 VG       #PV #LV #SN Attr  VSize  VFree
 ocivolume  1  2  0 wz--n- <78.90g <33.43g         <--- new free space (33.43g)
 
 
[root@ ~]# lvextend -r -L+10G /dev/mapper/ocivolume-root
 Size of logical volume ocivolume/root changed from 35.47 GiB (9081 extents) to 45.47 GiB (11641 extents).
 Logical volume ocivolume/root successfully resized.
meta-data=/dev/mapper/ocivolume-root isize=512   agcount=4, agsize=2324736 blks
        =                      sectsz=4096 attr=2, projid32bit=1
        =                      crc=1       finobt=1, sparse=1, rmapbt=0
        =                      reflink=1
data    =                      bsize=4096  blocks=9298944, imaxpct=25
        =                      sunit=0     swidth=0 blks
naming  =version 2             bsize=4096  ascii-ci=0, ftype=1
log     =internal log          bsize=4096  blocks=4540, version=2
        =                      sectsz=4096 sunit=1

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!