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:
Verify that the Ceph Monitor instance is up and running and connected to the Salt Master node.
Log in to the Ceph Monitor node.
Synchronize Salt modules and refresh Salt pillars:
salt-call saltutil.sync_all
salt-call saltutil.refresh_pillar
Run the following Salt states:
salt-call state.sls linux,openssh,salt,ntp,rsyslog
Manually install Ceph packages:
apt install ceph-mon -y
Remove the following files from Ceph:
rm -rf /etc/ceph/* /var/lib/ceph/*
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/
Change the files ownership:
chown -R ceph:ceph /var/lib/ceph/*
Run the following Salt state:
salt-call state.sls ceph
If the output contains an error, rerun the state.