Simple bash script to reboot OSD nodes one by one

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com



[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux