install-linux.sh downloads a native package and registers a systemd
service, which is the wrong shape for deployments that run the server
binary directly -- a hand-run process, a non-systemd supervisor, or a
MinIO deployment being migrated in place.
Add a Linux counterpart to install-mac.sh that fetches only the binary:
resolve the current release from the gh-pages pointer, download the
matching asset, verify its SHA-256, chmod it, and leave ./buckit in the
working directory. It does not touch PATH and does not install a service.
The checksum is verified against both the release-host .sha256sum and the
digest published in the gh-pages pointer, and the two must agree. The
binary and its adjacent checksum share an origin, so that digest alone
only proves the transfer was not corrupted; the pointer is served from a
different origin and turns the check into something an attacker must
defeat in two places. A pinned BUCKIT_VERSION skips the cross-check,
since the pointer only ever describes the latest release.
Publish the script to gh-pages alongside the others, and advertise it in
the README and the generated release-notes install table.
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.
newParallelReader acquired a pooled stash buffer from globalBytePoolCap
and sliced it into per-shard views (bufs), but returned the struct with
`buf: make([][]byte, len(readers))` — discarding bufs. The pooled buffer
was reserved and recycled but never read into, while Read heap-allocated
each shard buffer lazily, adding ~1 MiB of fresh allocations per in-flight
GET decode on top of the reserved-but-unused 2 MiB pool buffer.
Wire the seeded bufs into buf so reads land in the pooled buffer. Entries
stay nil for the no-stash / oversized-legacy-block path, where Read's lazy
make remains the fallback. Correctness is unchanged; this removes the
allocation churn the byte pool was meant to avoid.
Fixes#11
Drop the move-to-PATH instruction; the verified binary stays in the download
directory and the script prints how to run it from there, matching
install-windows.ps1.