A FlashCopy® mapping defines the relationship between a source virtual disk (VDisk) and a target VDisk.
The FlashCopy feature makes an instant copy of a VDisk at the time that it is started. To create an instant copy of a VDisk, you must first create a mapping between the source VDisk (the disk that is copied) and the target VDisk (the disk that receives the copy). The source and target VDisks must be of equal size.
A mapping can be created between any two VDisks in a cluster. The VDisks do not have to be in the same I/O group or managed disk (MDisk) group. When a FlashCopy operation starts, a checkpoint is made of the source VDisk. No data is actually copied at the time a start occurs. Instead, the checkpoint creates a bitmap that indicates that no part of the source VDisk has been copied. Each bit in the bitmap represents one region of the source VDisk. Each region is called a grain.
After a FlashCopy operation starts, read operations to the source VDisk continue to occur. If new data is written to the source or target VDisk, the existing data on the source is copied to the target VDisk before the new data is written to the source or target VDisk. The bitmap is updated to mark that the grain of the source VDisk has been copied so that later write operations to the same grain do not recopy the data.
During a read operation to the target VDisk, the bitmap is used to determine if the grain has been copied. If the grain has been copied, the data is read from the target VDisk. If the grain has not been copied, the data is read from the source VDisk.
You can use the clean rate to minimize the amount of time that a mapping is in the stopping state. If the mapping has not completed, the target VDisk is offline while the mapping is stopping. The target VDisk remains offline until the mapping is restarted.
When you create a mapping, you specify a copy rate. When the mapping is in the copying state, the copy rate determines the priority that is given to the background copy process. If you want a copy of the whole source VDisk so that a mapping can be deleted and still be accessed from the target VDisk, you must copy all the data that is on the source VDisk to the target VDisk.
The default values for both the clean rate and the copy rate is 50.
When a mapping is started and the copy rate is greater than zero (or a value other than NOCOPY ), the unchanged data is copied to the target VDisk, and the bitmap is updated to show that the copy has occurred. After a time, the length of which depends on the priority that was determined by the copy rate and the size of the VDisk, the whole VDisk is copied to the target. The mapping returns to the idle_or_copied state and you can now restart the mapping at any time to create a new copy at the target.
While the mapping is in the copying state, you can set the copy rate to zero and the clean rate to a value other than zero to minimize the amount of time a mapping is in the stopping state.
If you use multiple target mappings, the mapping can stay in the copying state after all of the source data is copied to the target (the progress is 100%). This situation can occur if mappings that were started earlier and use the same source disk are not yet 100% copied.
If the copy rate is zero (or NOCOPY), only the data that changes on the source is copied to the target. The target never contains a copy of the whole source unless every extent is overwritten at the source. You can use this copy rate when you require a temporary copy of the source.
You can stop the mapping at any time after it has been started. Unless the target VDisk already contains a complete copy of the source VDisk, this action makes the target inconsistent and the target VDisk is taken offline. The target VDisk remains offline until the mapping is restarted.
You can also set the autodelete attribute. If this attribute is set to on, the mapping is automatically deleted when the mapping reaches the idle_or_copied state and the progress is 100%.
If the mapping is incremental and the background copy is complete, the mapping only records the differences between the source and target VDisks. If the connection to both nodes in the I/O group that the mapping is assigned to is lost, the source and target VDisks will be offline.
If you do not want to use consistency groups, the SAN Volume Controller allows a mapping to be treated as an independent entity. In this case, the mapping is known as a stand-alone mapping. For mappings that have been configured in this way, use the svctask prestartfcmap and svctask startfcmap commands rather than the svctask prestartfcconsistgrp and svctask startfcconsistgrp commands.
You can copy up to 256 target VDisks from a single source VDisk. Each relationship between a source and target VDisk is managed by a unique mapping such that a single VDisk can be the source VDisk in up to 256 mappings.
Each of the mappings from a single source can be started and stopped independently. If multiple mappings from the same source are active (in the copying or stopping states), a dependency exists between these mappings.
Example 1
Example 2
Target VDisk A depends on target VDisk B if the mapping that VDisk A belongs to depends on the mapping that target VDisk B belongs to. The target VDisk of the most recently started mapping from the source VDisk depends on the source VDisk until there is a complete copy of the source (progress is 100% ).
With incremental FlashCopy mappings, the background copy process copies only the parts of the source or target VDisk that have changed since the last FlashCopy process. This reduces the amount of time that it takes to recreate an independent FlashCopy image.
With cascaded FlashCopy mappings, target VDisks can be the source of other mappings.
Up to 256 mappings can exist in a cascade. If cascaded mappings and multiple target mappings are used, a tree of up to 256 mappings can be created.
You can start a mapping with a target VDisk that is the source VDisk of another active mapping that is in either the idle_copied, stopped, or copying states. If the mapping is in the copying state, the restore parameter is required for the svctask startfcmap and svctask prestartfcmap commands. You can restore the contents of a FlashCopy source VDisk by using the target of the same FlashCopy mapping or a different FlashCopy mapping without waiting for the mapping to become idle and without loss of the contents of any other FlashCopy target VDisk.
You can create a mapping to mirror an existing FlashCopy mapping. The resulting pair of mappings are called partners. A mapping can have only one partner. For example, if you have VDisk A and VDisk B with two mappings (Mapping 0 from VDisk A to VDisk B and Mapping 1 from VDisk B to VDisk A), Mapping 0 and Mapping 1 are partners.
Incremental FlashCopy mappings share the metadata for recording changes. Therefore, if one mapping in a mirrored pair (partnership) is incremental, the other mapping becomes incremental automatically and remains incremental until it is deleted.
A cluster that is running SAN Volume Controller version 4.3.x can have FlashCopy mappings that mirror each other. If such a cluster is upgraded to SAN Volume Controller version 5.1.0, these mappings become partners. A nonincremental FlashCopy mapping that becomes the partner of an incremental FlashCopy mapping during the upgrade process becomes incremental. If two mirrored FlashCopy mappings are incremental before the upgrade, the resulting partners become incremental and the amount of metadata that is used is reduced. Only one incremental bitmap is required for the pair.
For FlashCopy target VDisks, the SAN Volume Controller sets a bit in the inquiry data for those mapping states where the target VDisk could be an exact image of the source VDisk. Setting this bit enables the Veritas Volume Manager to distinguish between the source and target VDisks and provide independent access to both.