Send Linux-ha-cvs mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."
Today's Topics:
1. Linux-HA CVS: doc by xunsun from
([email protected])
2. Linux-HA CVS: crm by andrew from
([email protected])
3. Linux-HA CVS: crm by andrew from
([email protected])
4. Linux-HA CVS: crm by andrew from
([email protected])
5. Linux-HA CVS: resources by xunsun from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Wed, 15 Feb 2006 21:43:52 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: doc by xunsun from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : xunsun
Host :
Project : linux-ha
Module : doc
Dir : linux-ha/doc
Modified Files:
startstop.in
Log Message:
email change
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/doc/startstop.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- startstop.in 10 Oct 2002 14:36:51 -0000 1.2
+++ startstop.in 16 Feb 2006 04:43:52 -0000 1.3
@@ -8,7 +8,7 @@
#
# Author: Matthew Soffen
#
-# Support: [EMAIL PROTECTED]
+# Support: [EMAIL PROTECTED]
#
# License: GNU Lesser General Public License (LGPL)
#
------------------------------
Message: 2
Date: Thu, 16 Feb 2006 00:37:22 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: crm by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : crm
Dir : linux-ha/crm/crmd
Modified Files:
callbacks.c
Log Message:
Extra logging for 1093
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/callbacks.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -3 -r1.102 -r1.103
--- callbacks.c 15 Feb 2006 13:18:11 -0000 1.102
+++ callbacks.c 16 Feb 2006 07:37:21 -0000 1.103
@@ -162,10 +162,12 @@
return;
#endif
} else if(safe_str_eq(sys_to, CRM_SYSTEM_DC) && AM_I_DC ==
FALSE) {
- crm_debug_2("Ignoring message for the DC [F_SEQ=%s]",
- seq);
+ crm_debug("Ignoring message for the DC [F_SEQ=%s]",seq);
return;
- }
+ } else {
+ crm_debug("Processing DC message from %s [F_SEQ=%s]",
+ from, seq);
+ }
}
if(new_input == NULL) {
------------------------------
Message: 3
Date: Thu, 16 Feb 2006 00:56:59 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: crm by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : crm
Dir : linux-ha/crm/crmd
Modified Files:
callbacks.c ccm.c
Log Message:
Potential fix for 1093 : the no-op was being sent to and from the wrong
subsystem
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/callbacks.c,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -3 -r1.103 -r1.104
--- callbacks.c 16 Feb 2006 07:37:21 -0000 1.103
+++ callbacks.c 16 Feb 2006 07:56:58 -0000 1.104
@@ -141,6 +141,10 @@
crm_log_message_adv(LOG_MSG, "HA[inbound]: CCM Discard", msg);
+ } else if(safe_str_eq(sys_to, CRM_SYSTEM_DC) && AM_I_DC == FALSE) {
+ crm_debug_2("Ignoring message for the DC [F_SEQ=%s]", seq);
+ return;
+
} else if(safe_str_eq(sys_from, CRM_SYSTEM_DC)) {
if(AM_I_DC && safe_str_neq(from, fsa_our_uname)) {
crm_err("Another DC detected: %s (op=%s)", from, op);
@@ -161,9 +165,6 @@
from, fsa_our_dc);
return;
#endif
- } else if(safe_str_eq(sys_to, CRM_SYSTEM_DC) && AM_I_DC ==
FALSE) {
- crm_debug("Ignoring message for the DC [F_SEQ=%s]",seq);
- return;
} else {
crm_debug("Processing DC message from %s [F_SEQ=%s]",
from, seq);
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/ccm.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -3 -r1.96 -r1.97
--- ccm.c 15 Feb 2006 13:18:11 -0000 1.96
+++ ccm.c 16 Feb 2006 07:56:58 -0000 1.97
@@ -1,4 +1,4 @@
-/* $Id: ccm.c,v 1.96 2006/02/15 13:18:11 andrew Exp $ */
+/* $Id: ccm.c,v 1.97 2006/02/16 07:56:58 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -236,8 +236,8 @@
oc_node_list_t *tmp = NULL, *membership_copy = NULL;
struct crmd_ccm_data_s *ccm_data = fsa_typed_data(fsa_dt_ccm);
HA_Message *no_op = create_request(
- CRM_OP_NOOP, NULL, NULL,
- AM_I_DC?CRM_SYSTEM_DC:CRM_SYSTEM_CRMD, CRM_SYSTEM_CRMD, NULL);
+ CRM_OP_NOOP, NULL, NULL, CRM_SYSTEM_CRMD,
+ AM_I_DC?CRM_SYSTEM_DC:CRM_SYSTEM_CRMD, NULL);
if(ccm_data == NULL) {
crm_err("No data provided to FSA function");
------------------------------
Message: 4
Date: Thu, 16 Feb 2006 01:12:19 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: crm by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : crm
Dir : linux-ha/crm/crmd
Modified Files:
callbacks.c
Log Message:
If we're in an election, triggering another one wont help.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/callbacks.c,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -3 -r1.104 -r1.105
--- callbacks.c 16 Feb 2006 07:56:58 -0000 1.104
+++ callbacks.c 16 Feb 2006 08:12:18 -0000 1.105
@@ -150,11 +150,13 @@
crm_err("Another DC detected: %s (op=%s)", from, op);
/* make sure the election happens NOW */
level = LOG_WARNING;
- new_input = new_ha_msg_input(msg);
- register_fsa_error_adv(
- C_FSA_INTERNAL, I_ELECTION, NULL,
- new_input, __FUNCTION__);
-
+ if(fsa_state != S_ELECTION) {
+ new_input = new_ha_msg_input(msg);
+ register_fsa_error_adv(
+ C_FSA_INTERNAL, I_ELECTION, NULL,
+ new_input, __FUNCTION__);
+ }
+
#if 0
/* still thinking about this one...
* could create a timing issue if we dont notice the
@@ -166,8 +168,8 @@
return;
#endif
} else {
- crm_debug("Processing DC message from %s [F_SEQ=%s]",
- from, seq);
+ crm_debug_2("Processing DC message from %s [F_SEQ=%s]",
+ from, seq);
}
}
------------------------------
Message: 5
Date: Thu, 16 Feb 2006 01:36:32 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: resources by xunsun from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : xunsun
Host :
Project : linux-ha
Module : resources
Dir : linux-ha/resources/OCF
Modified Files:
Raid1.in
Log Message:
make the Raid1 RA more mdadm friendly (Ranjan Gupta), and other fix
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/resources/OCF/Raid1.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- Raid1.in 26 Jan 2006 18:00:05 -0000 1.7
+++ Raid1.in 16 Feb 2006 08:36:31 -0000 1.8
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $Id: Raid1.in,v 1.7 2006/01/26 18:00:05 lars Exp $
+# $Id: Raid1.in,v 1.8 2006/02/16 08:36:31 xunsun Exp $
#
# License: GNU General Public License (GPL)
# Support: [EMAIL PROTECTED]
@@ -17,12 +17,16 @@
#
# OCF parameters are as below:
# OCF_RESKEY_raidconf
-# (name of MD configuration file. e.g. /etc/raidtab)
+# (name of MD configuration file. e.g. /etc/raidtab or
/etc/mdadm.conf)
# OCF_RESKEY_raiddev
-# (of the form /dev/md?? the block device to use)
+# (of the form /dev/md* the block device to use)
#
# in /etc/ha.d/haresources, use a line such as:
# nodea 10.0.0.170 Raid1::/etc/raidtab.md0::/dev/md0
Filesystem::/dev/md0::/data1::ext2
+# (for systems with raidtools)
+# or
+# nodea 10.0.0.170 Raid1::/etc/mdadm.conf::/dev/md0
Filesystem::/dev/md0::/data1::ext2
+# (for systems with mdadm)
#
# The "start" arg starts up the raid device
# The "stop" arg stops it. NOTE: all filesystems must be unmounted
@@ -56,18 +60,21 @@
# going to work to use RAID for the system disks and the shared disks.
#
# 0) partition the disks to use for RAID. Use normal Linux partition
-# types, not the RAID autodetect type for your partitions.
+# types, not the RAID autodetect type for your partitions.
# 1) Create /etc/raidtab.md? on both systems (see example file below)
+# or for systems with mdadm tools create /etc/mdadm.conf (see example below)
# 2) Initialize your raid partition with
-# /sbin/mkraid --configfile /etc/raidtab.md? /dev/md?
+# /sbin/mkraid --configfile /etc/raidtab.md? /dev/md?
+# or create mirror raid with the following command
+# mdadm --create /dev/md? -l 1 -n 2 /dev/sdb? /dev/sdb?
# 3) Format your filesystem
-# mke2fs /dev/md0 # for ext2fs... a journaling filesystem would be nice
+# mke2fs /dev/md0 # for ext2fs... a journaling filesystem would be nice
# 3) Create the mount point on both systems.
-# DO NOT add your raid filesystem to /etc/fstab
+# DO NOT add your raid filesystem to /etc/fstab
# 4) copy this script (to /etc/rc.d/init.d if you wish) and edit it to
# reflect your desired settings.
-# 5) Modify the heartbeat 'haresources' setup file
-# 6) unmount the filesystem and stop the raid device with 'raidstop'
+# 5) Modify the heartbeat 'haresources' (for non-crm heartbeat) or 'cib.xml'
(for crm heartbeat) setup file
+# 6) unmount the filesystem and stop the raid device with 'raidstop' or 'mdadm
-S'
# 7) fire up heartbeat!
#
#
@@ -76,16 +83,19 @@
#
# raiddev /dev/md0
# raid-level 1
-# nr-raid-disks 2
+# nr-raid-disks 2
# chunk-size 64k
-# persistent-superblock 1
+# persistent-superblock 1
# #nr-spare-disks 0
# device /dev/sda1
# raid-disk 0
# device /dev/sdb1
# raid-disk 1
#
-
+# EXAMPLE config file /etc/mdadm.conf (for more info:man mdadm.conf)
+#
+# DEVICE /dev/sdb1 /dev/sdb2
+# ARRAY /dev/md0 level=raid1 UUID=4a865b55:ba27ef8d:29cd5701:6fb42799
#######################################################################
# Initialization:
@@ -113,7 +123,7 @@
usage() {
cat <<-EOT
usage: $0 {start|stop|status|monitor|validate-all|usage|meta-data}
- $Id: Raid1.in,v 1.7 2006/01/26 18:00:05 lars Exp $
+ $Id: Raid1.in,v 1.8 2006/02/16 08:36:31 xunsun Exp $
EOT
}
@@ -133,10 +143,10 @@
<parameters>
<parameter name="raidconf" unique="0" required="1">
<longdesc lang="en">
-The name of RAID configuration file. e.g. /etc/raidtab.
+The RAID configuration file. e.g. /etc/raidtab or /etc/mdadm.conf.
</longdesc>
-<shortdesc lang="en">RAID tab config file</shortdesc>
-<content type="string" default="/etc/raidtab" />
+<shortdesc lang="en">RAID config file</shortdesc>
+<content type="string" default="" />
</parameter>
<parameter name="raiddev" unique="0" required="1">
@@ -187,7 +197,6 @@
if [ $? -ne 0 ] ; then
# It is not fatal, chance is that we have raid1 builtin...
ocf_log warn "Couldn't insert RAID1 module"
-# return 1
fi
grep -q "^Personalities.*\[raid1\]" /proc/mdstat 2>/dev/null
if [ $? -ne 0 ] ; then
@@ -197,20 +206,12 @@
if [ $HAVE_RAIDTOOLS = "true" ]; then
# Run raidstart to start up the RAID array
- $RAIDSTART --configfile $RAIDTAB_CONFIG $MDDEV
+ $RAIDSTART --configfile $RAIDCONF $MDDEV
else
# Run mdadm
- $MDADM --run $MDDEV --config=$RAIDTAB_CONFIG
+ $MDADM --assemble $MDDEV --config=$RAIDCONF
fi
-
- # We can't rely the exit status above, $MDADM will return 0 on some
failures, see
- #
- # # mdadm --run /dev/nosuchdevice
- # mdadm: error opening /dev/nosuchdevice: No such file or
directory
- # # echo $?
- # 0
-
if [ "running" = `raid1_status` ]; then
return $OCF_SUCCESS
else
@@ -224,18 +225,15 @@
#
raid1_stop() {
# See if the MD device is online
- grep -e "^$MD[ \t:]" /proc/mdstat >/dev/null
- if [ $? -ne 0 ] ; then
- ocf_log warn "device $MD is not online according to kernel"
+ if [ "stopped" = `raid1_status` ]; then
return $OCF_SUCCESS
fi
# See if the MD device is mounted
- # NOTE: this will not work right if you have more than 10 md devices!
$MOUNT | grep -e "^$MDDEV\>" >/dev/null
if [ $? -ne 1 ] ; then
# Kill all processes open on filesystem
- $FUSER -mk $MOUNTPOINT
+ $FUSER -m -k $MDDEV
# the return from fuser doesn't tell us much
#if [ $? -ne 0 ] ; then
@@ -245,10 +243,6 @@
# Unmount the filesystem
$UMOUNT $MDDEV
- if [ $? -ne 0 ] ; then
- ocf_log err "Couldn't unmount filesystem for $MDDEV"
- return $OCF_ERR_GENERIC
- fi
$MOUNT | grep -e "^$MDDEV\>" >/dev/null
if [ $? -ne 1 ] ; then
@@ -259,9 +253,9 @@
# Turn off raid
if [ $HAVE_RAIDTOOLS = "true" ]; then
- $RAIDSTOP --configfile /etc/raidtab.$MD $MDDEV
+ $RAIDSTOP --configfile $RAIDCONF $MDDEV
else
- $MDADM --stop $MDDEV --config=$RAIDTAB_CONFIG
+ $MDADM --stop $MDDEV --config=$RAIDCONF
fi
if [ $? -ne 0 ] ; then
@@ -300,9 +294,9 @@
fi
COMMENT="\(#.*\)"
- grep -q
"^[[:space:]]*raiddev[[:space:]]\+$MDDEV[[:space:]]*$COMMENT\?$"
$RAIDTAB_CONFIG 2>/dev/null
+ grep -q
"^[[:space:]]*raiddev[[:space:]]\+$MDDEV[[:space:]]*$COMMENT\?$" $RAIDCONF
2>/dev/null
if [ $? -ne 0 ]; then
- ocf_log err "Raid device $MDDEV does not appear in
$RAIDTAB_CONFIG"
+ ocf_log err "Raid device $MDDEV does not appear in $RAIDCONF"
exit $OCF_ERR_GENERIC
fi
else
@@ -346,16 +340,16 @@
# Check the necessary enviroment virable's setting
#
-RAIDTAB_CONFIG=$OCF_RESKEY_raidconf
+RAIDCONF=$OCF_RESKEY_raidconf
MDDEV=$OCF_RESKEY_raiddev
-if [ -z "$RAIDTAB_CONFIG" ] ; then
+if [ -z "$RAIDCONF" ] ; then
ocf_log err "Please set OCF_RESKEY_raidconf!"
exit $OCF_ERR_ARGS
fi
-if [ ! -r "$RAIDTAB_CONFIG" ] ; then
- ocf_log err "Configuration file [$RAIDTAB_CONFIG] does not exist, or
can not be opend!"
+if [ ! -r "$RAIDCONF" ] ; then
+ ocf_log err "Configuration file [$RAIDCONF] does not exist, or can not
be opend!"
exit $OCF_ERR_ARGS
fi
@@ -365,7 +359,7 @@
fi
if [ ! -b "$MDDEV" ] ; then
- ocf_log err "Couldn't find MD device $MDDEV. Expected /dev/md* to exist"
+ ocf_log err "$MDDEV is not a block device!"
exit $OCF_ERR_ARGS
fi
@@ -375,20 +369,17 @@
# Check to make sure the utilites are found
check_util $MODPROBE
check_util $FUSER
-#check_util $RAIDSTART
check_util $MOUNT
check_util $UMOUNT
HAVE_RAIDTOOLS=false
if [ -z "$RAIDSTART" -o ! -x "$RAIDSTART" ]; then
- ocf_log info "Raidstart not found, trying mdadm..."
+ ocf_log info "$RAIDSTART not found, trying mdadm..."
check_util $MDADM
else
check_util $RAIDSTOP
-
HAVE_RAIDTOOLS=true
-
fi
# At this stage,
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 27, Issue 66
********************************************