Change in vdsm[ovirt-3.4]: lvm: Disable usage of lv_metad daemon

ybronhei at redhat.com ybronhei at redhat.com
Sun Apr 27 13:45:35 UTC 2014


Yaniv Bronhaim has submitted this change and it was merged.

Change subject: lvm: Disable usage of lv_metad daemon
......................................................................


lvm: Disable usage of lv_metad daemon

On current Fedora 19 and 20 lvm version, lvm uses the lvmetad daemon. In
this configuration, lvm commands do not go any more to the storage to
read meta data, but use meta data stored in the lvmetad daemon. This
causes two issues with vdsm:

- vg_mda_free return 0 when running lvs, causing a warning in vdsm.
- when creating a new lv, the lv is not seen on other machines in the
  cluster, failing running vms with the new disk.

This patch fixes the issue by disabling usage of lvmmetad in vdsm's
private lvm configuration. lvm commands run by vdsm read metadata from
storage, while lvm commands running from the shell use lvmetad if
configured.

Note that there is a warning in lvm.conf:

    If lvmetad has been running while use_lvmetad was 0, it MUST be
    stopped before changing use_lvmetad to 1 and started again
    afterwards.

We believe that disabling lvmetad for all access to vdsm volumes is safe
despite this warning, and lvm developer confirms that it is safe.

Note: accessing vdsm volumes manually using lvm requires disabling of
lvmmetad daemon. An admin may do this by modifying lvm.conf, or use the
--config command line argument:

    <lvm command> --config "global { use_lvmetad=0 }"

We considered integrating with lvmetad instead of disabling it. We can
update lvmetad cache using "pvscan --cache". Using lvmetad, accesing
meta data is cheap, and maybe we can drop the lvm caching code. This may
be the right long term solution when lvmmetad is used by default on all
supported platforms.

Change-Id: I909f03a2abada97e08cb9c645e357aa80ef9d788
Relates-to: http://lists.ovirt.org/pipermail/users/2014-March/022044.html
Bug-Url: https://bugzilla.redhat.com/1073054
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/25408
Reviewed-by: Allon Mureinik <amureini at redhat.com>
Reviewed-by: Federico Simoncelli <fsimonce at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/27102
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M vdsm/storage/lvm.py
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Nir Soffer: Verified
  Dan Kenigsberg: Looks good to me, approved



-- 
To view, visit http://gerrit.ovirt.org/27102
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I909f03a2abada97e08cb9c645e357aa80ef9d788
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org


More information about the vdsm-patches mailing list