Bisogna installare CLVM e modificare l'/etc/lvm/lvm.conf per attivare il locking del cluster.

locking_library = "liblvm2clusterlock.so"
locking_type = 2
library_dir = "/lib/lvm2"

/etc/cluster/cluster.conf

<?xml version="1.0"?>
<cluster name="cluster1" config_version="4">
  <cman two_node="1" expected_votes="1"/>
  <clusternodes>
  <clusternode name="nfs2" votes="1">
  <fence>
  <method name="single">
  <device name="manual" ipaddr="nfs2.nfsnet"/>
  </method>
  </fence>
  </clusternode>
  <clusternode name="nfs1" votes="1">
  <fence>
  <method name="single">
  <device name="manual" ipaddr="nfs1.nfsnet"/>
  </method>
  </fence>
  </clusternode>
  </clusternodes>
  <fencedevices>
  <fencedevice name="manual" agent="fence_manual"/>
  </fencedevices>
  <rm>
    <failoverdomains/>
    <resources/>
  </rm>
</cluster>

Xen

usa w! per forzare l'accesso da + DomU

poi

modprobe cman dlm
/etc/init.d/ccs start (questo dovrebbe andare in init da solo)
/etc/init.d/cman start (questo solo se modprobe cman)
clvmd (questo solo se modprobe dlm)
fence_tool join -D

fence_ack_manual -n nfs1.nfsnet

per attivare il volume group
vgchange -a y

varie:
cman_tool join -c cluster1 -X -e 1
ccs_tool addfence --no_ccs manual fence_manual

pvcreate --metadatacopies 2 /dev/sda
 Physical volume "/dev/sda" successfully created
vgcreate --clustered y clvg01 /dev/sda
 Volume group "clvg01" successfully created
lvcreate --size 2T --name mylv clvg01
gfs_mkfs -j 8 -p lock_dlm -t cluster1:dsk1 /dev/mapper/clvg01-mylv