<div>Hi all,</div>
<div> </div>
<div>I think there is something to clarify about using CLVM across a cluster in a active/passive mode without GFS.</div>
<div> </div>
<div>From my understanding, CLVM keeps LVM metadata coherent among the cluster nodes and provides a cluster wide locking mechanism that can prevent any node from trying to activate a volume group if it has been activated exclusively (vgchange -a e VGXXX)  by another node (which needs to be up).</div>

<div> </div>
<div>I have been playing with it to check this behaviour but it doesn't seem to make what is expected.</div>
<div> </div>
<div>I have 2 nodes (RHEL 5.3 X86_64, cluster installed and configured) , A and B using a SAN shared storage.</div>
<div> </div>
<div>I  have a LUN from this SAN seen by both nodes, pvcreate'd /dev/mpath/mpath0 , vgcreate'd vg10 and lvcreate'd lvol1 (on one node), created an ext3 FS on /dev/vg10/lvol1</div>
<div> </div>
<div>CLVM is running in debug mode (clvmd -d2 ) (but it complains about locking disabled though locking set to 3 on both nodes)</div>
<div> </div>
<div>On node A:</div>
<div> </div>
<div>          vgchange -c y vg10 returns OK (vgs -->  vg10     1   1   0 wz--nc)</div>
<div> </div>
<div>          vgchange -a e --> OK </div>
<div> </div>
<div>          lvs returns lvol1   vg10   -wi-a-</div>
<div> </div>
<div>On node B (while things are active on A, A is UP and member of the cluster ):</div>
<div> </div>
<div>          vgchange -a e --> Error locking on node B: Volume is busy on another node<br>                                   1 logical volume(s) in volume group "vg10" now active<br> </div>
<div>
<div>It activates vg10 even if it sees it busy on another node .</div>
<div> </div></div>
<div>on B, lvs returns lvol1   vg10   -wi-a-</div>
<div> </div>
<div>as well as on A.</div>
<div> </div>
<div>I think the main problem comes from the fact that, as it is said when starting CLVM in debug mode,  WARNING: Locking disabled. Be careful! This could corrupt your metadata.</div>
<div> </div>
<div>IMHO, the algorithm should be as follows:</div>
<div> </div>
<div>VG is tagged as clustered (vgchange -c y VGXXX)</div>
<div> </div>
<div>if a node (node P) tries to activate the VG exclusively (vgchange -a VGXXX)</div>
<div> </div>
<div>ask the lock manager to check if VG is not already locked by another node (node X)</div>
<div> </div>
<div>if so, check if node X is up</div>
<div> </div>
<div>if node X is down, return OK to node P</div>
<div> </div>
<div>else </div>
<div> </div>
<div>return NOK to node P (explicitely that VG is held exclusively by node X)</div>
<div> </div>
<div>Brem</div>
<div> </div>
<div>PS: this shouldn't be a problem with GFS or other clustered FS (OCFS, etc...) as no node should try to activate exclusively any VG.</div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>