On 5/23/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi Dejan,

Thanks for your help!

I've tried to add the monitor operation as you explained, but got the
following error:

1) cibadmin -Q -o resources > rsc.xml

s0580crmdb2pr1:~ # cat rsc.xml
 <resources>
   <group ordered="true" description="Grupo de recursos db2pr1"
restart_type="ignore" resource_stickiness="0" is_managed="default"
collocated="true" multiple_active="stop_start" id="group_db2pr1">
     <primitive id="IP_db2pr1" class="ocf" type="IPaddr"
provider="heartbeat" restart_type="ignore" is_managed="default"
resource_stickiness="0" description="IP utilizado pelo dbpr1"
multiple_active="stop_start">
       <instance_attributes id="IP_db2pr1_instance_attrs">
         <attributes>
           <nvpair id="eb355e01-1f73-4ce7-9d43-edf0f160d77d" name="ip"
value="10.226.13.12"/>
           <nvpair id="IP_db2pr1_target_role" name="target_role"
value="started"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_drbd0" class="heartbeat" type="drbddisk"
provider="heartbeat" restart_type="ignore" is_managed="default"
resource_stickiness="0" multiple_active="stop_start">
       <instance_attributes id="resource_drbd0_instance_attrs">
         <attributes>
           <nvpair id="resource_drbd0_target_role" name="target_role"
value="started"/>
           <nvpair id="add7aa21-a89a-40a1-ab34-6c626d336629" name="1"
value="rmpath0-part1"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_drbd1" class="heartbeat" type="drbddisk"
provider="heartbeat" restart_type="ignore" is_managed="default"
resource_stickiness="0" multiple_active="stop_start">
       <instance_attributes id="resource_drbd1_instance_attrs">
         <attributes>
           <nvpair id="resource_drbd1_target_role" name="target_role"
value="started"/>
           <nvpair id="59672e78-5be2-479b-aee9-e1ebee042022" name="1"
value="rmpath1-part1"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_drbd2" class="heartbeat" type="drbddisk"
provider="heartbeat" restart_type="ignore" is_managed="default"
resource_stickiness="0" multiple_active="stop_start">
       <instance_attributes id="resource_drbd2_instance_attrs">
         <attributes>
           <nvpair id="resource_drbd2_target_role" name="target_role"
value="started"/>
           <nvpair id="cf0e6792-e667-47f0-9dc4-784b6e8f98a7" name="1"
value="rmpath2-part1"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_drbd3" class="heartbeat" type="drbddisk"
provider="heartbeat" restart_type="ignore" is_managed="default"
resource_stickiness="0" multiple_active="stop_start">
       <instance_attributes id="resource_drbd3_instance_attrs">
         <attributes>
           <nvpair id="resource_drbd3_target_role" name="target_role"
value="started"/>
           <nvpair id="418e16c6-c5a3-4dd8-8534-727c10bd182c" name="1"
value="rmpath2-part2"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_drbd4" class="heartbeat" type="drbddisk"
provider="heartbeat" restart_type="ignore" is_managed="default"
resource_stickiness="0" multiple_active="stop_start">
       <instance_attributes id="resource_drbd4_instance_attrs">
         <attributes>
           <nvpair id="resource_drbd4_target_role" name="target_role"
value="started"/>
           <nvpair id="f57c70ac-939a-43e6-90ea-c62fdcd7af45" name="1"
value="rmpath2-part3"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_drbd5" class="heartbeat" type="drbddisk"
provider="heartbeat" restart_type="ignore" is_managed="default"
resource_stickiness="0" multiple_active="stop_start">
       <instance_attributes id="resource_drbd5_instance_attrs">
         <attributes>
           <nvpair id="resource_drbd5_target_role" name="target_role"
value="started"/>
           <nvpair id="58ee07c6-a51b-422e-83fc-d08c9f5c0bad" name="1"
value="rmpath2-part5"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_drbd0_fs" class="ocf" type="Filesystem"
provider="heartbeat" restart_type="ignore" is_managed="default"
resource_stickiness="0" multiple_active="stop_start">
       <instance_attributes id="resource_drbd0_fs_instance_attrs">
         <attributes>
           <nvpair id="resource_drbd0_fs_target_role" name="target_role"
value="started"/>
           <nvpair id="3b4e294c-7521-46a6-b3d3-9c3df991e4d0" name="device"
value="/dev/drbd0"/>
           <nvpair id="cfd540a4-989f-4a5f-a9a0-90f95d77bb20"
name="directory" value="/dbtbs"/>
           <nvpair id="c9788a08-5070-45a0-beab-33b34cc6e2b2" name="fstype"
value="ext3"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_drbd1_fs" class="ocf" type="Filesystem"
provider="heartbeat" restart_type="ignore" is_managed="default"
resource_stickiness="0" multiple_active="stop_start">
       <instance_attributes id="resource_drbd1_fs_instance_attrs">
         <attributes>
           <nvpair id="resource_drbd1_fs_target_role" name="target_role"
value="started"/>
           <nvpair id="ad6d9329-94ed-4d91-b72c-0e32a978de37" name="device"
