How to Create a Clone of a Cloud Block Storage Volume
A clone of a Cloud Block Storage volume is a copy made of an existing volume at a specific moment in time. At a high-level, the volume cloning process does the following:
- Creates a Logical Volume Management (LVM) copy on the write segment of your existing volume.
- Creates a new blank volume on a separate storage node.
- Directly transfers the volume data from the existing volume to the new volume.
The end result is an identical Cloud Block Storage volume that you can immediately attach and use. You have the option to change the volume type prior to beginning the volume clone process. Additionally, volume cloning also allows you to increase the size of the new volume. The cloned volume must be the same size or larger than original volume, the new volume cannot be smaller. Keep in mind if you do use cloning to increase the size of your volume, be sure to resize your filesytem (if supported) in order to take advantage of the new larger clone.
Prior to the availability of the volume cloning feature, customers were encouraged to utilize volume snapshots when a copy of a volume was needed. The advantage to using volume cloning instead of snapshotting is that volume cloning transfers your data directly between volumes, without the need to use a Cloud Files snapshot as an intermediate step.
On this Page:
Volume Cloning shares many similarities with Volume Snapshots. Namely, they both utilize LVM as the primary copy and locking mechanism and therefore detaching prior to cloning is recommended. Click here for additional information on allowing snapshots (now clones) without detaching the volumes.
It is a good idea to detach your Volume from your Server before you take a Volume Clone. This is the safest method to prevent your Server from writing information while you are backing it up. That could get your data out of sync and could create a problem. To detach your Volume, see the instructions on "Detatch and Delete Volumes". You can always re-attach the Volume by following the " Attach Volume to a Server" Steps on the Create/Attach Volume page.
More advanced users may sync the filesystem in order ensure the integrity of the data on your snapshots. Performing a sync will flush file system buffers and write the data out to disk. If you are unfamiliar with how to sync your filesystem, consider detaching your volume prior to snapshotting.
Steps to create a volume clone:
- Navigate to the Clone Volume popup by either
- Clicking the "Actions" button on the Volume Details screen.
- Click the Action cog next to the Volume name in the Block Storage Volumes screen.
- Click the "Clone Volume" link.
- Give the new volume a name. The default is the volume's name followed by the "-clone" suffix.
- Specify the volume type and size.
- Click the "Clone Volume" button.
- After you click the "Clone Volume" button and are redirected to the new volume details page, you can safely reattach your volume.
- Once created, a cloned volume can be treated like any other existing volume.
- A CBS volume can be deleted by either
- Selecting "Delete Volume” from the Actions button on the Volume Details screen.
- Selecting "Delete Volume” from the Action cog next to the Volume name in the Block Storage Volumes screen.
- How is cloning different from snapshotting? A snapshot cannot be directly used as a volume. You need to create a volume from the snapshot before you can attach it to your server. Snapshots are stored redundantly in Cloud Files, however creating volumes from snapshots is a slower process compared to creating a volume from a clone. If your application is time sensitive, please consider using volume cloning instead. A volume Clone is usable copy of the source volume and can be attached and used immediately.
- Do I need to detach my volume prior to cloning? While not required, it is a good idea to detach your volume from your server before you create a clone. This is the safest method to prevent your server from writing data to the volume as a clone is being created and to avoid a situation where you could end up with inconsistent data between a cloned volume and its source volume. If you choose to leave your source volume attached prior to creating a clone, you need to both sync current buffers and prevent future writes during the actual clone call. More advanced users may choose to freeze or sync their file system prior to creating a volume clone. Performing a sync will flush file system buffers and write the data out to disk. If you are unfamiliar with how to sync your file system, consider detaching your volume prior to snapshotting.The volume cloning process works similar to creating a volume snapshot via the API. Please note that as soon as the initial clone call returns a 200 response, a local point in time snapshot has been created of your volume, and you may continue using the original volume. The cloned volume will remain in creating status until the source volume data has been fully copied to the new clone.
- Can I create multiple clones from a single volume simultaneously? No. Creating multiple clones simultaneously from the same volume will fail.
- Can I clone between regions? No. Volumes can only be cloned within the same region.
- Can I simultaneously snapshot and clone the same volume? No. Volume snapshots and cloning share the same locking mechanism, and therefor cannot happen simultaneously on the same volume.
- You cannot create more than one clone per volume at a time. Snapshots and cloning use the same locking mechanism, so a snapshot and clone of the same volume cannot be running concurrently.
© 2011-2013 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License
See license specifics and DISCLAIMER