Hide Forgot
+++ This bug was initially created as a clone of Bug #593096 +++ With lvm2-2.02.87-6.el6.i686: Starting monitoring for VG vgs---VolGroup00: vgchange---Volume group "vgs---VolGroup00" not found [FAILED] Steps to reproduce: 1) Update /etc/lvm/lvm.conf and set command_names=1, prefix="---" # lvs lvs---LV VG Attr LSize Origin Snap% Move Log Copy% Convert lvs---LogVol00 VolGroup00 -wi-ao 37,91G lvs---LogVol01 VolGroup00 -wi-ao 1,97G # pvs pvs---PV VG Fmt Attr PSize PFree pvs---/dev/vda2 VolGroup00 lvm2 a-- 39,88G 0 # vgs vgs---VG #PV #LV #SN Attr VSize VFree vgs---VolGroup00 1 2 0 wz--n- 39,88G 0 2) Reboot
Nice catch, thanks for the report!
Adding QA ack for 6.3. Devel will need to provide unit testing results however before this bug can be ultimately verified by QA.
(In reply to comment #3) > Devel will need to provide unit testing results however before this bug can be > ultimately verified by QA. Using log/command_names=1 and log/prefix="---" in lvm.conf. Before the patch: [root@node-a ~]# service lvm2-monitor start Starting monitoring for VG vgs---VolGroup: vgchange---Volume group "vgs---VolGroup" not found [FAILED] After the patch (https://www.redhat.com/archives/lvm-devel/2011-December/msg00009.html): [root@node-a ~]# service lvm2-monitor start Starting monitoring for VG VolGroup: vgchange---2 logical volume(s) in volume group "VolGroup" monitored [ OK ] [root@node-a ~]# service lvm2-monitor force-stop Stopping monitoring for VG VolGroup: vgchange---2 logical volume(s) in volume group "VolGroup" unmonitored [ OK ] (Note that the "vgchange" command name with the prefix is still visible - but I guess this is expected if configured in lvm.conf that way.)
"(Note that the "vgchange" command name with the prefix is still visible - but I guess this is expected if configured in lvm.conf that way.)" Why? Might as well fix that at the same time...
OK, patched as well (https://www.redhat.com/archives/lvm-devel/2011-December/msg00029.html): [root@node-a ~]# service lvm2-monitor start Starting monitoring for VG VolGroup: 2 logical volume(s) in volume group "VolGroup" monitored [ OK ] [root@node-a ~]# service lvm2-monitor force-stop Stopping monitoring for VG VolGroup: 2 logical volume(s) in volume group "VolGroup" unmonitored [ OK ]
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Using a prefix or using command names on LVM command output (the 'log/prefix' and 'log/command_names' lvm.conf setting) caused the lvm2-monitor init script to fail start monitoring for relevant VGs. The init script acquires the list of VGs first by calling the 'vgs' command and then it uses its output for further processing. However, if the prefix or command name is used on output, the VG name was not correctly formatted. To solve this, the lvm2-monitor init script overrides the log/prefix and log/command_names setting so the command's output is always suitable for use in the init script.
The commands have been tested and verified with lvm2-2.02.95-5.el6.x86_64 (08:10:31) [root@node01:~]$ vgs vgs---VG #PV #LV #SN Attr VSize VFree vgs---VolGroup 1 2 0 wz--n- 9.51g 0 vgs---volume1 4 2 0 wz--n- 38.11g 34.61g (08:10:27) [root@node01:~]$ lvs lvs---LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert lvs---lv_root VolGroup -wi-ao-- 8.52g lvs---lv_swap VolGroup -wi-ao-- 1008.00m lvs---mirror volume1 mwi-a-m- 1.50g mirror_mlog 100.00 lvs---stripe volume1 -wi-a--- 504.00m (08:09:51) [root@node01:~]$ service lvm2-monitor start Starting monitoring for VG VolGroup: 2 logical volume(s) in volume group "VolGroup" monitored [ OK ] Starting monitoring for VG volume1: 5 logical volume(s) in volume group "volume1" monitored [ OK ] Apr 27 08:08:20 node01 dmeventd[2086]: dmeventd ready for processing. Apr 27 08:08:20 node01 lvm[2086]: Monitoring mirror device volume1-mirror for events. Apr 27 08:09:42 node01 lvm[2086]: volume1-mirror is now in-sync. (08:11:41) [root@node01:~]$ service lvm2-monitor force-stop Stopping monitoring for VG VolGroup: 2 logical volume(s) in volume group "VolGroup" unmonitored [ OK ] Stopping monitoring for VG volume1: 5 logical volume(s) in volume group "volume1" unmonitored [ OK ] Apr 27 08:11:49 node01 lvm[2086]: No longer monitoring mirror device volume1-mirror for events.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2012-0962.html