Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments

Cloning FlexVol volumes

About cloning FlexVol volumes  Top

Data ONTAP provides the ability to clone FlexVol volumes, creating FlexClone volumes. The following list outlines some key facts about FlexClone volumes that you should know:

Uses of volume cloning  Top

You can use volume cloning whenever you need a writable, point-in-time copy of an existing FlexVol volume, including the following scenarios:

Benefits of volume cloning versus volume copying  Top

Volume cloning provides similar results to volume copying, but cloning offers some important advantages over volume copying:

Limitations of volume cloning  Top

The following operations are not allowed on parent volumes or their clones.

Cloning a FlexVol volume  Top

To create a FlexClone volume by cloning a FlexVol volume, complete the following steps.

Step

Action

1

Ensure that you have the flex_clone license installed.

2

Enter the following command to clone the volume:

vol clone create cl_vol_name [-s {volume|file|none}] -b 
f_p_vol_name [parent_snap]

cl_vol_name is the name of the FlexClone volume that you want to create.

-s {volume | file | none} specifies the space guarantee setting for the new FlexClone volume. If no value is specified, the FlexClone volume is given the same space guarantee setting as its parent. For more information, see Space guarantees.

f_p_vol_name is the name of the FlexVol volume that you intend to clone.

parent_snap is the name of the base snapshot of the parent FlexVol volume. If no name is specified, Data ONTAP creates a base snapshot with the name clone_cl_name_prefix.id, where cl_name_prefix is the name of the new FlexClone volume (up to 16 characters) and id is a unique digit identifier (for example 1,2, etc.).

The base snapshot cannot be deleted as long as the parent volume or any of its clones exists.

Result

The FlexClone volume is created and, if NFS is in use, an entry is added to the /etc/export file for every entry found for the parent volume.

 

Example snapshot name:

To create a FlexClone volume "newclone" from the parent "flexvol1", the following command is entered:

vol clone create newclone -b flexvol1

The snapshot created by Data ONTAP is named "clone_newclone.1".

3

Verify the success of the FlexClone volume creation by entering the following command:

vol status -v cl_vol_name

FlexClone volumes and space guarantees  Top

A FlexClone volume inherits its initial space guarantee setting from its parent volume. For example, if you create a FlexClone volume from a parent volume with a space guarantee of volume, then the FlexClone volume's initial space guarantee will be volume as well. You can change the FlexClone volume's space guarantee at any time.

FlexClone volumes and shared snapshots  Top

A newly created FlexClone volume uses the snapshots it shares with its parent volume to optimize its space requirements from the aggregate when applying space guarantees. This is important because you can delete the shared snapshots from the FlexClone volume, but doing so may increase the space requirements of the FlexClone volume in the aggregate if space guarantees are being used.

Example

Suppose you have a 100-MB FlexVol volume with a space guarantee of volume, with 70 MB used and 30 MB free, and you use that FlexVol volume as a parent volume for a new FlexClone volume. The new FlexClone volume has an initial space guarantee of volume, but it does not require a full 100 MB of space from the aggregate, as it would if you had copied the volume. Instead, the aggregate only needs to allocate 100 MB minus 70 MB or 30 MB of free space to the clone.

Now, suppose that you delete the base snapshot from the FlexClone volume. Now, the FlexClone volume can no longer optimize its space requirements, and the full 100 MB is required from the containing aggregate.

What to do if you are prevented from deleting a snapshot from a FlexClone volume  Top

If you are prevented from deleting a snapshot from a FlexClone volume due to "insufficient space in the aggregate," it is because deleting that snapshot requires the allocation of more data than the aggregate currently has available. You can either increase the size of the aggregate, or change the space guarantee of the FlexClone volume.

Note
Before changing the space guarantee of the FlexClone volume, make sure you understand the effects of making such a change. For more information, see Space guarantees.

Identifying shared snapshots in FlexClone volumes  Top

Snapshots that are shared between a FlexClone volume and its parent are not identified as such in the FlexClone volume. However, you can identify a shared snapshot by listing the snapshots in the parent volume. Any snapshot that appears as busy, vclone in the parent volume and is also present in the FlexClone volume is a shared snapshot.

Using volume SnapMirror replication with FlexClone volumes  Top

Because both volume SnapMirror replication and FlexClone volumes rely on snapshots, there are some restrictions on how the two features can be used together.

Creating a volume SnapMirror relationship using an existing FlexClone volume or its parent

You can create a volume SnapMirror relationship using a FlexClone volume or its parent as the source volume. However, you cannot create a new volume SnapMirror relationship using either a FlexClone volume or its parent as the destination volume.

Creating a FlexClone volume from volumes currently in a SnapMirror relationship

You can create a FlexClone volume from a volume that is currently either the source or destination in an existing volume SnapMirror relationship. For example, you might want to create a FlexClone volume to create a writable copy of a SnapMirror destination volume without affecting the data in the SnapMirror source volume.

However, when you create the FlexClone volume, you might lock a snapshot that is used by SnapMirror. If that happens, SnapMirror stops replicating to the destination volume until the FlexClone volume is destroyed or split from its parent. You have two options for addressing this issue:

About splitting a FlexClone volume from its parent volume  Top

You might want to split your FlexClone volume and its parent into two independent volumes that occupy their own disk space.

Attention
When you split a FlexClone volume from its parent, all existing snapshots of the FlexClone volume are deleted.

Splitting a FlexClone volume from its parent will remove any space optimizations currently employed by the FlexClone volume. After the split, both the FlexClone volume and the parent volume will require the full space allocation determined by their space guarantees.

Because the clone-splitting operation is a copy operation that might take considerable time to carry out, Data ONTAP also provides commands to stop or check the status of a clone-splitting operation.

The clone-splitting operation proceeds in the background and does not interfere with data access to either the parent or the clone volume.

If you take the FlexClone volume offline while the splitting operation is in progress, the operation is suspended; when you bring the FlexClone volume back online, the splitting operation resumes.

Once a FlexClone volume and its parent volume have been split, they cannot be rejoined.

Splitting a FlexClone volume  Top

To split a FlexClone volume from its parent volume, complete the following steps.

Step

Action

1

Determine the approximate amount of free space required to split a FlexClone volume from its parent, enter the following command:

vol clone split estimate clone_name
2

Verify that enough free space exists in the containing aggregate to support storing the data of both the FlexClone volume and its parent volume by entering the following command:

df -A aggr_name 

aggr_name is the name of the containing aggregate of the FlexClone volume that you want to split.

The avail column tells you how much available space you have in your aggregate.

Note
When a FlexClone volume is split from its parent, the resulting two FlexVol volumes occupy completely different blocks within the same aggregate.

3

Enter the following command to split the volume:

vol clone split start cl_vol_name 

cl_vol_name is the name of the FlexClone volume that you want to split from its parent.

Result

The original volume and its clone begin to split apart, no longer sharing the blocks that they formerly shared. All existing snapshots of the FlexClone volume are deleted.

4

If you want to check the status of a clone-splitting operation, enter the following command:

vol clone status cl_vol_name 
5

If you want to stop the progress of an ongoing clone-splitting operation, enter the following command:

vol clone stop cl_vol_name

Result

The clone-splitting operation halts; the original and FlexClone volumes remain clone partners, but the disk space that was duplicated up to that point remains duplicated. All existing snapshots of the FlexClone volume are deleted.

6

To display status for the newly split FlexVol volume and verify the success of the clone-splitting operation, enter the following command:

vol status -v cl_vol_name

Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments