Created
May 13, 2020 20:26
-
-
Save travisn/782cf2ef9f4956d7799d658fca12942c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
osd_status=$(ceph osd tree | grep "osd.${FAILED_OSD_ID} " | awk '{print $5}') | |
if [[ "$osd_status" == "up" ]]; then | |
echo "OSD ${FAILED_OSD_ID} is up and running. Please check if you entered correct ID of failed osd!" | |
else | |
echo "OSD ${FAILED_OSD_ID} is down. Proceeding to mark out and purge." | |
ceph osd out osd.${FAILED_OSD_ID} | |
ceph osd purge osd.${FAILED_OSD_ID} --force --yes-i-really-mean-it | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When we're targeting octopus, the
ceph osd info osd.0
command will be much better thanceph osd tree
.