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
#!/usr/bin/env python | |
''' | |
Simple Python script which endlessly keeps writing 100MB to a temp file. | |
Used to demonstrate a Ceph cluster. This script runs inside a Virtual Machine (KVM) | |
running on a RBD image on a Ceph cluster. | |
The demo is to randomly pull out machines and show that the script can still write | |
and read data. |
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
#!/usr/bin/env python | |
''' | |
This script writes X MegaByte random data to 10 RADOS objects and read the data again afterwards | |
It writes these statistics towards a Graphite server so you can see what the latency | |
inside your cluster is for both Read and Write | |
Author: Wido den Hollander <[email protected]> | |
''' |
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 | |
# Generates a CRUSH location based on the machine's hostname. | |
# This Gist was written for a customer who has mixed SSDs and HDDs in a a chassis. | |
# Hostname example in this case: dc2-rk01-ceph01 (Datacenter 2, rack 01, Ceph machine 01) | |
# It checks if the backing disk is a SSD or not and then comes up with the CRUSH location | |
while :; do | |
case $1 in | |
--cluster) |
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
# udev rule to set disk schedulers for Ceph | |
# For spinning disks we want the CFQ scheduler so that we can set | |
# priorities on client and recovery I/O threads | |
# | |
# Author: Wido den Hollander <[email protected]> | |
# Date: July 2015 | |
# Use deadline for SSDs | |
ACTION=="add|change", KERNEL=="sd[a-z]*", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="deadline" |
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
#!/usr/bin/env python | |
''' | |
Script to send Zabbix Agent active data to the Zabbix Server. | |
It runs the ceph command locally to get information from the running | |
OSDs and send the aggegrated data back to Zabbix. | |
''' | |
import sys | |
import subprocess |
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 | |
# | |
# Script for updating a running Ceph Hammer cluster to Jewel | |
# | |
# This has to be run on the OSD node(s) as root | |
# | |
# Written for and tested on CentOS 7 | |
# | |
# Used to upgrade Ceph at ODC-Noord in the Netherlands | |
# |
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
#!/usr/bin/env python | |
""" | |
Python script to multi-threaded copy a RBD image from one cluster to another | |
This script requires a configuration file and a RBD image to copy. | |
It will copy the RBD image from the source pool to destination pool as | |
specified in the configuration file. | |
It assumes the destination image already exists and is at least the size of the |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Protocol</key> | |
<string>s3</string> | |
<key>Vendor</key> | |
<string>NodeFabric</string> | |
<key>Scheme</key> | |
<string>http</string> |
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 | |
# Copyright (C) 2013, OpenNode LLC. All rights reserved. | |
# Email: [email protected] | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 2 | |
# of the License, or (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
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 | |
# Copyright (C) 2013, OpenNode LLC. All rights reserved. | |
# Email: [email protected] | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 2 | |
# of the License, or (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
NewerOlder