How to monitor LVM with internal dmraid
This document (7017850) is provided subject to the disclaimer at the end of this document.
Environment
Situation
Monitoring is essential for automatic repair of dmraid enabled LV-mirrors.
e.g.
Creating a new LVM ( with dm-raid ):
sles12sp1-node1:~ # vgcreate MIRROR /dev/sdc /dev/sdd
Volume group "MIRROR" successfully created
sles12sp1-node1:~ # lvcreate -m1 -n lvo1 -l 100%VG MIRROR
Logical volume "lvo1" created.
sles12sp1-node1:~ # systemctl status lvm2-monitor
lvm2-monitor.service - Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling
Loaded: loaded (/usr/lib/systemd/system/lvm2-monitor.service; enabled)
Active: active (exited) since Fr 2016-07-15 14:46:30 CEST; 3min 10s ago
Docs: man:dmeventd(8)
man:lvcreate(8)
man:lvchange(8)
man:vgchange(8)
Process: 2510 ExecStop=/sbin/lvm vgchange --monitor n --ignoreskippedcluster (code=exited, status=0/SUCCESS)
Process: 2513 ExecStart=/sbin/lvm vgchange --monitor y --ignoreskippedcluster (code=exited, status=0/SUCCESS)
Main PID: 2513 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/lvm2-monitor.service
Jul 15 14:46:30 sles12sp1-node1 lvm[2513]: 1 logical volume(s) in volume group "md-raid" monitored
Jul 15 14:46:30 sles12sp1-node1 systemd[1]: Started Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling.
The newly created volume does not seem to be monitored.
Resolution
sles12sp1-node1:~ # dmevent_tool -mr
Device Name: MIRROR-lvo1
Registered DSO: libdevmapper-event-lvm2raid.so
UUID: LVM-cqN9ACOPGJxHCL8I4KIZDbUZRQvWRgTYHrUgzZW1uVhc0G560lkyp2mLkeROSjI7
Status: Active
Major Device #: 253
Minor Device #: 5
Read-only Device: No
Error Events: 1
Cause
which volumes are monitored, except volumes present at the start of the service.
Additional Information
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7017850
- Creation Date: 15-Jul-2016
- Modified Date:03-Mar-2020
-
- SUSE Linux Enterprise Server
- SUSE Linux Enterprise Server for SAP Applications
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com