LVM cluster resources should be cluster aware

This document (7012115) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise High Availability Extension 11 (HAE)
SUSE Linux Enterprise Server 11

Situation

An HAE Environment has one or more clustered LVM resources.

<primitive class="ocf" id="lvm-test" provider="lvm2" type="clvmd">
<primitive class="ocf" id="lvm-test-other" provider="heartbeat" type="LVM">

The /etc/lvm/lvm.conf shows:

global {
    umask = 077
    test = 0
    units = "h"
    activation = 1
    proc = "/proc"
    locking_type = 1
    fallback_to_clustered_locking = 1
    fallback_to_local_locking = 1
    locking_dir = "/var/lock/lvm"
}

Resolution

Change the locking_type to 3 to use built-in cluster-wide locking.

1. Edit /etc/lvm/lvm.conf
2. Change the locking_type value to 3.

locking_type = 3

3. Save and exit
4. Reboot the node

Cause


Additional Information

From the documentation on configuring cLVM.

Make sure you have fulfilled the following prerequisites:
  • A shared storage device is available, such as provided by a Fibre Channel, FCoE, SCSI, iSCSI SAN, or DRBD*.

  • In case of DRBD, both nodes must be primary (as described in the following procedure).

  • Check if the locking type of LVM2 is cluster-aware. The keyword locking_type in /etc/lvm/lvm.conf must contain the value 3 (should be the default). Copy the configuration to all nodes, if necessary.

From the lvm.conf(5) man page:

locking_type — What type of locking to use.  1 is the default, which use flocks on files in locking_dir (see below) to avoid conflicting LVM2 commands running concurrently  on  a single machine. 0 disables locking and risks corrupting your metadata.  If set to 2, the tools will load the external locking_library (see below).  If the tools were configured --with-cluster=internal (the default) then 3 means to use built-in cluster-wide  locking.   Type  4 enforces  read-only metadata  and  forbids any operations that might want to modify Volume Group metadata.  All changes to logical volumes and their states are communicated using locks.

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:7012115
  • Creation Date: 09-Apr-2013
  • Modified Date:14-Oct-2022
    • SUSE Linux Enterprise High Availability Extension
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center