pfs maint
Run mover, prune, and index for a mount in a single job.lock session.
This command batches maintenance work to reduce disk wake-ups. It is the recommended way to schedule maintenance via systemd timers.
Execution order
- Move — run mover jobs (same as
pfs move).
- Prune — apply deferred mutations (same as
pfs prune). Skipped if the mover did no work.
- Index — re-index touched storages (same as
pfs index). Skipped if the mover did no work.
Usage
pfs maint <mount> [flags]
Flags
| Flag |
Default |
Description |
--job <name> |
all jobs |
Run only the named mover job. |
--force |
false |
Ignore mover trigger conditions. |
--limit <n> |
0 (no limit) |
Limit number of files moved. |
--index <mode> |
touch |
Index mode after move+prune (see below). |
--quiet |
false |
Suppress success output. |
Index modes
| Mode |
Behavior |
touch |
Re-index only indexed storages that were touched during the move phase. This is the default. |
all |
Re-index all indexed storages regardless of whether they were touched. |
off |
Skip the index phase entirely. |
Exit codes
| Code |
Meaning |
| 0 |
Maintenance completed with changes. |
| 3 |
No work done across all phases. |
| 75 |
Another maintenance job is already running (job.lock held). |
Examples
# Standard maintenance run
pfs maint media
# Force mover, run a specific job, limit to 10 files
pfs maint media --job archive --force --limit 10
# Re-index all indexed storages (not just touched ones)
pfs maint media --index=all
# Skip index phase
pfs maint media --index=off
# Silent mode
pfs maint media --quiet
systemd
pfs-maint@<mount>.service
pfs-maint@<mount>.timer