scripts/ceph/ceph-production.sh

24 lines
916 B
Bash
Raw Normal View History

2019-07-19 14:51:31 +02:00
#!/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