dmevent_tool
Monitor device-mapper events
SYNOPSIS
dmevent_tool command [options]
PARAMETERS
add
Adds a new event monitor. Requires specifying the event target (e.g., logical volume name) and the event filter (e.g., 'table_load').
remove
Removes an existing event monitor, specified by its unique ID.
list
Lists all active event monitors, including their IDs, targets, and filters.
trigger
Manually triggers an event, useful for testing event monitor configurations.
--name
Specifies the name of the event target (e.g., the logical volume name).
--event
Specifies the type of event to monitor (e.g., 'table_load', 'deferred_remove').
--condition
Specifies a condition that must be met for the event to trigger. Often used with I/O thresholds.
--handler
Specifies the script or program to execute when the event is triggered.
--no_match_rules
Do not load rules configured in dmeventd.conf.
--configfile
Read config from the given file.
--help
Display help text and exit.
--version
Display version and exit.
DESCRIPTION
dmevent_tool is a command-line utility for monitoring and controlling device-mapper events. It allows users to trigger actions based on specific events occurring within device-mapper logical volumes (LVM). These events can include things like device activation, deactivation, table changes, and I/O thresholds being crossed.
The tool provides a way to create event monitors with custom filters, enabling scripts or programs to react automatically to changes in the storage environment. This is useful for tasks such as automating capacity management, triggering snapshots based on disk usage, or implementing custom failover mechanisms.
Essentially, dmevent_tool bridges the gap between low-level device-mapper events and higher-level management tools, empowering administrators to build responsive and dynamic storage management solutions.
CAVEATS
Requires device-mapper and dmeventd (the device-mapper event daemon) to be running. Event handling scripts should be carefully tested to avoid unintended consequences or performance bottlenecks.
EVENT TYPES
Common event types include 'table_load' (when a device-mapper table is loaded), 'table_unload' (when a table is unloaded), 'deferred_remove' (device pending removal), and I/O threshold-based events (when I/O statistics cross a defined boundary). Consult dmeventd documentation for a full list.
CONFIGURATION
The primary configuration file is normally located at /etc/lvm/dmeventd.conf. It provides global settings and can also be used to define rules that automatically create event monitors based on logical volume properties or other criteria.
HISTORY
dmevent_tool was developed as part of the Linux Logical Volume Manager (LVM) project to provide a mechanism for reacting to events within the device-mapper subsystem. It allows users to build automation and monitoring solutions around storage management. The command became more prevalent as LVM and related technologies were adopted in enterprise storage environments.