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

27 lines
672 B
Bash
Executable File

#!/bin/sh
set -e
if ! getent group buckit >/dev/null 2>&1; then
groupadd --system buckit
fi
if ! getent passwd buckit >/dev/null 2>&1; then
useradd --system \
--gid buckit \
--no-create-home \
--home-dir /var/lib/buckit \
--shell /sbin/nologin \
--comment "Buckit Object Storage" \
buckit
fi
if command -v systemctl >/dev/null 2>&1; then
systemctl daemon-reload >/dev/null 2>&1 || true
# Keep XFS retry-on-error disabled on the data drives. Safe to enable
# even before buckit.service is started: the unit is a no-op on hosts
# without XFS. Idempotent across upgrades.
systemctl enable --now buckit-xfs-retry.timer >/dev/null 2>&1 || true
fi
exit 0