Bug 805425 - [RFE] Add dmeventd option to list currently monitored devices
[RFE] Add dmeventd option to list currently monitored devices
Status: NEW
Product: Fedora
Classification: Fedora
Component: lvm2 (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Petr Rockai
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-03-21 05:31 EDT by Peter Rajnoha
Modified: 2012-07-12 14:01 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Peter Rajnoha 2012-03-21 05:31:12 EDT
There's already a tool that lists currently monitored devices, the "dmevent_tool" that is a part of the "dmraid" package. So we should probably consider moving this functionality from dmraid to device-mapper-event.

It needs looking at a bit though since it doesn't show the correct information, e.g. for lvol0 as origin and it's snapshot lvol1:

The syslog says:
  Mar 21 10:18:12 devel lvm[14992]: Monitoring snapshot vg-lvol1

However, the dmevent_tool says:

[0] devel/~ # dmevent_tool -mr
[0] devel/~ # dmevent_tool -mu
vg-lvol1 not monitored
vg-lvol0 not monitored
vg-lvol0-real not monitored
vg-lvol1-cow not monitored

Monitoring and unmonitoring devices on demand would be fine as well (which is already supposed to be done by the dmevent_tool).

All this functionality would help with debugging dmeventd related problems then.
Comment 1 Alasdair Kergon 2012-07-11 08:47:21 EDT

dmeventd [-d [-d [-d]]] [-f] [-h] [-R] [-V] [-?]

   -d       Log debug messages to syslog (-d, -dd, -ddd)
   -f       Don't fork, run in the foreground
   -h -?    Show this help information
   -R       Restart dmeventd
   -V       Show version of dmeventd

dmevent_tool -[Vh?amru]

   -V      Show version of dmevent_tool

   -{h/?}  Show this help information

   -m[r|u] List all currently active device mapper devices
           and their current status with dmeventd
           for registered (-r)/unregistered (-m) devices
             Syntax: dmevent_tool -m[u|r]

   -a[r|u] Same as -m, but for devices with UUID only!
             Syntax: dmevent_tool -a[u|r]

   -r      Register a device with dmeventd
             Syntax: dmevent_tool -r <device name> <path to DSO library>
             Example: dmevent_tool -r isw_abcdeh_Volume0 libdmraid-events.so

   -u      Unregister a device with dmeventd
             Syntax: dmevent_tool -u <device name> [<path to DSO library>]
             Example: dmevent_tool -u isw_abcdefgh_Volume0
Comment 2 Alasdair Kergon 2012-07-11 08:50:05 EDT
The whole client library functionality should be exposed to the command line.
Comments in the header file suggest it's waiting for some review.

Note You need to log in before you can comment on or make changes to this bug.