Wednesday, January 1, 2020

Resize Boot Volume Size and Partition size in Oracle Cloud Instance

7:27 AM Posted by Dilli Raj Maharjan , No comments



Sometimes we might need to resize Boot Volume to add additional partition or expand the existing partitions in Oracle cloud instance. Following are the detail step by step guide to increase Boot Volume and expand existing partition. In example below I have resized Boot Volume of Orcl1 instance from 47GB to 52GB.

Following are the steps to be followed.


1. Stop the instance, if it is running.

Check current disk space details with df -h linux command.

Existing partitions on running instance.


Click on Navigation Menu >> Compute >> Instance



Instance list will be displayed. Click on desired instance to stop.



Instance details will be displayed. Click on Stop button to stop instance.



A message will be popped up. Click on OK to stop instance.



2. Detach boot volume

Click on Boot Volume under Compute section.



Boot Volumes will be displayed. Click on required Boot Volumes. In my case I am resizing Orcl1 so I have clicked Orcl1 (Boot Volume)



Once Boot Volume Name is clicked, Boot Volume details will be displayed as below.



On the left bottom corner Click on Attached Instances under Resources section.
 

Attached instances list will be displayed. Click on menu(3 vertical dots at the right).



Click on Detach from Instance to detach Boot Volume from the Instance.


A confirmation message will be popped up. Click on Detach to detach Boot Volume from Instance.



Boot Volume detaching in progress..



Once Boot Volume is detached from the instance list of Instance will shows No Items as below.



3. Resize Boot Volume

Click on Resize Button of Boot Volume detail page.



Resize Boot Volume window will be displayed. Enter new Boot Volume size. New Size should be greater than existing size and less than 32TB. In my case I have set it to 52GB.



Once Resize button is clicked the Boot Volume status will be AVAILABLE.



Click on Navigation Menu. Click on Compute >> Boot Volume to view new size of Boot Volume.



On Boot Volume list page new Boot Volume size will be displayed.



4. Attach boot volume to another instance to expand partition. For creating new partition with the new increment on size jump to Step 5 and 6.



Click on Attached Instance under Resources section.


Click on Attach to Instance button to attach Boot Volume to Instance.



Select attachment type. Click on Instance name and select desired instance on which Boot Volume need to be attached. In our case we are attaching Boot Volume of Orcl1 instance to another Instance Orcl2.



A popped up message will be displayed. Click on Close to close message window.



Attaching Boot Volume in progress...













Once Boot Volume is attached, status of Boot Volume will be Attached.














Click on menu(3 vertical dots) at the right hand. Click on iSCSI Commands & Information.
Click on Copy to copy iSCSI attach commands.



Execute iSCSI command inside Orcl2 instance.



Execute lsblk command to list all block devices and its deails.



Use parted command to remove existing partition and create new partition with new size. I have noted the start value and used while creating new partition. Used 100% to use entire free disk to new partition.



Executed print command to display current partition. Execute quit command to exit from parted prompt.












Click on iSCSI Commands & Information to copy iSCSI command to deattach iSCSI.



Copy iSCSI detach commands.


Execute iSCSI commands to detach the disk from instance.



Verify disk has been detached and ready to detach from Cloud Console.



Detach Boot Volume from Orcl2 instance.



A poped up message will be displayed. Click on Detach.


Detaching from Orcl2 in progress...



Once Detach is completed there will be no instance left.


5. Attach Boot Volume to Orcl1 instance.

Under resource section of Instance detail page click on Boot Volume.


On the right of the Boot Volume page click on menu(3 horizontal dots)


Click on Attach to attach Boot Volume to Instance Orcl1.

Click on OK to confirm attaching Boot Volume to Orcl1 Instance.



Boot Volume Attaching in progress.

Boot Volume attached successfully.


6. Start Instance with new Boot Volume size.

Once Boot Volume is attached successfully, click on Start in Instance page.


Click on OK to confirm Start



Login to the instance and we can notice new size of partition.