Created
November 11, 2019 11:00
-
-
Save wido/8c9f9ef141182b5b89a50cbc8dcad71c to your computer and use it in GitHub Desktop.
Start all failed Ceph OSDs
This file contains hidden or 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
#!/bin/sh | |
# | |
# Start all OSDs on a host which didnt start for some reason | |
# | |
# Author: Wido den Hollander <[email protected]> | |
# | |
df -h|grep ceph|grep osd|awk '{print $6}'|cut -d '-' -f 2|sort -n|xargs -n 1 -I OSD systemctl reset-failed ceph-osd@OSD | |
df -h|grep ceph|grep osd|awk '{print $6}'|cut -d '-' -f 2|sort -n|xargs -n 1 -I OSD systemctl start ceph-osd@OSD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment