Oracle Cloud Infrastructure Documentation

Cloning a Volume

You can create a clone from a volume using the Block Volume service. Cloning enables you to make a copy of an existing block volume without needing to go through the backup and restore process. For more information about volume backups, see Overview of Block Volume Backups and Backing Up a Volume. For more information about the Block Volume service and cloned volumes, see the Block Volume FAQ.

A cloned volume is a point-in-time direct disk-to-disk deep copy of the source volume, so all the data that is in the source volume when the clone is created is copied to the clone volume. Any subsequent changes to the data on the source volume are not copied to the clone. Since the clone is a copy of the source volume it will be the same size as the source volume unless you specify a larger volume size when you create the clone.

The clone operation occurs immediately, and you can attach and use the cloned volume as a regular volume as soon as the state changes to available. At this point, the volume data is being copied in the background, and can take up to thirty minutes depending on the size of the volume.

There is a single point-in-time reference for a source volume while it is being cloned, so if the source volume is attached when a clone is created, you need to wait for the first clone operation to complete from the source volume before creating additional clones. If the source volume is detached, you can create up to ten clones from the same source volume simultaneously.

You can only create a clone for a volume within the same region, availability domain and tenant. You can create a clone for a volume between compartments as long as you have the required access permissions for the operation.

Using the Console

  1. Open the navigation menu. Under Core Infrastructure, go to Block Storage and click Block Volumes.
  2. In the Block Volumes list, click the volume you want to clone.
  3. In Resources, click Clones.
  4. Click Create Clone.

  5. In the Create Clone dialog, specify a name for the clone.

  6. Check Custom Block Volume Size (GB) and then specify the new size. You can only increase the size of the volume, you cannot decrease the size. If you clone the block volume to a larger size volume, you need to extend the volume's partition, see Extending the Partition for a Block Volume for more information..

  7. Click Create Clone.

The volume is ready use once its icon lists it as AVAILABLE in the volume list. At this point, you can perform various actions on the volume such as creating a clone from the volume, attaching it to an instance, or deleting the volume.

Using the API

For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.

To create a clone from a volume, use the CreateVolume operation and specify VolumeSourceFromVolumeDetails for CreateVolumeDetails.