FlashCopy mappings
The FlashCopy® function creates a point-in-time copy of data that is stored on a source volume to a target volume. In its basic mode, the FlashCopy function creates copies of content on a source volume to a target volume in a mapping. The function associates a source volume and a target volume in a mapping. If data exists on the target volume, that data is replaced by the copied data.
The FlashCopy® function makes an instant copy of a volume at the time that it is started. To create an instant copy of a volume, you must first create a mapping between the source volume (the disk that is copied) and the target volume (the disk that receives the copy). The source and target volumes must be of equal size.
A FlashCopy mapping defines the relationship that copies data between a source volume and a target volume. A mapping can be created between any two volumes in a system. The volumes do not have to be in the same I/O group or pool. When a FlashCopy operation starts, a checkpoint is made of the source volume. No data is copied at the time a start operation occurs. Instead, the checkpoint creates a bitmap that indicates that no part of the source volume has been copied. Each bit in the bitmap represents one region of the source volume. Each region is called a grain. During a read operation to the target volume, the bitmap is used to determine whether the grain was copied. If the grain was copied, the data is read from the target volume. If the grain was not copied, the data is read from the source volume.
Although it is difficult to make a consistent copy of a data set that is constantly updated, point-in-time copy techniques help solve this problem. If a copy of a data set is created that uses a technology that does not provide point-in-time techniques and the data set changes during the copy operation, the resulting copy might contain data that is not consistent. For example, if a reference to an object is copied earlier than the object itself and the object is moved before it is copied, the copy contains the referenced object at its new location, but the copied reference still points to the previous location. You can also assign background copy and cleaning rates to a FlashCopy mapping to control the rate at which updates are propagated to the remote system. FlashCopy mapping copy rate values can be from 128 KBps to 2 GBps and can be changed when the FlashCopy mapping is in any state.
FlashCopy mappings can be assigned to an ownership group. An ownership group defines a subset of users and objects within the system. You can create ownership groups to further restrict access to specific resources that are defined in the ownership group. Only users with Security Administrator roles can configure and manage ownership groups. Restricted users are those users who are defined to a specific ownership group and can only view or manage specific resources that are assigned to that ownership group. Unrestricted users are not defined to an ownership group and can manage any objects on the system based on their role on the system.
Ownership can be defined explicitly or it can be inherited from the user, user group, or from other parent resources, depending on the type of resource. FlashCopy mappings inherit ownership from the parent resource. A user cannot change the ownership group of the resource, but can change the ownership group of the parent object. The following rules apply to FlashCopy mappings that are defined in ownership groups:
- FlashCopy mappings inherit the ownership group of both the volumes that are defined in the mapping.
- Like with FlashCopy consistency groups, it is possible for a consistency group and its mappings to belong to different ownership groups. However, the ownership of the consistency group has no impact in the ownership of the mappings that it contains.
Incremental FlashCopy mappings
In an incremental FlashCopy, the initial mapping copies all of the data from the source volume to the target volume. Subsequent FlashCopy mappings copy only data that was modified after the initial FlashCopy mapping, as shown in Figure 1. This process reduces the amount of time that is needed to re-create an independent FlashCopy image. You can define a FlashCopy mapping as incremental only when you create the FlashCopy mapping.
FlashCopy partner mappings
You can create a mapping to mirror an existing incremental FlashCopy mapping. The mappings that are paired are called partners. A mapping can have only one partner. For example, if you have volume A and volume B with two mappings (Mapping 0 from volume A to volume B and Mapping 1 from volume B to volume 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.
Cascaded FlashCopy mappings
The cascaded FlashCopy function allows a FlashCopy target volume to be the source volume of another FlashCopy mapping, as shown in Figure 2.
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.
Multiple target FlashCopy mappings
You can copy up to 256 target volumes from a single source volume. Each relationship between a source and target volume is managed by a unique mapping such that a single volume can be the source volume 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.
As another example, Target volume A depends on Target volume B if the mapping that volume A belongs to depend on the mapping that Target volume B belongs to. The target volume of the most recently started mapping from the source volume depends on the source volume until a complete copy of the source is created (progress is 100%).
Clean rate, copy rate, and autodelete
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 volume is offline while the mapping is stopping. The target volume remains offline until the mapping is restarted.
You also specify a copy rate when you create a mapping. 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 volume so that a mapping can be deleted and still be accessed from the target volume, you must copy all the data that is on the source volume to the target volume.
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, the unchanged data is copied to the target volume. The bitmap is updated to show that the data was copied. After a time, the length of which depends on the priority that was determined by the copy rate and the size of the volume, the whole volume 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, 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. However, unless the target volume already contains a complete copy of the source volume, when the mapping is stopped, the target becomes inconsistent and the target volume is taken offline. The target volume 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%.
FlashCopy mapping states
If you do not want to use consistency groups, the system 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 were configured in this way, use the prestartfcmap and startfcmap commands rather than the prestartfcconsistgrp and startfcconsistgrp commands.
FlashCopy mapping restoration
You can start a mapping with a target volume that is the source volume 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 startfcmap and
prestartfcmap commands. You can restore the contents of a FlashCopy source volume 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 volume.
Veritas Volume Manager
For FlashCopy target volumes, the system sets a bit in the inquiry data for those mapping states where the target volume might be an exact image of the source volume. Setting this bit enables the Veritas Volume Manager to distinguish between the source and target volumes and provide independent access to both.