//Cloudogu EcoSystem Docs

Calculate volume size

The volume sizes of individual dogus between the source and target instance can have different values in terms of the actual usage. A loss-free migration of data can only be guaranteed if the volume size on the target instance is at least equal to the actual size of the source instance.

The exporter always returns the entire size of the volume that is to be used by the importer. In the case of a CES MN instance, the entire capacity of the PersistentVolumeClaim (PVC) is used for this. This already corresponds to the target size for the importer.

With a CES VM instance, the actual size of the volume is calculated, which corresponds to the actual as-is state. If this as-is state is transferred to the importer as the target size, it is possible that the PVC used by the importer has already been exhausted. Therefore, it makes sense to add a buffer to the actual size of the volume to increase the capacity of the importer's PVC and thus gives us more room for the growing amount of data on the target instance.

The buffer can be configured in the CES-VM exporter within the ETCD under the path /config/ces-exporter/volumeIncreaseFactor. A value of 30% of the actual volume size has been configured as the default value, which is applied to each volume in the CES-VM. It should be noted that the volume size is calculated in bytes (B) and is displayed as gibibyte (GiB = 1024³ B). As some cloud providers only calculate with full GiB, the calculated result is rounded to the next full GiB.

To estimate the size of the PVC on the target instance:

  1. determine the size of the volume on the source instance in bytes (B).
  2. multiply the size by volumeIncreaseFactor

    • Example: A volume with 2.1 GigaByte (GB) (= 2,100,000,000 B) and a volumeIncreaseFactor of 1.3 corresponds to 2,730,000,000 B = 2.73 GB = 2.54 GiB
  3. round to the next full GiB.

    • Example: 2.54 GiB is rounded up to 3 GiB.
  4. a PVC with 3 GiB = 3.22 GB is created on the target instance.

Note After the migration the amount of data in the volumes of the target instance does not always match the amount of data in the volumes of the source instance. This is due to differences in the configuration and is generally not a problem.