Skip to content

Instantly share code, notes, and snippets.

View 57-Wolve's full-sized avatar

57_Wolve 57-Wolve

  • 14:46 (UTC -05:00)
View GitHub Profile
@57-Wolve
57-Wolve / ceph_deep_scrub.php
Created November 22, 2024 18:18 — forked from ethaniel/ceph_deep_scrub.php
This script controls Ceph deep scrubs, making sure that each OSD is busy with a deep scrub.
<?php
/*
Script to always have 1 deep scrub running per OSD.
## About
1. Helps with the following error: PG_NOT_DEEP_SCRUBBED HEALTH_WARN (N pgs not deep-scrubbed in time)
2. Doesn't run scrubbing on PGs that were deep scrubbed less than 2 weeks ago, releasing
@57-Wolve
57-Wolve / docker-cleanup
Created January 11, 2017 05:17 — forked from wdullaer/docker-cleanup
Cleanup unused Docker images and containers
#!/bin/sh
# Cleanup docker files: untagged containers and images.
#
# Use `docker-cleanup -n` for a dry run to see what would be deleted.
untagged_containers() {
# Print containers using untagged images: $1 is used with awk's print: 0=line, 1=column 1.
# NOTE: "[0-9a-f]{12}" does not work with GNU Awk 3.1.7 (RHEL6).
# Ref: https://github.com/blueyed/dotfiles/commit/a14f0b4b#commitcomment-6736470
docker ps -a | tail -n +2 | awk '$2 ~ "^[0-9a-f]+$" {print $'$1'}'