NAME
ocifbsd-gc —
ocifbsd garbage collection
daemon
SYNOPSIS
ocifbsd-gc |
[-fvh] |
DESCRIPTION
The ocifbsd-gc daemon performs periodic
garbage collection for the ocifbsd(8) OCI runtime. It scans container, image, volume, and
network state on disk and the host's network and ZFS configuration to
identify and remove resources that are orphaned, stopped past their
time-to-live, or no longer referenced.
Collection passes are scheduled on a configurable interval (see /etc/ocifbsd/ocifbsd.conf) and cover:
- Orphaned container jails (no owner record).
- Stopped containers older than the stopped-container TTL.
- Finished pods older than the container TTL.
- Unused OCI images older than the image TTL, or when image storage usage crosses the configured high/low watermarks.
- Pinned images are never collected.
- Orphaned volumes and released PersistentVolumeClaims.
- Orphaned and unused bridge networks.
- Dead-node resources in clustered deployments.
- Stale node registrations.
Deletions are delegated back to the main ocifbsd(8) binary via execvp(3) when a resource needs to be removed, so all cleanup honours the runtime's safety checks and audit logging.
The options are:
-f- Run in the foreground. The default is to daemonize via daemon(3).
-v- Enable verbose syslog output for every GC item considered.
-h- Print a short usage summary and exit.
The daemon handles SIGTERM,
SIGINT, and SIGHUP for
graceful shutdown.
FILES
- /var/run/ocifbsd
- Default state directory used for container, image, volume, and network metadata ( OCIFBSD_STATE_DIR in the source).
- /var/lib/ocifbsd/images
- Default image storage directory (“OCIFBSD_IMAGE_DIR”).
- /usr/sbin/ocifbsd
- Path to the main ocifbsd(8) binary invoked for delete operations (“OCIFBSD_BIN”).
- tank/ocifbsd
- Default ZFS dataset for container roots (“OCIFBSD_ZFS_POOL”).
- /etc/ocifbsd/ocifbsd.conf
- Runtime configuration (intervals, TTLs, watermarks).
SEE ALSO
HISTORY
The ocifbsd-gc command first appeared in
FreeBSD 16.0.
AUTHORS
The ocifbsd-gc utility was developed by
Klara, Inc. under sponsorship from