Using LUN clones
What a LUN clone is
A LUN clone is a point-in-time, writable copy of a LUN in a Snapshot copy. Changes made to the parent LUN after the clone is created are not reflected in the clone.
A LUN clone shares space with the LUN in the backing Snapshot copy. The clone does not require additional disk space until changes are made to it. You cannot delete the backing Snapshot copy until you split the clone from it. When you split the clone from the backing Snapshot copy, you copy the data from the Snapshot copy to the clone. After the splitting operation, both the backing Snapshot copy and the clone occupy their own space.
Note
Cloning is not NVLOG protected, so if the storage system panics during a clone operation, the operation is restarted from the beginning on a reboot or takeover.
Reasons for cloning LUNs
You can use LUN clones to create multiple read/write copies of a LUN. You might want to do this for the following reasons:
- You need to create a temporary copy of a LUN for testing purposes.
- You need to make a copy of your data available to additional users without giving them access to the production data.
- You want to create a clone of a database for manipulation and projection operations, while preserving the original data in unaltered form.
- You want to access a specific subset of a LUN's data (a specific logical volume or file system in a volume group, or a specific file or set of files in a file system) and copy it to the original LUN, without restoring the rest of the data in the original LUN. This works on operating systems that support mounting a LUN and a clone of the LUN at the same time. SnapDrive for UNIX allows this with the snap connect command.
Creating a Snapshot copy of a LUN
Before you can clone a LUN, you must create a Snapshot copy (the backing Snapshot copy) of a LUN you want to clone. To create a Snapshot copy, complete the following steps.
Step
|
Action
|
|
1
|
Create a LUN by entering the following command:
lun create -s size lun_path
Example
lun create -s 100g /vol/vol1/lun0
|
|
2
|
Create a Snapshot copy of the volume containing the LUN to be cloned by entering the following command:
snap create volume_name snapshot_name
Example
snap create vol1 mysnap
|
Creating a clone of the LUN
After you create the Snapshot copy of the LUN, you create the LUN clone. To create the LUN clone, complete the following step.
Step
|
Action
|
|
1
|
Enter the following command:
lun clone create clone_lun_path -b parent_lun_path
parent_snap
clone_lun_path is the path to the clone you are creating, for example, /vol/vol1/lun0clone.
parent_lun_path is the path to the original LUN.
parent_snap is the name of the Snapshot copy of the original LUN.
Example
lun clone create /vol/vol1/lun0clone -b
vol/vol1/lun0 mysnap
|
Splitting the clone from the backing Snapshot copy
You can split the LUN clone from the backing Snapshot copy and then delete the Snapshot copy without taking the LUN offline or losing its contents. To begin the process of splitting the clone from the backing Snapshot copy, complete the following step.
Step
|
Action
|
|
1
|
Begin the clone operation by entering the following command:
lun clone split start lun_path
lun_path is the path to the parent LUN.
Result
The clone does not share data blocks with the Snapshot copy of the original LUN. This means you can delete the Snapshot copy.
|
Displaying or stopping the progress of a clone-splitting operation
Because clone splitting is a copy operation and might take considerable time to complete, you can stop or check the status of a clone splitting operation.
Displaying the progress of a clone-splitting operation
To display the progress of the clone-splitting operation, complete the following step.
Step
|
Action
|
|
1
|
Enter the following command:
lun clone split status lun_path
lun_path is the path to the parent LUN.
|
Stopping the clone-splitting process
If you need to stop the clone process, complete the following step.
Step
|
Action
|
|
1
|
Enter the following the command:
lun clone split stop lun_path
lun_path is the path to the parent LUN.
|
Copyright © 1994-2005, Network Appliance, Inc. All rights
reserved.
Part No. 210-01094_B0
File: c9data-4.htm
Last updated: 08-Dec-2005 13:25:35