[Pacemaker] CLVM & Pacemaker & Corosync on Ubuntu Omeiric Server

Vadim Bulst vadim.bulst at bbz.uni-leipzig.de
Fri Dec 2 08:06:04 UTC 2011


Hi Ante,

yes , locking_type=3. But clvm needs a place for his socket (/var/run/lvm) . This directory is not 
generated automatically. I made a little add to my ra - clvm:

file: /usr/lib/ocf/resource.d/lvm2/clvmd

added: variable RUNDIR="/var/run/lvm"

in funcion bringup_daemon() i added:

if [ ! -d "$RUNDIR" ]; then
         mkdir /var/run/lvm
         sleep 1
     fi

Now it looks like this:

# OCF initialization
. ${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs

# Parameter defaults
: ${OCF_RESKEY_CRM_meta_gloablly_unique:="false"}
: ${OCF_RESKEY_daemon_timeout:="80"}
: ${OCF_RESKEY_daemon_options:="-d0"}

# Common variables
DAEMON="/usr/sbin/clvmd"

RUNDIR="/var/run/lvm"

status_daemon()
{
     PID=`pidof "$DAEMON"`
     if [ -n "$PID" ]; then
         return $OCF_SUCCESS
     fi
     return $OCF_NOT_RUNNING
}

bringup_daemon()
{
     if [ ! -d "$RUNDIR" ]; then
         mkdir /var/run/lvm
         sleep 1
     fi

     if [ ! -e "$DAEMON" ]; then
         ocf_log err "Required binary not found: $DAEMON"
         return $OCF_ERR_INSTALLED
     fi

     "$DAEMON" "$OCF_RESKEY_daemon_options"; rc=$?
     if [ $rc != 0 ]; then
         ocf_log err "Could not start $DAEMON"
         return $OCF_ERR_GENERIC
     fi

     sleep 1
     COUNT=0
     rc=$OCF_NOT_RUNNING

     while [ $rc = $OCF_NOT_RUNNING ]; do
         COUNT=`expr $COUNT + 1`
         if [ $COUNT -gt $OCF_RESKEY_daemon_timeout ]; then
             ocf_log err "`basename $DAEMON` did not come up"
             return $OCF_ERR_GENERIC
         fi
         status_daemon; rc=$?
         sleep 1
     done

     return $rc
}

Shell I make a bug report to Ubuntu ? How do I make that? I haven't any hint on the homepage.

Now I run into new problems:

I created a cloneset for managing the volume groups:

node bbzclnode04
node bbzclnode06
node bbzclnode07
primitive clvm ocf:lvm2:clvmd \
     params daemon_timeout="30" \
     meta target-role="Started"
primitive dlm ocf:pacemaker:controld \
     meta target-role="Started"
primitive vmspace ocf:heartbeat:LVM \
     params volgrpname="VMSPACE"
group dlm-clvm dlm clvm
clone dlm-clvm-clone dlm-clvm \
     meta interleave="true" ordered="true" target-role="Stopped"
clone vmspace-clone vmspace \
     meta interleave="true" ordered="true" target-role="Stopped"
colocation col_vmspace-clone_dlm-clvm-clone inf: vmspace-clone dlm-clvm-clone
order ord_vmspace_after_clvm-dlm-clone inf: dlm-clvm-clone vmspace-clone
property $id="cib-bootstrap-options" \
     dc-version="1.1.5-01e86afaaa6d4a8c4836f68df80ababd6ca3902f" \
     cluster-infrastructure="openais" \
     expected-quorum-votes="3" \
     no-quorum-policy="ignore" \
     stonith-enabled="false" \
     last-lrm-refresh="1322812253"


but the RA doesn't come up. The Informations of vgdisplay looks good:

--- Volume group ---
   VG Name               VMSPACE
   System ID
   Format                lvm2
   Metadata Areas        1
   Metadata Sequence No  26
   VG Access             read/write
   VG Status             resizable
   Clustered             yes
   Shared                no
   MAX LV                256
   Cur LV                9
   Open LV               0
   Max PV                256
   Cur PV                1
   Act PV                1
   VG Size               953,66 GiB
   PE Size               16,00 MiB
   Total PE              61034
   Alloc PE / Size       54646 / 853,84 GiB
   Free  PE / Size       6388 / 99,81 GiB
   VG UUID               IXEjO7-v3kk-7QMz-E0A3-tuei-HegB-78gJt0

The node files in /dev are not created. When I try to create them by hand with vgmknodes, they 
doensn't show up.

Any ideas?




Am 30.11.2011 17:27, schrieb Ante Karamatic:
> On 30.11.2011 13:10, Vadim Bulst wrote:
>
>> I created now the directory "/var/run/lvm" . It wasn't there - work for
>> the package maintainer.
> Hm... That directory is used for file based locking. clvmd shouldn't be
> using that. Did you set up cluster locking in /etc/lvm/lvm.conf
> (locking_type)?
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
>

-- 
Mit freundlichen Grüßen

Vadim Bulst
Systemadministrator BBZ

Biotechnologisch-Biomedizinisches Zentrum
Universität Leipzig
Deutscher Platz 5, 04103 Leipzig
Tel.: 0341 97 - 31 307
Fax : 0341 97 - 31 309





More information about the Pacemaker mailing list