Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ACTIVE=$1
- INACTIVE=$2
- if [[ -z "$INACTIVE" ]]; then
- echo "missing parameter (time balancing / time sleeping)"
- exit
- fi
- clean_exit() {
- echo "Resetting max-backfills/recovery-max-active to 1"
- ./ceph tell osd.* injectargs "'--osd-max-backfills 1'" &>/dev/null
- # ./ceph tell osd.* injectargs "'--osd-recovery-max-active 1'" &>/dev/null
- echo "Ctrl-C if you want to skip scrub reactivation"
- read
- ./ceph osd unset noscrub
- ./ceph osd unset nodeep-scrub
- exit
- }
- trap clean_exit INT
- ./ceph osd set nodeep-scrub
- ./ceph osd set noscrub
- while `true`; do
- echo "Sleeping"
- ./ceph tell osd.* injectargs "'--osd-max-backfills 0'" &>/dev/null
- # ./ceph tell osd.* injectargs "'--osd-recovery-max-active 0'" &>/dev/null
- sleep $INACTIVE
- ./ceph -s
- echo "Backfilling/Recovering"
- ./ceph tell osd.* injectargs "'--osd-max-backfills 1'" &>/dev/null
- # ./ceph tell osd.* injectargs "'--osd-recovery-max-active 1'" &>/dev/null
- sleep $ACTIVE
- ./ceph -s
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement