Skip to content

Instantly share code, notes, and snippets.

View Cremator's full-sized avatar
🎯
Focusing

Georgi Chompalov Cremator

🎯
Focusing
View GitHub Profile
@Cremator
Cremator / ceph-mds-active.service
Created April 8, 2025 11:51
Use systemd unit to check for active MDS ceph cluster
[Unit]
Description=Check for active MDS
Requires=ceph.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/bash -c "until ceph fs status -f json | jq -e \'.mdsmap[0].state == \"active\"\'; do sleep 1s; done"
Restart=on-failure
@Cremator
Cremator / tuned.conf
Created February 5, 2025 11:20 — forked from likid0/tuned.conf
RHCS on All Flash Cluster : Performance Blog Series : tuned.conf profile for ceph nodes
cat /usr/lib/tuned/ceph-tuned/tuned.conf
[main]
summary=ceph_perf
[cpu]
governor=performance
energy_perf_bias=performance
min_perf_pct=100
force_latency=1
@Cremator
Cremator / compose.yaml
Last active January 13, 2025 15:37
example docker compose with traefik, themepark, homepage, jellyfin and radarr full integration, modified themepark container with lsio docker-mod to get also local version of dashboard-icons for use with homepage container
name: media
x-logging:
&default-logging
options:
max-size: '1m'
max-file: '50'
driver: json-file
x-environment:
@Cremator
Cremator / gist:016d3e6f5ee803311f5be33c0ba2d14d
Created August 14, 2024 10:47
xcp-ng pci device passthrough
#Check the ethernet adapters
lspci | grep -i Ethernet
#Hide those adapters
/opt/xensource/libexec/xen-cmdline --set-dom0 "xen-pciback.hide=(0000:06:00.0)(0000:06:00.1)(0000:06:00.2)(0000:06:00.3)(0000:0b:00.0)(0000:0b:00.1)(0000:81:00.0)(0000:81:00.1)(0000:81:00.2)(0000:81:00.3)"
reboot
lspci | grep -i Ethernet
xl pci-assignable-list
xe vm-param-set other-config:pci=0/0000:06:00.0,0/0000:06:00.1,0/0000:06:00.2,0/0000:06:00.3,0/0000:0b:00.0,0/0000:0b:00.1 uuid=763aafc8-8446-bce2-ce0d-8857bd1212bb
@Cremator
Cremator / bash_history_ol9_zfs
Created October 11, 2023 13:27
Oracle Linux 9 - EL9 ZFS with cockpit management
#Install Oracle Linux 9.2
# setenforce=permissive
vi /etc/selinux/config
#disable Oracle UEK repo and change default kernel to EL9
dnf repolist
dnf config-manager --disable ol9_UEKR7
grubby --info=ALL | grep ^kernel
grubby --set-default /boot/vmlinuz-5.14.0-284.30.1.el9_2.x86_64
@Cremator
Cremator / ffmpeg
Created September 14, 2022 09:00
Benchmark Intel QuickSync hevc to h264 transcode
ffmpeg -y -init_hw_device qsv=hw -filter_hw_device hw -hwaccel qsv -c:v hevc_qsv -i input_video.mkv -c:v h264_qsv -vf 'vpp_qsv=format=nv12' -c:a copy -f null -
@Cremator
Cremator / vyos-docker-install.script
Last active June 21, 2022 01:46
Install docker on VyOS 1.3 rolling
# Install docker req
echo "deb http://deb.debian.org/debian buster main contrib non-free" >> /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
# Add docker repo
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian buster stable"
sudo apt-get update
# Make persistent var for docker to live between vyos upgrades
sudo mkdir -p /config/user-data/docker