drbdmon

package
v3.0.0-rc67 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package drbdmon watches the state changes of the drbd resources, and publishes them as pubsub events, for the instances holding a drbd resource to evaluate their status again.

A drbd resource changes state with no action of the node to tell: its peers connect once it is up, a resync ends when it ends, a peer taking its disk down leaves a connection lost. The status read at the end of an action, or on a peer event, sees the state of that moment, and whatever follows stays unseen until the next scheduled status. Guessing when to read it again does not work for a resync, whose length depends on how much data it moves.

It reads the event stream "drbdsetup events2" prints, which drbd 9 offers on every distribution the agent supports, down to el7, while the node holds a drbd resource: a node holding none has no drbd event to wait for (see package evwatch). Where the requirements are not met, the monitor disables itself and says so once, until no drbd resource is left: drbdsetup not installed, or an event stream the installed drbd does not support or keeps failing. A node where the drbd kernel module is not loaded yet waits for it, as the first drbd resource brought up loads it. Without the monitor, a drbd state change is seen at the next scheduled status.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager watches the drbd events and publishes a DrbdResourceUpdated message for each drbd resource of the local instances whose state changed.

func NewManager

func NewManager(drainDuration time.Duration, subQS pubsub.QueueSizer) *Manager

NewManager creates a new drbd monitor manager

func (*Manager) Start

func (t *Manager) Start(parent context.Context) error

Start starts the drbd monitor, which runs the event stream while the node holds a drbd resource.

func (*Manager) Stop

func (t *Manager) Stop() error

Stop stops the drbdmon manager

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL