Restore a Ceph Monitor node

Restore a Ceph Monitor nodeΒΆ

You may need to restore a Ceph Monitor node after a failure. For example, if the data in the Ceph-related directories disappeared.

To restore a Ceph Monitor node:

  1. Verify that the Ceph Monitor instance is up and running and connected to the Salt Master node.

  2. Log in to the Ceph Monitor node.

  3. Synchronize Salt modules and refresh Salt pillars:

    salt-call saltutil.sync_all
    salt-call saltutil.refresh_pillar
    
  4. Run the following Salt states:

    salt-call state.sls linux,openssh,salt,ntp,rsyslog
    
  5. Manually install Ceph packages:

    apt install ceph-mon -y
    
  6. Remove the following files from Ceph:

    rm -rf /etc/ceph/* /var/lib/ceph/*
    
  7. From the Ceph backup, copy the files from /etc/ceph/ and /var/lib/ceph to their original directories:

    cp -r /<etc_ceph_backup_path>/* /etc/ceph/
    cp -r /<var_lib_ceph_backup_path>/* /var/lib/ceph/
    
  8. Change the files ownership:

    chown -R ceph:ceph /var/lib/ceph/*
    
  9. Run the following Salt state:

    salt-call state.sls ceph
    

    If the output contains an error, rerun the state.