LinuxCommandLibrary

dmevent_tool

Monitor device-mapper events

SYNOPSIS

dmevent_tool [options] [EVENT_TYPE]...
dmevent_tool --query [options]
dmevent_tool --list-events

PARAMETERS

-f, --foreground
    Run the event monitoring process in the foreground, rather than detaching to the background.

-d, --debug
    Enable verbose debugging messages, useful for troubleshooting issues.

-p, --pidfile path
    Specify a file to write the process ID (PID) of the daemon to.

-i, --ignore device_uuid
    Ignore events originating from a specific Device Mapper device identified by its UUID.

-a, --all
    Monitor and process events of all available types. By default, specific event types must be listed.

-q, --query
    Query the kernel's Device Mapper event queue for any pending or past events, displaying them and then exiting.

-l, --list-events
    List all event types that dmevent_tool is capable of monitoring (e.g., 'thin', 'raid', 'mirror').

-j, --json
    Output event information in JSON format, facilitating programmatic parsing.

-o, --once
    Exit after processing and handling the first event received.

-v, --verbose
    Increase the verbosity of the output messages.

-h, --help
    Display a brief help message and exit.

-V, --version
    Display the version information of the dmevent_tool and exit.

EVENT_TYPE
    One or more specific event types to monitor, such as 'thin', 'raid', or 'mirror'. If not specified, and '--all' is not used, no events are monitored.

DESCRIPTION

The dmevent_tool is a utility that monitors and processes events from the Linux kernel's Device Mapper (DM) interface.

It allows system administrators and tools to react to various changes and states within DM devices, such as thin provisioning low watermarks, RAID array state changes, or mirror synchronization completion.

It can run as a daemon to continuously monitor events or be used to query the current state of events in the kernel's event queue. This tool is a fundamental component for managing complex storage setups built upon Device Mapper, often used internally by LVM (Logical Volume Manager) to automate responses to specific storage conditions.

CAVEATS

The dmevent_tool typically requires root privileges to operate due to its interaction with low-level kernel Device Mapper interfaces.

While it can display raw event data, interpreting this data often requires a deep understanding of Device Mapper internals and the specific target types (e.g., thin provisioning, RAID, mirror).

For most LVM users, this tool is managed automatically by LVM components like lvmpolld, and direct interaction is rarely necessary unless debugging complex storage issues.

EVENT TYPES

dmevent_tool can monitor various event types from Device Mapper targets.
Common examples include:
thin: Events related to thin provisioning, such as '_thin_low_water' (when a thin pool approaches its capacity limit) or '_thin_overflow'.
raid: Events from Device Mapper RAID targets, indicating changes in array state like degradation or recovery.
mirror: Events from Device Mapper mirror targets, often signaling completion of resynchronization.

INTEGRATION WITH LVM

In most LVM setups, dmevent_tool's capabilities are leveraged by the lvmpolld daemon, which is responsible for polling for and reacting to Device Mapper events. This allows LVM to manage thin pool auto-extension, monitor RAID volumes, and perform other automated tasks based on kernel events without manual intervention.

HISTORY

The dmevent_tool is an integral part of the lvm2 (Logical Volume Manager version 2) software suite. Its development has progressed alongside the evolution of the Linux kernel's Device Mapper framework, particularly with the introduction and maturation of advanced DM targets such as thin provisioning (since kernel 3.2) and DM RAID.

It was designed to provide a robust mechanism for LVM and other tools to react dynamically to changes in DM devices, allowing for automated responses to critical events like nearing capacity on thin pools or array degradation.

Its functionality has been crucial for implementing features like automatic thin pool extension and improved monitoring of complex DM setups.

SEE ALSO

dmsetup(8), lvm(8), lvmpolld(8), systemd(1)

Copied to clipboard