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
#!/bin/bash | |
merge_num=-2 | |
split_num=16 | |
while [[ "$(ceph health)" != "HEALTH_OK" ]]; do | |
sleep 10 | |
done | |
# Some method to set your ceph.conf file to the subfolder splitting settings you want. |
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
#!/bin/bash | |
print_help() { | |
echo " | |
usage: gen_maps.sh [options] [variables] | |
--cluster Specify cluster (default is ceph) | |
--crush Specify custom crush map | |
" |
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
#!/bin/bash | |
declare -A pool_pgs | |
declare -A pool_objs | |
output=$(ceph pg dump 2>/dev/null | awk '/active/ {print $1,$2}' | sed 's/\.[[:alnum:]]*//') | |
while read pool objs; do | |
pool_objs[$pool]=$(( ${pool_objs[$pool]:-0} + $objs)) | |
pool_pgs[$pool]=$(( ${pool_pgs[$pool]} + 1 )) | |
done <<< "$output" | |
output="pool+objects+pgs+per" |
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
#!/bin/bash | |
# folder to place logs | |
logging_folder=/root/fio_testing | |
mkdir -p "$output_folder" | |
# use all mapped RBDs in the specified pool with the specified prefix | |
pool=rbd | |
rbd_prefix=test | |
rbds=$(echo $(ls /dev/rbd/${pool}/${rbd_prefix}*) | sed 's/ /:/g') |
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
#!/bin/bash | |
# Name: osd_omap_compaction.sh | |
# | |
# This will compact the omap dbs on OSDs | |
# Wait until the cluster is Healthy | |
HEALTH_OK=${1:-"HEALTH_OK"} | |
while [[ "$(ceph health)" != "$HEALTH_OK" ]]; do | |
sleep 10 |
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
pg_state=backfilling | |
counts=$(ceph pg dump pgs_brief 2>/dev/null | awk -F'.' '/'${pg_state}'/ {print $1}' | sort | uniq -c) | |
pools=$(echo "$counts" | awk '{print $2}' | sed 's/^/ /' | sed 's/$/\$\\\|/' | sed 's/\\|$//') | |
output=$(ceph df | awk '{print $1" "$3" "$2}' | grep "$pools") | |
while read count pool; do | |
output=$(echo "$output" | sed "s/ $pool$/ $count/") | |
done <<< "$counts" | |
echo "pool used #pgs $pg_state | |
$output" | column -t -s' ' |
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
#!/bin/bash | |
[[ "$1" == *list* ]] && list=true || list=false | |
[[ "$1" == *force* ]] && force=true || force=false | |
ENABLED=true | |
# List of features to ensure are enabled on each RBD | |
FEATURES='layering exclusive-lock object-map fast-diff' | |
# Prefix for the metadata keys on RBDs for the backup snapshots | |
KEY_PREFIX=backsnap | |
# How many hours between backups. Anything over 24 will back up once/day. |
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
var SEVERITY_COLORS = [ | |
'#97AAB3', '#7499FF', '#FFC859', | |
'#FFA059', '#E97659', '#E45959' | |
]; | |
var RESOLVE_COLOR = '#009900'; | |
var SLACK_MODE_HANDLERS = { | |
alarm: handlerAlarm, | |
event: handlerEvent |
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
#!/bin/bash | |
API="https://registry.hub.docker.com/v2/repositories" | |
HASH_DIR="/home/david/k8s/scripts/hash" | |
# image tag namespace { space deliminated list of labels } | |
IMAGES="wordpress latest friends app=george | |
beamdog/nwserver latest games app=nwn | |
itzg/minecraft-server latest games app=minecraft instance=mc-persistent" | |
do_sleep=false |
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
#!/bin/bash | |
inround=false | |
exec 5<>/dev/tcp/35.231.207.196/15830 | |
while true; do | |
if $inround; then | |
awk 'BEGIN {coords=""} /B|^$/ { | |
if(NF == 0) | |
exit | |
for(i=2;i<=NF;i++) { |