From mboxrd@z Thu Jan 1 00:00:00 1970 From: lhh@sourceware.org Date: 23 Jun 2006 16:01:05 -0000 Subject: [Cluster-devel] cluster/cman/qdisk Makefile README disk.c disk ... Message-ID: <20060623160105.8503.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: cluster Branch: RHEL4 Changes by: lhh at sourceware.org 2006-06-23 16:01:02 Modified files: cman/qdisk : Makefile README disk.c disk.h main.c Added files: cman/qdisk : mkqdisk.c proc.c Log message: Implements 'label' support for qdisk. Uses /proc/partitions for device info & scans devices for signatures. Useful in environments where a device is present but maybe numbered differently on different nodes depending on the host/SAN configuration. Also adds initialization utility which must be run before qdiskd will use a given partition. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/mkqdisk.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/proc.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/Makefile.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.1&r2=1.1.2.2 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/README.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.1&r2=1.1.2.2 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/disk.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.2&r2=1.1.2.3 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/disk.h.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.1&r2=1.1.2.2 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/main.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.1&r2=1.1.2.2 --- cluster/cman/qdisk/Makefile 2006/05/18 14:52:49 1.1.2.1 +++ cluster/cman/qdisk/Makefile 2006/06/23 16:01:02 1.1.2.2 @@ -19,26 +19,31 @@ CFLAGS +=-I${incdir} -I${top_srcdir}/config \ -Wall -Werror -Wstrict-prototypes -Wshadow -D_GNU_SOURCE -g -TARGET=qdiskd +TARGET=qdiskd mkqdisk all: ${TARGET} copytobin: all cp ${TARGET} ${top_srcdir}/bin -install: qdiskd +install: ${TARGET} install -d ${sbindir} - install qdiskd ${sbindir} + install ${TARGET} ${sbindir} qdiskd: disk.o crc32.o disk_util.o main.o score.o bitmap.o clulog.o \ - gettid.o ../lib/libcman.a + gettid.o proc.o ../lib/libcman.a gcc -o $@ $^ -lpthread -L../lib -lccs +mkqdisk: disk.o crc32.o disk_util.o \ + proc.o mkqdisk.o + gcc -o $@ $^ + + %.o: %.c $(CC) -c -o $@ $^ $(INCLUDES) $(CFLAGS) clean: - rm -f *.o qdiskd + rm -f *.o ${TARGET} uninstall: - ${UNINSTALL} qdiskd ${sbindir} + ${UNINSTALL} ${TARGET} ${sbindir} --- cluster/cman/qdisk/README 2006/05/18 14:52:49 1.1.2.1 +++ cluster/cman/qdisk/README 2006/06/23 16:01:02 1.1.2.2 @@ -213,8 +213,16 @@ min_score="3" Absolute minimum score to be consider one's self "alive". If omitted, or set to 0, the default function "floor((n+1)/2)" is used. - device="/dev/sda1"/> This is the device the quorum daemon will use. + device="/dev/sda1" This is the device the quorum daemon will use. This device must be the same on all nodes. + label="mylabel"/> This overrides the device field if present. + If specified, the quorum daemon will read + /proc/partitions and check for qdisk signatures + on every block device found, comparing the label + against the specified label. This is useful in + configurations where the block device name + differs on a per-node basis. + 3.2. The tag @@ -249,3 +257,18 @@ * The worst-case for improperly configured quorum heuristics is a race to fence where two partitions simultaneously try to kill each other. +3.5. Creating a quorum disk partition + +3.5.1. The mkqdisk utility. + +The mkqdisk utility can create and list currently configured quorum disks +visible to the local node. + + mkqdisk -L List available quorum disks. + + mkqdisk -f