Hello and welcome to this video on Oracle Private Cloud Appliance.
In this video, you will learn how to manage a boot volume by listing, detaching,
reattaching, cloning, and deleting a boot volume.
When you launch an instance, a new boot volume for the instance is created in
the same compartment.
That boot volume is associated with that instance until
you terminate the instance.
When you terminate the instance, you can preserve
and reuse the boot volume and its data.
Boot volumes are encrypted by default.
Let's get started and list all of the boot volumes in our compartment.
I have already installed the OCI CLI so please refer to the video, "Installing
OCI CLI video".
Next, run the following command to list the current list of boot volumes:
oci bv boot-volume list --availability-domain followed by the availability
domain name --compartment-id followed by the compartment
OCID
From the results, we can see there are two boot volumes, my-boot-volume-clone-01
and my-instance-01(Boot Volume).
Boot volume attachments are boot volumes attached to compute instances.
You can also list the boot volume attachments by running the command:
oci compute boot-volume-attachment list --availability-domain
--compartment-id
Let's confirm the results by turning to the Web interface.
From the dashboard, click the hamburger menu then Compute then Instances.
Click on my-instance-01 and then click on Boot volumes
as you can see the boot volume is currently attached
to the compute instance.
Let's now return to the oci command line interface.
If you think a boot volume issue is causing a compute instance problem, you can
stop the instance and detach the boot volume.
Then you can attach it to another instance as a data volume to troubleshoot
it.
First, let's stop the compute instance by running:
oci compute instance action --instance-id and then the ocid of the instance
followed by --action STOP
Next let's detach the boot volume by using the web gui.
Click the hamburger menu then Compute then Instances.
Click on my-instance-01 and then click on boot volumes.
As you can see the boot volume is currently attached
to the compute instance.
Click the three dots under Action and then select Detach.
To confirm the Boot Volume detachment, click the Confirm button.
After a few seconds, the boot volume is detached.
We can also clone a boot volume for creating a backup.
We can clone a boot volume by clicking on the hamburger menu
then Block Storage and then Boot Volumes.
I'll clone the my-instance-01 boot volume to make a second copy.
Under actions, click the three dots and select create clone.
We need to give the new cloned boot volume a name, my-boot-volume-clone-02
and we'll keep the current compartment as is.
Click the Create Clone button, which will clone a copy of the boot volume.
As you can see the new cloned boot volume was created.
We'll now reattach our original boot volume.
Let's return to the oci command line and run the command:
oci compute boot-volume-attachment attach --boot-volume-id
--instance-id
Let's once again verify that the volume was reattached to the my-instance-1 compute instances
by revisiting the web interface.
Click on the hamburger menu then Compute, and then Instances.
Click on my-instance-01 and then boot volumes.
We can see that the boot volume is reattached to my-instance-01.
Let's restart my-instance-01.
Returning to the oci command line run the command:
oci compute instance action --instance-id --action START
After a few seconds, the compute instance is up and running again.
Lastly, let's delete a boot volume specifically one of the cloned volumes.
Returning to the GUI, from the hamburger menu, click on Block Storage then Boot Volumes.
Under actions, click the three dots for our boot volume to delete.
Select Terminate, then click Confirm to terminate the Boot Volume.
After a few seconds, our screen updates and shows that the boot volume was
terminated.
For more information, please check our additional information on Oracle Private
Cloud Appliance documentation or in the Oracle Private Cloud Appliance Learning
Library.
This concludes the video.
Thank you for watching.