 * diskd --- monitors shared disk.
 *   This applied pingd mechanism to disk monitor.

Copyright (c) 2009 NIPPON TELEGRAPH AND TELEPHONE CORPORATION

Note: Before using this information and the product it supports, 
read the general information in section 4.0 "Trademarks and Notices" 
in this document.

Last Update Date:  2009/09/01 


=======================================================================
CONTENTS
--------
1.0  Overview
2.0  Installation and Setup Instructions
3.0  Configuration Information
4.0  Trademarks and Notices
5.0  Disclaimer

=======================================================================

1.0   Overview
--------------
This program tries to read/write a file on the indicated disk.
If it can not read/write a file, it assumes that this node can not access
the disk anymore, so tell Heartbeat to start the fail-over.

=======================================================================

1.1  Limitations
---------------------
This program is tested on the following environment.

	Heartbeat 2.1.4-1
 	Red Hat Enterprise Linux Server release 5.3 (Tikanga)	

=======================================================================

2.0   Installation and Setup Instructions
-----------------------------------------

2.1   Install from rpm

	2.1.1 just run rpm command.
		* Example:
		# rpm -ihv hb-diskd-1.00-1.hb214.x86_64.rpm

=======================================================================

3.0 Configuration Information
-----------------------------

3.1 Configuration Settings
--------------------------

	3.1.1 Edit your /etc/ha.d/ha.cf
		add the following line in your ha.cf

		* Example for x86_64:
		respawn root /usr/lib64/heartbeat/diskd -N /dev/sdx -a diskcheck_status -i 10 

		or
		* Example for i386: 
		respawn root /usr/lib/heartbeat/diskd -N /dev/sdx -a diskcheck_status -i 10 

	3.1.2 Edit you cib.xml(both x86_64 and i386)
		add the constraints for diskd

		<constraints>

		  <rsc_location id="rul_DK_dsc" rsc="grp_DB2">
     		     <rule id="prefered_rul_DK_dsc" score="-INFINITY" boolean_op="and">
       		        <expression attribute="diskcheck_status" id="dkstatus1" operation="defined"/>
    	   	        <expression attribute="diskcheck_status" id="dkstatus2" operation="eq" value="ERROR"/>
    		     </rule>
  		  </rsc_location>

		</constraints> 	

	3.1.3 Option

		-N <device_name>
		 * Mandatory
			Device name to access

		-i <interval>
		 * Optional(default = 10 sec)
			Interval of disk access
			controllable range: 1 - 3600 (sec)

		-D
		 * Optional
			Daemonize specification

		-a <attribute>
		 * Optional(default = diskd)
			attribute name used in status cnofiguration

		-t <timeout>
		 * Optional(default = 30 sec)
			Timeout valuse forread() system call
			controllable range: 1 - 3600 (sec)

		-r <retry>
		 * Optional(default = 1)
			Number of re-try times for checking the disk status
			controllable range: 0 - 10 
			If you set -r=2, diskd will check up to 3 times

		-I <retry_interval>
		 * Optional(default = 5 sec)
			Retry interval
			controllable range: 1 - 3600 (sec)

=======================================================================

4.0   Trademarks and Notices
----------------------------

	Heartbeat is a registered trademark of The High Availability 
        Linux Project.

	Linux is a registered trademark of Linus Torvalds.

	Other company, product, and service names may be 
	trademarks or service marks of others.

=======================================================================

5.0   Disclaimer
----------------

	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
	CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
	MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND 
	PARTICULARLY THE NON-INFRINGEMENT OF ANY THIRD PARTY'S 
	INTELLECTUAL PROPERTY RIGHTS ARE DISCLAIMED. IN NO EVENT 
	SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY 
	DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
	CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 
	OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 
	OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
	LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
	(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
	USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 
	DAMAGE.

