Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am having some problems setting a virtual IP and Linux (Ubuntu) cluster and I am hoping someone can help. This is the first node cluster I've tried to setup and I am not finding many resources in regards to this issue.

I am going through this guide to setup DRBD/Virtual IP on Ubuntu: https://wiki.edubuntu.org/ClusterStack/Natty#HA_Virtual_IP_Address

But I am having some major problems setting up the virtual IP. I've setup DRBD and it syncs and loads without any problems. But when I try to add the Virtual IP I get the following error message

pengine: [843]: info: native_color: Resource virtual_ip cannot run anywhere

Here is my CRM config:

node EOA-MAIL-IB-1
node EOA-MAIL-IB-2
primitive drbd_eoa ocf:linbit:drbd \
    params drbd_resource="eoa-ib" \
    op monitor interval="15s"
primitive fs_drbd ocf:heartbeat:Filesystem \
    params device="/dev/drbd0" directory="/mnt" fstype="ext4" \
    meta target-role="Stopped"
primitive virtual_ip ocf:heartbeat:IPaddr2 \
    params ip="192.168.1.254" nic="eth1" \
    op monitor interval="30s"
group res_group fs_drbd virtual_ip
ms ms_drbd drbd_eoa \
    meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1$
colocation mnt_on_master inf: res_group ms_drbd:Master
order mount_after_drbd inf: ms_drbd:promote res_group:start
property $id="cib-bootstrap-options" \
    dc-version="1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd" \
    cluster-infrastructure="openais" \
    expected-quorum-votes="2" \
    stonith-enabled="false" \
    no-quorum-policy="ignore" \
    last-lrm-refresh="1336683121"

Here is the output of "crm resource list":

Master/Slave Set: ms_drbd
 Masters: [ EOA-MAIL-IB-1 ]
 Slaves: [ EOA-MAIL-IB-2 ]
Resource Group: res_group
 fs_drbd    (ocf::heartbeat:Filesystem) Stopped
 virtual_ip (ocf::heartbeat:IPaddr2) Stopped

I have two NICS installed on both servers.

Any help would be greatly appreciated.

Thanks!

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Turns out there was a configuration issue with the CRM config file, go figure. :)

Below is the updated/correct config file for anyone else encountering this type of issue:

node EOA-MAIL-IB-1
node EOA-MAIL-IB-2
primitive drbd_eoa ocf:linbit:drbd \
    params drbd_resource="eoa-ib" \
    op monitor interval="120s" \
op start interval="0" timeout="240s" \
op stop interval="0" timeout="100s"

primitive fs_drbd ocf:heartbeat:Filesystem \
    params device="/dev/drbd0" directory="/mnt/eoacluster" fstype="ext4" \
    op start interval="0" timeout="60s" \
op stop interval="0" timeout="60s"

primitive mysql_eoa ocf:heartbeat:mysql \
    params config="/etc/mysql/my.cnf" datadir="/mnt/eoacluster/mysql" \
binary="/usr/bin/mysqld_safe" pid="/var/run/mysql/mysql.pid" \
socket="/var/run/mysql/mysql.sock" log="/var/log/mysql/mysql.log" \
additional_parameters="--bind-address=192.168.1.254" \
    op start interval="0" timeout="120s" \
    op stop interval="0" timeout="120s" \
    op monitor interval="15s" user="mysql" group="mysql"

primitive virtual_ip ocf:heartbeat:IPaddr2 \
    params ip="192.168.1.254" nic="eth1" \
    op monitor interval="10s" \
meta is-managed="true"

group res_group virtual_ip fs_drbd mysql_eoa \
meta target-role="Started"

ms ms_drbd drbd_eoa \
    meta master-max="1" master-node-max="1" \
clone-max="2" clone-node-max="1" notify="true" \
target-role="Started"

location master-prefer-EOA-MAIL-IB-1 virtual_ip 25: EOA-MAIL-IB-1

colocation res_group_on_drbd_eoa inf: res_group ms_drbd:Master

order res_group_after_ms_drbd inf: ms_drbd:promote res_group:start

property $id="cib-bootstrap-options" \
    dc-version="1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd" \
    cluster-infrastructure="openais" \
    expected-quorum-votes="2" \
    stonith-enabled="false" \
    no-quorum-policy="ignore" \
    last-lrm-refresh="1336683121"
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.