Phase 7h: nightly cluster-gc systemd timer #80

Merged
osobh merged 1 commits from phase-7h-gc-timer into main 2026-07-14 19:40:37 +00:00
3 changed files with 33 additions and 0 deletions
+1
View File
@@ -9,6 +9,7 @@ Systemd **user** units for clawstor.
| `clawstor-cluster.service` | daemon (gossip + RPC + Prometheus + build cache). Not shipped here — deployed per-node from the fleet playbook. | | `clawstor-cluster.service` | daemon (gossip + RPC + Prometheus + build cache). Not shipped here — deployed per-node from the fleet playbook. |
| `clawstor-fuse.service` | Phase 6 read-only FUSE mount at `~/clawstor-mount/`. Depends on `clawstor-cluster.service`. | | `clawstor-fuse.service` | Phase 6 read-only FUSE mount at `~/clawstor-mount/`. Depends on `clawstor-cluster.service`. |
| `clawstor-scrub.service` + `clawstor-scrub.timer` | Weekly (Sun 04:00) BLAKE3 verify every chunk against its manifest. Non-zero exit = integrity failure — surfaced by systemd status. | | `clawstor-scrub.service` + `clawstor-scrub.timer` | Weekly (Sun 04:00) BLAKE3 verify every chunk against its manifest. Non-zero exit = integrity failure — surfaced by systemd status. |
| `clawstor-gc.service` + `clawstor-gc.timer` | Nightly (03:30) orphan-chunk sweep. Override ExecStart via drop-in to add `--evict-to-gb N` for size-cap fleets. Sequenced before the Sunday scrub so scrub reads a fresh layout. |
## Install `clawstor-fuse.service` ## Install `clawstor-fuse.service`
+19
View File
@@ -0,0 +1,19 @@
[Unit]
Description=Clawstor nightly GC (orphan-chunk sweep + optional size-cap eviction)
Documentation=https://git.redclaw.dev/clawverse/clawstor
After=clawstor-cluster.service
[Service]
Type=oneshot
# Default: orphan-chunk sweep only (safe on any node).
# For a size-cap fleet, override with a drop-in:
# systemctl --user edit clawstor-gc.service
# [Service]
# ExecStart=
# ExecStart=%h/clawstor-deploy/claw-store --config %h/clawstor-deploy/config.toml cluster-gc --evict-to-gb 200
ExecStart=%h/clawstor-deploy/claw-store --config %h/clawstor-deploy/config.toml cluster-gc
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=default.target
+13
View File
@@ -0,0 +1,13 @@
[Unit]
Description=Nightly Clawstor GC
Documentation=https://git.redclaw.dev/clawverse/clawstor
[Timer]
# 03:30 local, every day. Slots ahead of the Sunday 04:00 scrub so
# scrub always sees a fresh (post-GC) blob layout.
OnCalendar=*-*-* 03:30:00
Persistent=true
Unit=clawstor-gc.service
[Install]
WantedBy=timers.target