Created
March 11, 2020 20:04
-
-
Save wido/b0f0200bd1a2cbbe3307265c5cfb2771 to your computer and use it in GitHub Desktop.
Compact all Ceph OSDs on a host
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 | |
# | |
# Compact all OSDs on a host while they are stopped/offline | |
# | |
# Author: Wido den Hollander <[email protected]> | |
# | |
df|grep "/var/lib/ceph/osd"|awk '{print $6}'|cut -d '-' -f 2|sort -n|xargs -n 1 -P 10 -I OSD ceph-kvstore-tool bluestore-kv /var/lib/ceph/osd/ceph-OSD compact |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment