Grains and the FlashCopy bitmap

When data is copied between volumes, it is copied in units of address space that are known as grains.

The grain size can be either 64 KB or 256 KB. The FlashCopy bitmap contains 1 bit for each grain. The bit records whether the associated grain is split by copying the grain from the source to the target. After a FlashCopy mapping is created, the grain size for that FlashCopy mapping cannot be changed. When a FlashCopy mapping is created, if the grain size parameter is not specified and one of the volumes is already part of a FlashCopy mapping, the grain size of that mapping is used. If neither volume in the new mapping is already part of another FlashCopy mapping, and at least one of the volumes in the mapping is a compressed volume, the default grain size is 64 for performance considerations. But other than in this situation, the default grain size is 256.

Write to target volume

A write to the newest target volume must consider the state of the grain for its own mapping and the grain of the next oldest mapping.
  • If the grain of the intermediate mapping or the next oldest mapping is not copied, it must be copied before the write is allowed to proceed. This copy is done to preserve the contents of the next oldest mapping. The data that is written to the next oldest mapping can come from a target or source.
  • If the grain of the target that is being written is not copied, the grain is copied from the oldest already copied grain in the mappings that are newer than the target (or the source if no targets are already copied). After the copy is complete, the write can be applied to the target.

Read to target volume

If the grain that is being read is split, the read returns data from the target that is being read. If the read is to an uncopied grain on an intermediate target volume, each of the newer mappings is examined to determine whether the grain is split. The read is surfaced from the first split grain that is found. If the newer mappings do not have a split grain, the read is surfaced from the source volume.