<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hi!<br>
    </p>
    <div class="moz-forward-container">
      <pre>
In cluster environment, lvcreate/lvchange may fail to activate logical volumes sometimes.

For example:

# lvcreate -l100%VG -n lv001 clustermd
   Error locking on node a52cbcb: Volume group for uuid not found: SPxo6WiQhEJWDFyeul4gKYX2bNDVEsoXRNfU3fI5TI9Pd3OrIEuIm8jGtElDJzEy
   Failed to activate new LV.

The log file for this failure is attached. My thoughts on this issue follows, for example on two nodes:
n1:
===
#lvchange -ay vg/lv1
...
clvmd will ask for peer daemon on n2
to activate lv1 as well

n2:
===
lvm need to find lv1 and the PVs for lv1,
in device cache which aims to avoid frequent scan all
disks. But if the PV(s) might not be available
in device cache, it responses n1 with errors....

We found that 'clvmd -R' can be a workaround before activating LV, because 
what "clvmd -R" is to refresh device cache on every node as its commit message said:
===
commit 13583874fcbdf1e63239ff943247bf5a21c87862
Author: Patrick Caulfield <a class="moz-txt-link-rfc2396E" href="mailto:pcaulfie@redhat.com"><pcaulfie@redhat.com></a>
Date:   Wed Oct 4 08:22:16 2006 +0000

     Add -R switch to clvmd.
     This option will instruct all the clvmd daemons in the cluster to reload their device cache
==

I think the reason why clvm doesn't refresh device cache every time before activating LV,
is to avoid scanning all disks frequently.

But, I'm not sure if I understand this issue correctly, will appreciate much if someone can 
help.

Regards,
Eric
</pre>
    </div>
  </body>
</html>