value="/dev/drbd1"/>
           <nvpair id="a7dc2e3e-d520-404b-9f41-d128e14ec6b9"
name="directory" value="/dbtbs2"/>
           <nvpair id="14c454de-8310-42ab-9a3f-5ff303ed007f" name="fstype"
value="ext3"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_drbd2_fs" class="ocf" type="Filesystem"
provider="heartbeat" restart_type="ignore" is_managed="default"
resource_stickiness="0" multiple_active="stop_start">
       <instance_attributes id="resource_drbd2_fs_instance_attrs">
         <attributes>
           <nvpair id="resource_drbd2_fs_target_role" name="target_role"
value="started"/>
           <nvpair id="343f1b2c-9f16-4aa1-8456-18c098ecc147" name="device"
value="/dev/drbd2"/>
           <nvpair id="d6fea532-33ad-4574-a580-e0f6f358b691"
name="directory" value="/dbtemp"/>
           <nvpair id="45441dad-ca3b-47a5-ae86-d10e5e636a2e" name="fstype"
value="ext3"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_drbd3_fs" class="ocf" type="Filesystem"
provider="heartbeat" restart_type="ignore" is_managed="default"
resource_stickiness="0" multiple_active="stop_start">
       <instance_attributes id="resource_drbd3_fs_instance_attrs">
         <attributes>
           <nvpair id="resource_drbd3_fs_target_role" name="target_role"
value="started"/>
           <nvpair id="a9a70879-a902-479f-a148-359b13b9ffe6" name="device"
value="/dev/drbd3"/>
           <nvpair id="0479c1c6-3d70-4b12-a9d9-6b9328f208f8"
name="directory" value="/dblog"/>
           <nvpair id="98451c5d-29bf-4469-8a7d-c22798020d6f" name="fstype"
value="ext3"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_drbd4_fs" class="ocf" type="Filesystem"
provider="heartbeat" restart_type="ignore" is_managed="default"
resource_stickiness="0" multiple_active="stop_start">
       <instance_attributes id="resource_drbd4_fs_instance_attrs">
         <attributes>
           <nvpair id="resource_drbd4_fs_target_role" name="target_role"
value="started"/>
           <nvpair id="668f388b-ff1a-46ac-a654-80ee5e87bd3f" name="device"
value="/dev/drbd4"/>
           <nvpair id="fb2fc607-1eec-48ad-ae1e-d0ba06208f0f"
name="directory" value="/dbnfs"/>
           <nvpair id="728c403d-cea9-43b5-a122-6dd5aa3c9304" name="fstype"
value="ext3"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_drbd5_fs" class="ocf" type="Filesystem"
provider="heartbeat" restart_type="ignore" is_managed="default"
resource_stickiness="0" multiple_active="stop_start">
       <instance_attributes id="resource_drbd5_fs_instance_attrs">
         <attributes>
           <nvpair id="resource_drbd5_fs_target_role" name="target_role"
value="started"/>
           <nvpair id="57c1ede1-136a-4b48-9cc6-4006214a72e5" name="device"
value="/dev/drbd5"/>
           <nvpair id="9fe0b2ee-6e6e-424f-90ea-a66273ed1d8d"
name="directory" value="/db"/>
           <nvpair id="4d5e056e-fec2-4d5c-b41e-76976ea4fb31" name="fstype"
value="ext3"/>
         </attributes>
       </instance_attributes>
     </primitive>
     <primitive id="resource_db2_prod" class="ocf" type="db2"
provider="heartbeat" restart_type="ignore" is_managed="default"
resource_stickiness="0" description="DB2 Producao"
multiple_active="stop_start">
       <instance_attributes id="resource_db2_prod_instance_attrs">
         <attributes>
           <nvpair id="resource_db2_prod_target_role" name="target_role"
value="started"/>
           <nvpair id="94c70633-51d4-4cd8-90d2-4e691be4f44f"
name="instance" value="db2admin"/>
         </attributes>
       </instance_attributes>
     </primitive>
   </group>
 </resources>

2) Edit rsc.xml and insert the monitor operation:

I've changed just the db2 primitive:

     <primitive id="resource_db2_prod" class="ocf" type="db2"
provider="heartbeat" restart_type="ignore" is_managed="default"
resource_stickiness="0" description="DB2 Producao"
multiple_active="stop_start">
       <instance_attributes id="resource_db2_prod_instance_attrs">
         <attributes>
           <nvpair id="resource_db2_prod_target_role" name="target_role"
value="started"/>
           <nvpair id="94c70633-51d4-4cd8-90d2-4e691be4f44f"
name="instance" value="db2admin"/>
         </attributes>
       </instance_attributes>
       <operations>
        <op id="1731be32-9ee7-4cad-b13b-548016228d38" name="monitor"
interval="120s" timeout="60s" start_delay="120s" />
       </operations>
     </primitive>
   </group>
 </resources>

3) Update resources:

s0580crmdb2pr1:~ # cibadmin -U -x rsc.xml
Call cib_modify failed (-23): Activation Failed
<null>

The /var/log/ha-log do not log any message when I do it.

Any idea?

what version do you have?
i think this only works since about 2.0.8
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to