Script icon
Docker icon
If icon
SlackIncomingWebhook icon
Log icon
Return icon
Schedule icon

GlusterFS Replicated Volume Split-Brain and Brick Offline Sentinel

Monitors GlusterFS clustered storage volume health to prevent split-brain entries, offline brick stalls, and distributed file corruption.

Categories
DataInfrastructure

Audits GlusterFS clustered storage volume health across enterprise storage pools to detect split-brain file entries, offline storage bricks, and self-heal daemon backlog accumulation.

How it works

  1. A schedule trigger executes the storage audit workflow every 15 minutes.
  2. The Python task queries the GlusterFS Prometheus exporter endpoint (glusterfs-exporter:9228).
  3. The script extracts active split-brain file counters, brick online/offline states, and pending self-heal backlog queues.
  4. An evaluation gate determines whether split-brain entries or offline brick counts exceed zero-tolerance safety ceilings.
  5. When thresholds are breached, a high-priority Slack alert is dispatched to storage reliability engineers.
  6. When all bricks report online and zero split-brain entries exist, nominal telemetry is logged.
  7. A structured JSON audit manifest is emitted for storage platform governance and data durability archives.

Architecture diagram

graph TD
    Trigger[Schedule Trigger: 15m] --> ScanMetrics[Python Script: Scrape GlusterFS Exporter Metrics]
    ScanMetrics --> EvalBreach{Split-Brain >= Threshold OR Offline Bricks > 0?}
    EvalBreach -- Yes --> SlackAlert[Slack: High-Urgency Storage Alert]
    EvalBreach -- No --> LogNominal[Log: Nominal GlusterFS Health State]
    SlackAlert --> EmitManifest[Debug Return: GlusterFS Audit Manifest]
    LogNominal --> EmitManifest

Architecture components

  • Trigger: Automated schedule polling at 15-minute intervals.
  • Script Task: Scrapes GlusterFS Prometheus exporter metrics using Docker container isolation.
  • Decision Gate: Evaluates whether split-brain entries or offline bricks exceed operational thresholds.
  • Notification Task: Dispatches structured Slack alerts with volume name, split-brain count, and brick status.
  • Audit Manifest: Emits JSON execution payloads containing storage durability metrics and timestamps.

Key capabilities

  • Continuous surveillance of GlusterFS AFR (Automatic File Replication) volume quorum.
  • Rapid detection of network partition events causing split-brain write divergences.
  • Early identification of hardware disk failures and brick process crashes.
  • Zero external dependency execution via isolated containerized Python runners.

What you get

  • Preemptive alerting on clustered filesystem corruption before users encounter I/O read errors.
  • Automated detection of failing self-heal daemon background sync tasks.
  • Real-time audit manifests capturing storage health for enterprise disaster recovery logs.
  • Configurable tolerance thresholds adaptable to replica-2, replica-3, and arbiter volume layouts.

Who it's for

  • Storage SREs maintaining GlusterFS and Red Hat Gluster Storage clusters.
  • Platform engineers managing shared NFS/SMB file gateways backed by clustered storage.
  • DevOps engineers diagnosing intermittent Input/output error (EIO) on container shared volumes.
  • Database administrators using clustered persistent volumes for legacy file storage.

Why orchestrate this with Kestra

  • Deterministic Scheduling: Guarantees regular health audits without fragile local host crontabs.
  • Containerized Runners: Runs Python tasks inside isolated Docker containers without host package conflicts.
  • Condition Branching: Flowable If tasks route alerts and nominal logging cleanly without spaghetti code.
  • Enterprise Secret Safety: Securely injects Slack webhook credentials without plain-text exposure.

Use cases

  • Dual-Master File Mutation: Detects simultaneous write collisions occurring during temporary network splits.
  • Brick Process Crash: Alerts when underlying XFS filesystem corruption terminates a local brick process.
  • Self-Heal Crawler Backlog: Identifies thousands of pending heal files after a node reboot before disks saturate.
  • Storage Node Power Loss: Surfaces unmounted storage bricks and triggers automated runbooks.

Inputs

Name Type Default Description
glusterfs_metrics_url STRING http://glusterfs-exporter.storage.svc.cluster.local:9228 Base HTTP URL exposing GlusterFS Prometheus metrics.
volume_name STRING gv_shared_data_replica3 Target clustered volume name under surveillance.
max_split_brain_entries_threshold INT 1 Maximum allowable split-brain files before alerting.
lookback_minutes INT 15 Lookback evaluation window in minutes for error accumulation.
alert_on_split_brain BOOL true Toggle Slack alert dispatch upon detecting split-brain.

Expected outputs

  • {{ outputs.scan_glusterfs_volume_metrics.vars.split_brain_entries_count }}: Count of files currently trapped in split-brain state.
  • {{ outputs.scan_glusterfs_volume_metrics.vars.offline_bricks_count }}: Count of offline or unreachable storage bricks.
  • {{ outputs.scan_glusterfs_volume_metrics.vars.heal_backlog_files_count }}: Total files awaiting self-heal daemon synchronization.
  • {{ outputs.scan_glusterfs_volume_metrics.vars.total_bricks_monitored }}: Total count of monitored brick endpoints.
  • {{ outputs.scan_glusterfs_volume_metrics.vars.is_alerting }}: Boolean flag indicating whether split-brain thresholds were breached.
  • {{ outputs.emit_audit_manifest.value }}: Structured JSON audit manifest emitted for compliance archives.

Prerequisites

  • GlusterFS storage cluster deployed with glusterfs_exporter active on cluster nodes.
  • Exporter port 9228 reachable from the Kestra worker execution environment.
  • Docker daemon running on the Kestra host to execute containerized Python tasks.

Secrets

  • SLACK_WEBHOOK_URL: Incoming webhook URL for the target Storage SRE Slack alerting channel.

Quick start

  1. Ensure glusterfs_exporter is deployed and exposing metrics from gluster volume status.
  2. Configure the SLACK_WEBHOOK_URL secret in your Kestra namespace settings.
  3. Specify your production volume name in volume_name.
  4. Execute a manual test run via the Kestra UI to verify metric ingestion.
  5. Enable the periodic_glusterfs_audit trigger to establish automated continuous surveillance.

Common pitfalls and troubleshooting

  • Split-Brain Resolution CLI: Resolving split-brain requires running gluster volume heal <vol> split-brain latest-mtime.
  • Quota Daemon Interactions: Ensure GlusterFS quota limits do not block self-heal crawler allocations.
  • Arbiter Node Configuration: Replicated volumes without an arbiter or third replica are prone to split-brain during partitions.
  • Exporter CLI Sudo Privileges: Verify glusterfs_exporter service user has sudo permissions for gluster commands.

How to extend

  • Automated Self-Heal Trigger: Trigger an automated gluster volume heal <vol> execution task when offline bricks recover.
  • Snapshot Creation Sub-Flow: Chain a volume snapshot task before attempting manual split-brain file resolution.
  • PagerDuty Escalation: Escalate immediately to on-call storage administrators if split-brain count exceeds 5 files.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.