Oracle Ubuntu Extend Boot Volume

sudo dd iflag=direct if=/dev/oracleoci/oraclevda of=/dev/null count=1
echo “1” | sudo tee /sys/class/block/`readlink /dev/oracleoci/oraclevda | cut -d’/’ -f 2`/device/rescan

root@instance-20210605-2029:/home/ubuntu# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 100G 0 disk
├─sda1 8:1 0 46.5G 0 part /
└─sda15 8:15 0 99M 0 part /boot/efi

root@instance-20210605-2029:/home/ubuntu# parted /dev/sda
GNU Parted 3.3
Using /dev/sda
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) unit s
(parted) print
Warning: Not all of the space available to /dev/sda appears to be used, you can fix the GPT to use all of the space (an extra 112037888 blocks) or continue with the current setting?
Fix/Ignore? F
Model: ORACLE BlockVolume (scsi)
Disk /dev/sda: 209715200s
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
15 2048s 204800s 202753s fat32 boot, esp
1 206848s 97677278s 97470431s ext4

(parted) rm 1
Warning: Partition /dev/sda1 is being used. Are you sure you want to continue?
Yes/No? Y
Error: Partition(s) 1 on /dev/sda have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You
should reboot now before making further changes.
Ignore/Cancel? I
(parted) mkpart
Partition name? []?
File system type? [ext2]? ext4
Start? 206848s
End? 100%
(parted) print
Model: ORACLE BlockVolume (scsi)
Disk /dev/sda: 209715200s
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
15 2048s 204800s 202753s fat32 boot, esp
1 206848s 209713151s 209506304s ext4

root@instance-20210605-2029:/home/ubuntu# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 59.6M 1 loop /snap/lxd/20330
loop1 7:1 0 36.3M 1 loop /snap/oracle-cloud-agent/15
loop2 7:2 0 27.9M 1 loop /snap/snapd/11843
loop3 7:3 0 48.9M 1 loop /snap/core18/2002
sda 8:0 0 100G 0 disk
├─sda1 8:1 0 99.9G 0 part /
└─sda15 8:15 0 99M 0 part /boot/efi

reboot

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.