Deploying a Db2 or Db2 Warehouse HADR configuration by using a shared volume for backup storage

When you set up an HADR configuration, you can copy assets between the primary and standby databases by using a shared persistent volume claim for backup storage.

About this task

This process creates a dynamically provisioned persistent volume that is shared between the primary and standby databases. This volume is used by the Db2 or Db2 Warehouse HADR custom resource definition to share the database backup and keystore tar file between the two deployments.

Procedure

  1. Deploy the primary database with a backup storage area.
  2. Once the primary database has been deployed, determine the name of the backup PVC created for the primary deployment.
    This can be done using:
     oc get pvc | grep -backup
    The PVC name should contain the name of the primary Db2uCluster with the -backup suffix.
  3. Deploy the standby database using the existing backup storage persistent volume claim (PVC) from the primary database. For example, the storage section of the Db2uCluster CR would look as follows:
    - claimName: c-db2oltp-crd-hadr-primary-backup  
      name: backup
      spec:
         resources: {} 
      type: existing
    Ensure you use the name of the PVC determined previously as the claimName.