Manually enable the Ceph backup engine for Cinder

Manually enable the Ceph backup engine for CinderΒΆ

If your MCP version is earlier than 2019.2.4, before you back up or restore the Cinder volumes and snapshots, manually enable the Ceph backup engine parameters as described below. If your MCP version is 2019.2.4 or later, these parameters are enabled by default and you can proceed to Create a backup or restore Cinder volumes and snapshots right away.

To manually enable the Ceph backup engine for Cinder:

  1. Log in to the Salt Master node.

  2. Open your Git project repository with the Reclass model on the classes/cluster/<cluster_name>/ level.

  3. In /ceph/setup.yml, add a new pool called backups. For the pg_num and pgp_num parameters, copy the values from any existing Ceph pools, since these values are created from one source for all pools.

    For example:

    parameters:
      ceph:
        setup:
          pool:
            backups:
              pg_num: 8
              pgp_num: 8
              type: replicated
              application: rbd
    
  4. In /ceph/common.yml, add the profile rbd pool=backups OSD permission for the cinder user to the existing Ceph keyring OSD permissions for Cinder:

    parameters:
      ceph:
        common:
          keyring:
            cinder:
              caps:
                osd: "profile rbd pool=volumes, profile rbd-read-only pool=images, profile rbd pool=backups"
    
  5. In /openstack/init.yml, add the following definitions:

    parameters:
      _param:
        cinder_ceph_backup_pool: backups
        cinder_ceph_stripe_count: 0
        cinder_ceph_stripe_unit: 0
        cinder_ceph_backup_user: cinder
        cinder_ceph_chunk_size: 134217728
    
  6. In /openstack/control.yml, add the following classes:

    classes:
    - system.cinder.control.backup.ceph
    - system.cinder.volume.backup.ceph
    
  7. Update pillars and create a new pool:

    sudo salt '*' saltutil.refresh_pillar
    sudo salt 'cmn01*' state.apply ceph.setup
    
  8. Log in to the cmn01 node as a root user.

  9. Update the keyring for the cinder user. In the command below, substitute the --cap osd value with the one added to /ceph/common.yml in the step 4. For example:

    ceph-authtool /etc/ceph/ceph.client.cinder.keyring -n client.cinder \
     --cap osd 'profile rbd pool=volumes, profile rbd-read-only pool=images, profile rbd pool=backups' \
     --cap mon 'allow r, allow command \"osd blacklist\"'
    
  10. Apply the changes for Ceph:

    ceph auth import -i /etc/ceph/ceph.client.cinder.keyring
    
  11. Install the cinder-backup package and adjust the Cinder configuration:

    sudo salt 'ctl*' state.apply cinder
    

Now, you can proceed to Create a backup or restore Cinder volumes and snapshots.