How to enable GlusterFS bitrot detection

Silent data corruption can reach a GlusterFS volume without an obvious disk error, leaving a file readable until an application depends on bad data. Enabling bitrot detection adds a checksum-backed integrity signal so corrupted objects can be flagged before operators treat the volume as clean.

Bitrot detection runs a bitd signer and a scrubber process for a volume, maintaining checksums and periodically verifying stored data against those signatures. Detected mismatches are marked as corrupted and reported in scrub status output, with details written to /var/log/glusterfs/bitd.log and /var/log/glusterfs/scrub.log.

Bitrot detection is enabled per volume and is disabled by default, which allows selective rollout across a cluster. Scrubbing consumes background CPU and I/O, so schedule the change for a low-traffic window on latency-sensitive storage. Detection identifies corruption but does not repair files automatically, so keep a recovery path ready for any object that appears in scrub reports.

Steps to enable GlusterFS bitrot detection:

  1. List GlusterFS volumes to confirm the target volume name.
    $ sudo gluster volume list
    volume1

    Replace volume1 with the volume to protect.

  2. Confirm the volume is started before enabling bitrot.
    $ sudo gluster volume info volume1
    Volume Name: volume1
    Type: Distribute
    Status: Started
    Number of Bricks: 1
    Brick1: storage1:/bricks/volume1/brick
    ##### snipped #####
  3. Enable bitrot detection for the volume.
    $ sudo gluster volume bitrot volume1 enable
    volume bitrot: success bitrot enabled for volume volume1

    Scrubbing adds background I/O and CPU load; enable during a maintenance window for latency-sensitive workloads.

  4. Verify that features.bitrot is enabled for the volume.
    $ sudo gluster volume get volume1 features.bitrot
    Option                                   Value
    ------                                   -----
    features.bitrot                          on
  5. Check the scrub status for the volume.
    $ sudo gluster volume bitrot volume1 scrub status
    Volume name : volume1
    
    State of scrub: Active (Idle)
    Scrub impact: lazy
    Scrub frequency: biweekly
    Bitrot error log location: /var/log/glusterfs/bitd.log
    Scrubber error log location: /var/log/glusterfs/scrub.log
    
    ##### snipped #####
    
    Error count: 0

    Scrub frequency and throttle depend on the GlusterFS release and cluster policy; tune defaults via the related scrub configuration page when needed.