[Linux-HA] Re: Steps to create a 3 node cluster.
Stephen Souness
sounie at hotmail.com
Mon Nov 6 13:52:27 MST 2006
Serge Dubrouski wrote:
> On 11/6/06, Mc Linux <mrmclinux at gmail.com> wrote:
>> Hi!
>>
>> Now I know that I have to use cib.xml to configure a three node cluster.
>>
>> I migrated my old-style haresources file with haresources2cib.py...
>>
>> But how can I add thing like this:
>>
>> <rsc_location id="location_named" rsc="named_id">
>> <rule id="prefered_location_named" score="100">
>> <expression attribute="#uname" operation="eq"
>> value="pluto"/>
>> </rule>
>> <rule id="prefered_location_named" score="-INFINITY">
>> <expression attribute="#uname" operation="eq"
>> value="mars"/>
>> </rule>
>> </rsc_location>
>>
>> Becouse if I edit the cib.xml by hand and after I start the cluster it
>> will overwrite it...
>
> It wouldn't if you didn't make mistakes in your XML. Always use
> crm_verify after such updates. But you can use GUI or cibadmin tools
> to make changes in cib.xml.
I think that a perfectly valid addition to cib.xml could be overwritten
or ignored by heartbeat - as the md5 checksum of the cib.xml file will
no longer match with the information that has previously been stored in
cib.xml.sig
If you want to edit that file by hand, then one ugly way of going about
it is to stop all nodes in the cluster, choose one node to apply the
changes to, remove the cib.xml.sig file on that node before restarting
it and remove cib.xml, cib.xml.sig (and maybe cib.xml.last) from all
other nodes in the cluster. Then restart the node that has the changes
first (so it should become the Cluster Resource Manager), followed by
the other nodes which should request the cib.xml from the Cluster
Resource Manager.
As the others said, the cleaner way of updating the cib.xml is by using
the cibadmin command.
--
Stephen
More information about the Linux-HA
mailing list