Files
abuckit 735fabc2d8 packaging: disable XFS retry-on-error on Buckit data drives
Buckit handles XFS errors itself, so the kernel default (retry-on-error
forever) only adds latency. Ship a systemd timer that periodically sets
max_retries=0 for the EIO, ENOSPC, and default error classes on the block
devices backing MINIO_VOLUMES.

The values reset on every mount, so the timer (re-)applies them after boot
and after a restart-free drive hot-swap. The script reads MINIO_VOLUMES from
the running server's process environment, scopes writes to only the mounted
Buckit data drives (never the root fs or unrelated XFS volumes), and exits
cleanly when the server is down or no XFS is present. Genuine write failures
are logged and surface the unit as failed.

postinstall enables the timer (idempotent across upgrades); postremove
disables it only on full removal.
2026-06-23 23:51:30 -04:00

22 lines
704 B
Bash
Executable File

#!/bin/sh
set -e
if command -v systemctl >/dev/null 2>&1; then
# On full removal (rpm passes "0", dpkg passes "remove"/"purge"), stop
# and disable the XFS retry timer so it doesn't keep firing against a
# script that no longer exists. On upgrade, leave it running.
case "${1:-}" in
0 | remove | purge)
systemctl disable --now buckit-xfs-retry.timer >/dev/null 2>&1 || true
;;
esac
systemctl daemon-reload >/dev/null 2>&1 || true
fi
# Intentionally do NOT delete the buckit user/group on removal.
# It may own data on attached storage; orphaning files with a
# numeric UID is worse than leaving an unused system user.
# Operators who want full cleanup can `userdel buckit` manually.
exit 0