[Linux-HA] Creating groups after the resources

Andrew Beekhof beekhof at gmail.com
Wed Jul 11 05:32:54 MDT 2007


On 7/11/07, Ciro Iriarte <cyruspy at gmail.com> wrote:
> > There is a nicer procedure: query, modify, replace. The deletion step
> > you mention would otherwise for sure cause the resources to be
> > restarted.
> >
> >
> > Regards,
> >     Lars
> >
>
> That sounds nice, how exactly should i create a new group "my_group"
> and add "resource_ip_10_129_4_236" and "fs_hadata" resources to it on
> the same step?

cibadmin -Ql > local.xml
vi local.xml
cibadmin -R -x local.xml


>
>
>
> Config:
>
>    <configuration>
>      <crm_config/>
>      <nodes>
>        <node id="34b56337-2402-4e2d-a66a-f0f0c2cee1b5"
> uname="asusis-ope1" type="normal">
>          <instance_attributes id="nodes-34b56337-2402-4e2d-a66a-f0f0c2cee1b5">
>            <attributes>
>              <nvpair id="standby-34b56337-2402-4e2d-a66a-f0f0c2cee1b5"
> name="standby" value="off"/>
>            </attributes>
>          </instance_attributes>
>        </node>
>        <node id="9b4731c8-163c-482a-93f4-084a5067a414"
> uname="asusis-ope2" type="normal"/>
>      </nodes>
>      <resources>
>        <primitive class="ocf" type="IPaddr2" provider="heartbeat"
> id="resource_ip_10_129_4_236" description="Alias principal a donde
> apuntan los usuarios para la interfaz web y los chequeos pasivos,
> traps, etc">
>          <instance_attributes id="resource_ip_10_129_4_236_instance_attrs">
>            <attributes>
>              <nvpair id="9fc324b3-85e5-416f-bb5f-d3b0075e26f1"
> name="ip" value="10.129.4.236"/>
>              <nvpair id="e5746557-2130-4286-862d-bcee1c08ad63"
> name="nic" value="eth0"/>
>              <nvpair id="5d11783f-72ce-4736-b62e-a51d5a4b9191"
> name="cidr_netmask" value="22"/>
>            </attributes>
>          </instance_attributes>
>        </primitive>
>        <master_slave id="ms-hadata0">
>          <meta_attributes id="ma-ms-hadata0">
>            <attributes>
>              <nvpair id="ma-ms-hadata0-1" name="clone_max" value="2"/>
>              <nvpair id="ma-ms-hadata0-2" name="clone_node_max" value="1"/>
>              <nvpair id="ma-ms-hadata0-3" name="master_max" value="1"/>
>              <nvpair id="ma-ms-hadata0-4" name="master_node_max" value="1"/>
>              <nvpair id="ma-ms-hadata0-5" name="notify" value="yes"/>
>              <nvpair id="ma-ms-hadata0-6" name="globally_unique" value="false"/>
>              <nvpair id="ma-ms-hadata0-7" name="target_role" value="#default"/>
>            </attributes>
>          </meta_attributes>
>          <primitive id="hadata0" class="ocf" provider="heartbeat" type="drbd">
>            <instance_attributes id="ia-hadata0">
>              <attributes>
>                <nvpair id="ia-hadata0-1" name="drbd_resource" value="hadata0"/>
>              </attributes>
>            </instance_attributes>
>          </primitive>
>        </master_slave>
>        <primitive class="ocf" provider="heartbeat" type="Filesystem"
> id="fs_hadata">
>          <meta_attributes id="ma-fs_hadata">
>            <attributes>
>              <nvpair name="target_role" id="ma-fs_hadata-1" value="#default"/>
>            </attributes>
>          </meta_attributes>
>          <instance_attributes id="ia-fs_hadata">
>            <attributes>
>              <nvpair id="ia-fs_hadata-1" name="fstype" value="reiserfs"/>
>              <nvpair id="ia-fs_hadata-2" name="directory" value="/hadata"/>
>              <nvpair id="ia-fs_hadata-3" name="device" value="/dev/drbd0"/>
>            </attributes>
>          </instance_attributes>
>        </primitive>
>      </resources>
>      <constraints>
>        <rsc_location id="cli-prefer-resource_ip_10_129_4_236"
> rsc="resource_ip_10_129_4_236">
>          <rule id="cli-prefer-rule-resource_ip_10_129_4_236" score="INFINITY">
>            <expression id="cli-prefer-expr-resource_ip_10_129_4_236"
> attribute="#uname" operation="eq" value="asusis-ope2" type="string"/>
>          </rule>
>        </rsc_location>
>        <rsc_location id="hadata0-placement-1" rsc="ms-hadata0">
>          <rule id="hadata0-rule-1" score="-INFINITY">
>            <expression id="exp-01" value="asusis-ope1"
> attribute="#uname" operation="eq"/>
>            <expression id="exp-02" value="asusis-ope2"
> attribute="#uname" operation="eq"/>
>          </rule>
>        </rsc_location>
>        <rsc_order id="hadata0-before-fs_hadata" from="fs_hadata"
> action="start" to="ms-hadata0" to_action="promote"/>
>        <rsc_colocation id="fs_hadata-on-hadata0" to="ms-hadata0"
> to_role="master" from="fs_hadata" score="infinity"/>
>      </constraints>
>    </configuration>
>
>
> Ciro
> _______________________________________________
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>


More information about the Linux-HA mailing list