Skip to main content

Clone volumes and LUNs for testing with ONTAP System Manager

Contributors netapp-aherbin netapp-thomi netapp-barbe netapp-dbagwell netapp-lenida netapp-ahibbard

You can clone volumes and LUNs to create temporary, writable copies for testing. The clones reflect the current, point-in-time state of the data. You can also use clones to give additional users access to data without giving them access to production data.

Before you begin

The FlexClone license should be installed on the storage system.

Cloning a volume

Create a clone of a volume, as follows:

Steps
  1. Click Storage > Volumes.

  2. Click Menu options icon next to the name of the volume you want to clone.

  3. Select Clone from the list.

  4. Specify a name for the clone and complete the other selections.

  5. Click Clone and verify that the volume clone appears in the list of volumes.

Alternatively, you can clone a volume from the Overview that displays when you view volume details.

Cloning a LUN

You can create copies of your LUNs by cloning the LUNs in the active volume. These FlexClone LUNs are readable and writeable copies of the original LUNs in the active volume.

A space-reserved FlexClone LUN requires as much space as the space-reserved parent LUN. If the FlexClone LUN is not space-reserved, you must ensure that the volume has enough space to accommodate changes to the FlexClone LUN.

Note This procedure applies to FAS, AFF, and ASA systems. If you have an ASA r2 system (ASA A1K, ASA A90, ASA A70, ASA A50, ASA A30, ASA A20, or ASA C30), follow these steps to clone data. ASA r2 systems provide a simplified ONTAP experience specific to SAN-only customers.
Example 1. Steps
System Manager
  1. Click Storage > LUNs.

  2. Click Menu options icon next to the name of the LUN you want to clone.

  3. Select Clone from the list.

  4. Specify a name for the clone and complete the other selections.

  5. Click Clone and verify that the LUN clone appears in the list of LUNs.

Alternatively, you can clone a LUN from the Overview that displays when you view LUN details.

When you create a LUN clone, System Manager automatically enables the deletion of the clone when space is needed.

CLI
  1. Verify that the LUNs are not mapped to an igroup or are written to before making the clone.

  2. Use the lun show command to verify that the LUN exists.

    lun show -vserver vs1

    Vserver  Path              State     Mapped    Type     Size
    -------- ----------------- --------- --------- -------- -------
    vs1      /vol/vol1/lun1    online   unmapped  windows  47.07MB
  3. Use the volume file clone create command to create the FlexClone LUN.

    volume file clone create -vserver vs1 -volume vol1 -source-path lun1 -destination-path/lun1_clone

    If you need the FlexClone LUN to be available for automatic deletion, you include -autodelete true. If you are creating this FlexClone LUN in a volume using semi-thick provisioning, you must enable automatic deletion for all FlexClone LUNs.

  4. Use the lun show command to verify that you created a LUN.

    lun show -vserver vs1

    Vserver  Path                    State    Mapped   Type     Size
    -------- ----------------------- -------- -------- -------- ------
    vs1      /vol/volX/lun1          online   unmapped windows  47.07MB
    vs1      /vol/volX/lun1_clone    online   unmapped windows  47.07MB