Part 2: Cloning Block Volumes Between Two Tenancies in Oracle Cloud Infrastructure (OCI)
- Jason Beattie
- Dec 18, 2024
- 1 min read
Updated: Jan 8
Author: Jason Beattie
Overview
Similar to boot volumes, block volumes can also be cloned between tenancies. This part focuses on setting up and cloning block volumes across the same region using OCI CLI.
Steps to Clone a Block Volume
Follow Steps 1-4 from Part 1 to configure policies, RPCs, routing, and the OCI CLI profile.
Step 5: Clone the Block Volume
oci bv volume create \
--profile=cross_tenancy_user_profile \
--region=uk-london-1 \
--source-volume-id=OCID_OF_SOURCE_BLOCK_VOLUME \
--display-name=block-volume-clone \
--compartment-id=OCID_OF_TARGET_COMPARTMENT
Parameters:
--source-volume-id: OCID of the source block volume.
--display-name: Name for the cloned block volume in the target tenancy.
--compartment-id: OCID of the compartment in the target tenancy.
Final Validation
After running the above commands:
Verify that the boot and block volumes appear in the target tenancy.
Check the newly cloned volumes for size, connectivity, and integrity.
Conclusion
This blog has provided a comprehensive guide to cloning both boot volumes and block volumes between two tenancies in Oracle Cloud Infrastructure. By following these steps—setting up policies, configuring RPCs, and running OCI CLI commands—you can effectively replicate storage across tenancies.
Key Takeaways:
Policies ensure secure and authorized access between tenancies.
Remote Peering Connections enable cross-tenancy communication.
OCI CLI simplifies the cloning process with straightforward commands.
Comments