We use the following script after upgrades, and whenever it is
necessary to reboot OSD nodes one at a time, making sure all PGs are
healthy before rebooting the next node. I thought it may be helpful
to share. The 600 seconds may need to be adjusted based on your load,
OSD types etc.
#!/bin/bash
ceph osd set noout
ceph osd set noscrub
ceph osd set nodeep-scrub
for anode in `ceph osd tree|grep host|awk '{print $4}'` ; do
while [ -n "$(sudo ceph -s|grep degraded)" ]; do
echo "seeing degraded - sleeping 1 minute"
sleep 60
done
echo Rebooting $anode
ssh $anode reboot
echo Sleeping 10 minutes
sleep 600
done
--
Alex Gorbachev
Intelligent Systems Services Inc.
_______________________________________________
ceph-users mailing list
[email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com