Search

Chapter 4. Creating VolumeReplicationClass resource

download PDF

The VolumeReplicationClass is used to specify the mirroringMode for each volume to be replicated as well as how often a volume or image is replicated (for example, every 5 minutes) from the local cluster to the remote cluster.

Note

This resource must be created on the Primary managed cluster and the Secondary managed cluster.

Procedure

  1. Save the following YAML to filename rbd-volumereplicationclass.yaml.

    apiVersion: replication.storage.openshift.io/v1alpha1
    kind: VolumeReplicationClass
    metadata:
      name: odf-rbd-volumereplicationclass
    spec:
      provisioner: openshift-storage.rbd.csi.ceph.com
      parameters:
        mirroringMode: snapshot
        schedulingInterval: "5m"  # <-- Must be the same as scheduling interval in the DRPolicy
        replication.storage.openshift.io/replication-secret-name: rook-csi-rbd-provisioner
        replication.storage.openshift.io/replication-secret-namespace: openshift-storage
  2. Create the file on both the managed clusters.

    $ oc create -f rbd-volumereplicationclass.yaml

    Example output:

    volumereplicationclass.replication.storage.openshift.io/odf-rbd-volumereplicationclass created
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.