Skip to content

Instantly share code, notes, and snippets.

View mnaser's full-sized avatar
☁️
building your next cloud ⚡️

Mohammed Naser mnaser

☁️
building your next cloud ⚡️
View GitHub Profile
@wido
wido / ceph-osd-compact.sh
Created March 11, 2020 20:04
Compact all Ceph OSDs on a host
#!/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
require 'sinatra'
# see http://www.sinatrarb.com/intro#Conditions
set(:action) { |value| condition { params[:Action] == value.to_s } }
get '/', :action => :xyz do
# ...
end