Just a quick bash script
SNAP=backup-zfs_2026-04-24_10:34:38
POOL=tank
zfs list -H -o name -r $POOL | while read ds; do
if zfs list -H -t snapshot ${ds}@${SNAP} >/dev/null 2>&1; then
echo "[DATASET] $ds"
zfs diff ${ds}@${SNAP}
fi
done
Welcome to my world
Just a quick bash script
SNAP=backup-zfs_2026-04-24_10:34:38
POOL=tank
zfs list -H -o name -r $POOL | while read ds; do
if zfs list -H -t snapshot ${ds}@${SNAP} >/dev/null 2>&1; then
echo "[DATASET] $ds"
zfs diff ${ds}@${SNAP}
fi
done
A working version to block intruderce into warpgate
compose.yml
services:
warpgate:
container_name: warpgate
image: ghcr.io/warp-tech/warpgate
ports:
- 2222:2222
- 127.0.0.1:8888:8888
volumes:
- ./data:/data:Z
- ./sockets:/var/run
stdin_open: true
tty: true
restart: always
environment:
- WARPGATE__WEB__TRUST_PROXY_HEADERS=true
logging:
driver: json-file
options:
max-size: "50m"
max-file: "3"
vector:
image: timberio/vector:latest-alpine
container_name: vector
restart: unless-stopped
depends_on:
- warpgate
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./vector.yaml:/etc/vector/vector.yaml:ro
- /var/log/warpgate:/var/log/warpgate
command: ["--config", "/etc/vector/vector.yaml"]
vector.yaml
sources:
warpgate:
type: docker_logs
include_containers:
- warpgate
transforms:
to_fail2ban:
type: remap
inputs:
- warpgate
source: |
raw = string!(.message)
# ANSI Escape Codes entfernen (falls vorhanden)
msg = replace(raw, r'\x1b\[[0-9;]*m', "")
# --- 1) HTTP Login failed (401) ---
is_http_fail =
contains(msg, "WARN HTTP:") &&
contains(msg, "/@warpgate/api/auth/login") &&
contains(msg, "status=401") &&
contains(msg, "client_ip")
# --- 2) SSH Auth failed (Credentials/User/Password) ---
# Beispiel von dir:
# "ERROR SSH: Failed to verify credentials ... client_ip=::ffff:222.138.251.223"
is_ssh_fail =
contains(msg, "ERROR SSH:") &&
contains(msg, "Failed to verify credentials") &&
contains(msg, "client_ip")
if !(is_http_fail || is_ssh_fail) {
abort
}
# Zeitstempel robust
ts = format_timestamp!(now(), "%Y-%m-%dT%H:%M:%SZ")
# IP extrahieren
parsed = parse_regex!(msg, r'client_ip\s*=\s*(?P[0-9a-fA-F\.:]+)')
ip = parsed.ip
# IPv4-mapped IPv6 (::ffff:1.2.3.4) normalisieren -> 1.2.3.4
ip = replace(ip, r'^::ffff:', "")
# Ausgabezeile für fail2ban (einheitlich)
if is_http_fail {
.message = ts + " warpgate login failed (http) ip=" + ip
} else {
.message = ts + " warpgate login failed (ssh) ip=" + ip
}
sinks:
fail2ban_file:
type: file
inputs:
- to_fail2ban
path: "/var/log/warpgate/auth.log"
encoding:
codec: text
/etc/fail2ban/filter.d/warpgate.conf
[Definition] datepattern = ^%%Y-%%m-%%dT%%H:%%M:%%SZ failregex = ^.*warpgate login failed.* ip=\s*$ ignoreregex =
/etc/fail2ban/jail.d/warpgate.conf
[warpgate] enabled = true filter = warpgate logpath = /var/log/warpgate/auth.log maxretry = 5 findtime = 300 bantime = 900 banaction = iptables-docker-allports
/etc/fail2ban/action.d/iptables-docker-allports.conf
[Definition] # IPv4 actionstart = iptables -N f2b-|| true iptables -C DOCKER-USER -j f2b- || iptables -I DOCKER-USER -j f2b- iptables -A f2b- -j RETURN actionstop = iptables -D DOCKER-USER -j f2b- || true iptables -F f2b- || true iptables -X f2b- || true actioncheck = iptables -n -L DOCKER-USER | grep -q f2b- actionban = iptables -I f2b- 1 -s -j DROP actionunban = iptables -D f2b- -s -j DROP # IPv6 actionstart += ip6tables -N f2b- || true ip6tables -C DOCKER-USER -j f2b- || ip6tables -I DOCKER-USER -j f2b- ip6tables -A f2b- -j RETURN actionstop += ip6tables -D DOCKER-USER -j f2b- || true ip6tables -F f2b- || true ip6tables -X f2b- || true actioncheck += ip6tables -n -L DOCKER-USER | grep -q f2b- actionban += ip6tables -I f2b- 1 -s -j DROP actionunban += ip6tables -D f2b- -s -j DROP
fail2ban-regex /var/log/warpgate/auth.log /etc/fail2ban/filter.d/warpgate.conf
systemctl restart fail2ban
fail2ban-client status warpgate
Schreiben (4K random write, 16 threads, 10 Sekunden)
rados bench -p10 write --no-cleanup --object-size=4096 --concurrent-ios=16
Lesen (4K random read, 16 threads)
rados bench -p10 rand --object-size=4096 --concurrent-ios=16
Schreib und Lese Test mit 4MB der default Größe für Ceph
rados bench -p10 write --no-cleanup --object-size 4194304 --concurrent-ios 16
benchmark
bash -lc '
set -euo pipefail
POOL="ceph-ds"
SIZE="10G"
RUNTIME="30"
IODEPTH="32"
NUMJOBS="4"
RWMIXREAD="70" # 70/30 read/write wie oft bei VM-Workloads
BS="4k"
IMG="fio-bench-$(hostname -s)-$(date +%Y%m%d-%H%M%S)"
DEV=""
cleanup() {
set +e
echo ""
echo "[CLEANUP] unmap + remove (falls vorhanden) ..."
if [ -n "${DEV:-}" ]; then
rbd unmap "$DEV" >/dev/null 2>&1 || true
else
# falls DEV nicht gesetzt wurde, versuchen wir es über showmapped
rbd showmapped 2>/dev/null | awk -v p="$POOL" -v i="$IMG" '"'"'$2==p && $3==i {print $5}'"'"' | while read -r d; do
[ -n "$d" ] && rbd unmap "$d" >/dev/null 2>&1 || true
done
fi
rbd rm "${POOL}/${IMG}" >/dev/null 2>&1 || true
echo "[CLEANUP] fertig."
}
trap cleanup EXIT INT TERM
echo "[1/4] Create RBD image: ${POOL}/${IMG} (${SIZE})"
rbd create "${POOL}/${IMG}" --size "${SIZE}"
echo "[2/4] Map RBD image"
DEV="$(rbd map "${POOL}/${IMG}")"
echo " -> mapped as: ${DEV}"
echo "[3/4] fio VM-like test (randrw ${BS}, iodepth=${IODEPTH}, numjobs=${NUMJOBS}, rwmixread=${RWMIXREAD}, runtime=${RUNTIME}s)"
fio --name="ceph-rbd-${IMG}" \
--filename="${DEV}" \
--direct=1 --ioengine=libaio \
--rw=randrw --rwmixread="${RWMIXREAD}" \
--bs="${BS}" --iodepth="${IODEPTH}" --numjobs="${NUMJOBS}" \
--runtime="${RUNTIME}" --time_based=1 \
--group_reporting --eta=never
echo "[4/4] Done. Cleanup will run automatically."
'
As a quick fix. no reboot needed. On all your cluster nodes
Open each hosts console and run
modprobe nf_conntrack echo nf_conntrack >> /etc/modules
A quicksolutiuon to this is to add MACs hmac-sha2-512,hmac-sha2-256
Host buggyhost.lan
User git
IdentityFile ~/.ssh/mykey
CheckHostIP no
MACs hmac-sha2-512,hmac-sha2-256
# ip link set dev <interface> down
ip link set dev eth0 down
# ip link set dev <interface> up
ip link set dev eth0 up
# /sbin/ifconfig <interface> up
# /sbin/ifconfig <interface> down
ceph osd crush add-bucket left rack
ceph osd crush add-bucket right rack
ceph osd crush move left root=default
ceph osd crush move right root=default
ceph osd crush move node-1 rack=right
ceph osd crush move node-2 rack=right
ceph osd crush move node-3 rack=right
ceph osd crush move node-4 rack=left
ceph osd crush move node-5 rack=left
ceph osd crush move node-6 rack=left
ceph osd tree
ceph osd crush move node-1 root=default
ceph osd crush move node-2 root=default
ceph osd crush move node-3 root=default
ceph osd crush move node-4 root=default
ceph osd crush move node-5 root=default
ceph osd crush move node-6 root=default
getent passwd | awk -F: '{ print $1 }' | sudo xargs -n1 crontab -l -u | grep -v '^#' | grep -v '^no crontab for'
journalctl --disk-usage
journalctl --vacuum-size=1G
--vacuum-size=BYTES Reduce disk usage below specified size
--vacuum-files=INT Leave only the specified number of journal files
--vacuum-time=TIME Remove journal files older than specified time
journcalctl --file /var/log/.../dsdsdsdsdsdsdsds.journal~
sudo journalctl -e
journalctl -e -u certbot.service
journalctl -xeu redis-server.service
journalctl --list-boots
journalctl -p err -b
journalctl -k -e
systemctl list-unit-files
systemctl --failed
# or
systemctl list-units --state=failed
journalctl -xb
Display a list of messages:
ceph crash ls
read a message:
ceph crash info <id>
mark message as read
ceph crash archive <id>
or mark all as read
ceph crash archive-all