dmevent can not open shared object file libdevmapper-event-lvm2snapshot.so leads to lvcreate/lvremove being slow

Bug #1561228 reported by Mikhail S Medvedev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lvm2 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

1) lsb_release -rd
Description: Ubuntu Xenial Xerus (development branch)
Release: 16.04

2) apt-cache policy lvm2
lvm2:
  Installed: 2.02.133-1ubuntu7
  Candidate: 2.02.133-1ubuntu7
  Version table:
 *** 2.02.133-1ubuntu7 500
        500 http://ports.ubuntu.com/ubuntu-ports xenial/main ppc64el Packages
        100 /var/lib/dpkg/status

3) Expected lvcreate/lvremove test to take less than a second
4) It took about 30 seconds instead

To reproduce
============

Use the script.

  export GROUP='group-test'
  export VOLUME='volume-test'
  export SNAPSHOT='_snapshot-test'
  export BACKING_FILE=/root/lvmbacking

  if ! vgs -o name | grep $GROUP; then
    dd if=/dev/zero of=$BACKING_FILE bs=1M count=2000
    losetup /dev/loop100 $BACKING_FILE
    pvcreate /dev/loop100
    vgcreate $GROUP /dev/loop100
  fi

  lvcreate -n $VOLUME $GROUP -L 1g
  lvcreate --name $SNAPSHOT --snapshot $GROUP/$VOLUME -L 1.00g
  lvremove -f $GROUP/$SNAPSHOT
  time lvremove -f $GROUP/$VOLUME

During lvcreate/lvremove, /var/log/syslog would show:
Mar 23 15:39:59 xenial-server-2016-01-18-ppc64el dmeventd[2753]: dmeventd libdevmapper-event-lvm2snapshot.so dlopen failed: libdevmapper-event-lvm2snapshot.so: cannot open shared object file: No such file or directory.

Workaround
==========

In /etc/lvm/lvm.conf, change snapshot_library to use absolute path:

  snapshot_library = "/lib/powerpc64le-linux-gnu/device-mapper/libdevmapper-event-lvm2snapshot.so"

The workaround is obviously would only work for the specific architecture. A
proper fix would be to find out why dmevent can not load the library, and fix
that.

Additional Notes
================

I have also tested this on Xenial x86 VM, and on baremetal install of Xenial.
Had the same problem on both.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lvm2 - 2.02.133-1ubuntu10

---------------
lvm2 (2.02.133-1ubuntu10) xenial; urgency=medium

  * Cherry-pick change from lvm2 2.02.133-2 in Debian to move event plugins
    back onto the main library patch, which fixes problems with monitoring
    failing for snapshots and raid volumes. Closes: #807279, LP: #1556451,
    LP: #1561228.

 -- Steve Langasek <email address hidden> Sat, 16 Apr 2016 00:06:53 -0700

Changed in lvm2 (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.