scripts/ceph/ceph-production.sh

24 lines
916 B
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/sh
# Configure Ceph for production
## eg. define the best parameters for our cluster
## eg. to ensure it's still usable during a recovery,…
printf '%b\n' "Ensure to unset some unwanted maintenance parameters (noscrub, norebalance,…)."
sudo ceph osd unset noout
sudo ceph osd unset noscrub
sudo ceph osd unset nodeep-scrub
sudo ceph osd unset norebalance
# Set OSDs configuration for production
## See the documentation for more informations:
## http://docs.ceph.com/docs/luminous/rados/configuration/osd-config-ref/#operations
sudo ceph tell osd.* injectargs '--osd-client-op-priority 63';
sudo ceph tell osd.* injectargs '--osd-max-backfills 1';
sudo ceph tell osd.* injectargs '--osd-recovery-max-active 1';
sudo ceph tell osd.* injectargs '--osd-recovery-op-priority 3';
sudo ceph tell osd.* injectargs '--osd-recovery-sleep-hdd=0.1';
printf '%b\n' "OSDs args are setted for production."
exit 0