Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 1. Backing up your Red Hat OpenStack Platform cluster by using the Snapshot and Revert tool

download PDF

Snapshots preserve the original disk state of your Red Hat OpenStack Platform (RHOSP) cluster before you perform an upgrade or an update from RHOSP 17.1 or later. You can then remove or revert the snapshots depending on the results. For example, if an upgrade completed successfully and you do not need the snapshots anymore, remove them from your nodes. If an upgrade fails, you can revert the snapshots, assess any errors, and start the upgrade procedure again. A revert leaves the disks of all the nodes exactly as they were when the snapshot was taken.

The RHOSP Snapshot and Revert tool is based on the Logical Volume Manager (LVM) snapshot functionality and is only intended to revert an unsuccessful upgrade or update.

Important

The snapshots are stored on the same hard drives as the data you have stored on your disks. As a result, the Snapshot and Revert tool does not prevent data loss in cases of hardware failure, data center failure, or inaccessible nodes.

You can take snapshots of Controller nodes and Compute nodes. Taking snapshots of the undercloud is not supported.

1.1. Creating a snapshot of Controller and Compute nodes

Create a snapshot of your Controller and Compute nodes before performing an upgrade or update. You can then remove or revert the snapshots depending on the results of those actions.

Note

You can create only one snapshot of your Controller and Compute nodes. To create another snapshot, you must remove or revert your previous snapshot.

Prerequisites

  • You have LVM enabled on the node.
  • The following default set of LVM logical volumes defined by a RHOSP installation are present:

    • /dev/vg/lv_audit
    • /dev/vg/lv_home
    • /dev/vg/lv_log
    • /dev/vg/lv_root
    • /dev/vg/lv_srv
    • /dev/vg/lv_var

You can run the lvs, lvscan, or lvdisplay commands to confirm whether your environment includes these prerequisites before you make changes to the node disks.

Note

These prerequisites are included with the default installation of a 17.1 cluster. However, if you upgraded to RHOSP 17.1 from an earlier RHOSP version, your control plane does not include these prerequisites because they require reformatting of the disk.

Procedure

  1. Log in to the undercloud as the stack user.
  2. Source the stackrc undercloud credentials file:

    [stack@undercloud ~]$ source stackrc
    (undercloud) [stack@undercloud ~]$
  3. If you have not done so before, extract the static Ansible inventory file from the location in which it was saved during installation:

    (undercloud) [stack@undercloud ~]$ cp ~/overcloud-deploy/<stack> /tripleo-ansible-inventory.yaml ~/tripleo-inventory.yaml
    • Replace <stack> with the name of your stack. By default, the name of the stack is overcloud.
  4. Take the snapshots:

    (undercloud) [stack@undercloud ~]$ openstack overcloud backup snapshot --inventory ~/tripleo-inventory.yaml
  5. If your upgrade or update was successful, remove the snapshots:

    (undercloud) [stack@undercloud ~]$ openstack overcloud backup snapshot --remove --inventory ~/tripleo-inventory.yaml
    Important

    Removing snapshots is a critical action. Remove the snapshots if you do not intend to revert the nodes, for example, after an upgrade completes successfully. If you retain snapshots on the nodes for too long, they degrade disk I/O performance.

  6. If your upgrade or update failed, revert the snapshots:

    (undercloud) [stack@undercloud ~]$ openstack overcloud backup snapshot --revert --inventory ~/tripleo-inventory.yaml
    1. Reboot each node that you reverted so the changes are applied to the filesystem. The revert option automatically deletes the snapshots.
Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.