Chapter 1. Upgrade a Red Hat Ceph Storage cluster using cephadm
As a storage administrator, you can use the cephadm Orchestrator to upgrade Red Hat Ceph Storage 5 and later.
Upgrading directly from Red Hat Ceph Storage 4 to Red Hat Ceph Storage 6 is not supported.
The automated upgrade process follows Ceph best practices. For example:
- The upgrade order starts with Ceph Managers, Ceph Monitors, then other daemons.
- Each daemon is restarted only after Ceph indicates that the cluster will remain available.
The storage cluster health status is likely to switch to HEALTH_WARNING during the upgrade. When the upgrade is complete, the health status should switch back to HEALTH_OK.
If you have a Red Hat Ceph Storage 6 cluster with multi-site configured, do not upgrade to the latest version of 6.1.z1 as there are issues with data corruption on encrypted objects when objects replicate to the disaster recovery (DR) site.
You do not get a message once the upgrade is successful. Run ceph versions and ceph orch ps commands to verify the new image ID and the version of the storage cluster.
The Ceph iSCSI gateway is removed from Red Hat Ceph Storage 6. Therefore, you need to manage the iSCSI LUNs before upgrading from Red Hat Ceph Storage 5 to Red Hat Ceph Storage 6.
When you upgrade a Red Hat Ceph Storage cluster from RHCS 5 to RHCS 6, RBD images that were exported through iSCSI are preserved, therefore data is not lost. However, because all iSCSI targets disappear with the upgrade, data is temporarily inaccessible. To recover data, you can map such RBD images with rbd device map command or export them to a file with rbd export command.
1.1. Upgrading the Red Hat Ceph Storage cluster
You can use ceph orch upgrade command for upgrading a Red Hat Ceph Storage 5.0 cluster.
If a host operating system upgrade is required, the upgrade must be performed before upgrading the Red Hat Ceph Storage cluster. For instructions, see Upgrading a host operating system from RHEL 8 to RHEL 9 in the Red Hat Ceph Storage Installation Guide.
Prerequisites
- A running Red Hat Ceph Storage cluster 5.
-
Red Hat Enterprise Linux 9.0 or later with
ansible-corebundled into AppStream. - Root-level access to all the nodes.
-
Ansible user with sudo and passwordless
sshaccess to all nodes in the storage cluster. - At least two Ceph Manager nodes in the storage cluster: one active and one standby.
Upgrade to the latest version of Red Hat Ceph Storage 5.3.z5 prior to upgrading to the latest version Red Hat Ceph Storage 6.1.
Red Hat Ceph Storage 5 also includes a health check function that returns a DAEMON_OLD_VERSION warning if it detects that any of the daemons in the storage cluster are running multiple versions of RHCS. The warning is triggered when the daemons continue to run multiple versions of Red Hat Ceph Storage beyond the time value set in the mon_warn_older_version_delay option. By default, the mon_warn_older_version_delay option is set to 1 week. This setting allows most upgrades to proceed without falsely seeing the warning. If the upgrade process is paused for an extended time period, you can mute the health warning:
ceph health mute DAEMON_OLD_VERSION --sticky
After the upgrade has finished, unmute the health warning:
ceph health unmute DAEMON_OLD_VERSION
Red Hat Enterprise Linux 9 and later does not support the cephadm-ansible playbook.
Procedure
Update the
cephadmandcephadm-ansiblepackage:Example
[root@admin ~]# dnf update cephadm [root@admin ~]# dnf update cephadm-ansible
Navigate to the
/usr/share/cephadm-ansible/directory:Example
[root@admin ~]# cd /usr/share/cephadm-ansible
Run the preflight playbook with the
upgrade_ceph_packagesparameter set totrueon the bootstrapped host in the storage cluster:Syntax
ansible-playbook -i INVENTORY_FILE cephadm-preflight.yml --extra-vars "ceph_origin=rhcs upgrade_ceph_packages=true"Example
[ceph-admin@admin cephadm-ansible]$ ansible-playbook -i /etc/ansible/hosts cephadm-preflight.yml --extra-vars "ceph_origin=rhcs upgrade_ceph_packages=true"
This package upgrades
cephadmon all the nodes.Log into the
cephadmshell:Example
[root@host01 ~]# cephadm shell
Ensure all the hosts are online and that the storage cluster is healthy:
Example
[ceph: root@host01 /]# ceph -s
Set the OSD
noout,noscrub, andnodeep-scrubflags to prevent OSDs from getting marked out during upgrade and to avoid unnecessary load on the cluster:Example
[ceph: root@host01 /]# ceph osd set noout [ceph: root@host01 /]# ceph osd set noscrub [ceph: root@host01 /]# ceph osd set nodeep-scrub
Check service versions and the available target containers:
Syntax
ceph orch upgrade check IMAGE_NAMEExample
[ceph: root@host01 /]# ceph orch upgrade check registry.redhat.io/rhceph/rhceph-6-rhel9:latest
NoteThe image name is applicable for both Red Hat Enterprise Linux 8 and Red Hat Enterprise Linux 9.
Upgrade the storage cluster:
Syntax
ceph orch upgrade start IMAGE_NAMEExample
[ceph: root@host01 /]# ceph orch upgrade start registry.redhat.io/rhceph/rhceph-6-rhel9:latest
NoteTo perform a staggered upgrade, see Performing a staggered upgrade.
While the upgrade is underway, a progress bar appears in the
ceph statusoutput.Example
[ceph: root@host01 /]# ceph status [...] progress: Upgrade to 17.2.6-70.el9cp (1s) [............................]Verify the new IMAGE_ID and VERSION of the Ceph cluster:
Example
[ceph: root@host01 /]# ceph versions [ceph: root@host01 /]# ceph orch ps
NoteIf you are not using the
cephadm-ansibleplaybooks, after upgrading your Ceph cluster, you must upgrade theceph-commonpackage and client libraries on your client nodes.Example
[root@client01 ~] dnf update ceph-common
Verify you have the latest version:
Example
[root@client01 ~] ceph --version
When the upgrade is complete, unset the
noout,noscrub, andnodeep-scrubflags:Example
[ceph: root@host01 /]# ceph osd unset noout [ceph: root@host01 /]# ceph osd unset noscrub [ceph: root@host01 /]# ceph osd unset nodeep-scrub
1.2. Upgrading the Red Hat Ceph Storage cluster in a disconnected environment
You can upgrade the storage cluster in a disconnected environment by using the --image tag.
You can use ceph orch upgrade command for upgrading a Red Hat Ceph Storage 5 cluster.
Red Hat Enterprise Linux 9 and later does not support the cephadm-ansible playbook.
Prerequisites
- A running Red Hat Ceph Storage cluster 5.
-
Red Hat Enterprise Linux 9.0 or later with
ansible-corebundled into AppStream. - Root-level access to all the nodes.
-
Ansible user with sudo and passwordless
sshaccess to all nodes in the storage cluster. - At least two Ceph Manager nodes in the storage cluster: one active and one standby.
- Register the nodes to CDN and attach subscriptions.
- Check for the customer container images in a disconnected environment and change the configuration, if required. See the Changing configurations of custom container images for disconnected installations section in the Red Hat Ceph Storage Installation Guide for more details.
By default, the monitoring stack components are deployed based on the primary Ceph image. For disconnected environment of the storage cluster, you have to use the latest available monitoring stack component images.
Table 1.1. Custom image details for monitoring stack
| Monitoring stack component | Image details |
|---|---|
| Prometheus | registry.redhat.io/openshift4/ose-prometheus:v4.10 |
| Grafana | registry.redhat.io/rhceph-6-dashboard-rhel9:latest |
| Node-exporter | registry.redhat.io/openshift4/ose-prometheus-node-exporter:v4.10 |
| AlertManager | registry.redhat.io/openshift4/ose-prometheus-alertmanager:v4.10 |
| HAProxy | registry.redhat.io/rhceph/rhceph-haproxy-rhel9:latest |
| Keepalived | registry.redhat.io/rhceph/keepalived-rhel9:latest |
| SNMP Gateway | registry.redhat.io/rhceph/snmp-notifier-rhel9:latest |
Procedure
Update the
cephadmandcephadm-ansiblepackage.Example
[root@admin ~] dnf update cephadm [root@admin ~] dnf update cephadm-ansible
Run the preflight playbook with the
upgrade_ceph_packagesparameter set totrueand theceph_originparameter set tocustomon the bootstrapped host in the storage cluster:Syntax
ansible-playbook -i INVENTORY_FILE cephadm-preflight.yml --extra-vars "ceph_origin=custom upgrade_ceph_packages=true"Example
[ceph-admin@admin ~]$ ansible-playbook -i /etc/ansible/hosts cephadm-preflight.yml --extra-vars "ceph_origin=custom upgrade_ceph_packages=true"
This package upgrades
cephadmon all the nodes.Log into the
cephadmshell:Example
[root@node0 ~]# cephadm shell
Ensure all the hosts are online and that the storage cluster is healthy:
Example
[ceph: root@node0 /]# ceph -s
Set the OSD
noout,noscrub, andnodeep-scrubflags to prevent OSDs from getting marked out during upgrade and to avoid unnecessary load on the cluster:Example
[ceph: root@host01 /]# ceph osd set noout [ceph: root@host01 /]# ceph osd set noscrub [ceph: root@host01 /]# ceph osd set nodeep-scrub
Check service versions and the available target containers:
Syntax
ceph orch upgrade check IMAGE_NAMEExample
[ceph: root@node0 /]# ceph orch upgrade check LOCAL_NODE_FQDN:5000/rhceph/rhceph-6-rhel9Upgrade the storage cluster:
Syntax
ceph orch upgrade start IMAGE_NAMEExample
[ceph: root@node0 /]# ceph orch upgrade start LOCAL_NODE_FQDN:5000/rhceph/rhceph-6-rhel9While the upgrade is underway, a progress bar appears in the
ceph statusoutput.Example
[ceph: root@node0 /]# ceph status [...] progress: Upgrade to 17.2.6-70.el9cp (1s) [............................]Verify the new IMAGE_ID and VERSION of the Ceph cluster:
Example
[ceph: root@node0 /]# ceph version [ceph: root@node0 /]# ceph versions [ceph: root@node0 /]# ceph orch ps
When the upgrade is complete, unset the
noout,noscrub, andnodeep-scrubflags:Example
[ceph: root@host01 /]# ceph osd unset noout [ceph: root@host01 /]# ceph osd unset noscrub [ceph: root@host01 /]# ceph osd unset nodeep-scrub
Additional Resources
- See the Registering Red Hat Ceph Storage nodes to the CDN and attaching subscriptions section in the Red Hat Ceph Storage Installation Guide.
- See the Configuring a private registry for a disconnected installation section in the Red Hat Ceph Storage Installation Guide.