Gitweb: http://git.fedorahosted.org/git/?p=dlm.git;a=commitdiff;h=41f4121768ab49488…
Commit: 41f4121768ab4948898945007f49168acfac6c9f
Parent: 2b697668c41a12e816a153dde96dea43bb0094d9
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri May 17 11:06:12 2013 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri May 17 11:06:12 2013 -0500
man: fix dlm.conf man page
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
dlm_controld/dlm.conf.5 | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlm_controld/dlm.conf.5 b/dlm_controld/dlm.conf.5
index 95f74b9..793435a 100644
--- a/dlm_controld/dlm.conf.5
+++ b/dlm_controld/dlm.conf.5
@@ -349,15 +349,15 @@ Example of nodeid 1 as master of all resources:
lockspace foo nodir=1
.br
-master node=1
+master foo node=1
Example of nodeid's 1 and 2 as masters of all resources:
lockspace foo nodir=1
.br
-master node=1
+master foo node=1
.br
-master node=2
+master foo node=2
Lock management will be partitioned among the available masters. There
can be any number of masters defined. The designated master nodes will
@@ -376,9 +376,9 @@ can also be assigned to master nodes, e.g.
lockspace foo nodir=1
.br
-master node=1 weight=2
+master foo node=1 weight=2
.br
-master node=2 weight=1
+master foo node=2 weight=1
In which case node 1 will master 2/3 of the total resources and node 2
will master the other 1/3.
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=0492586f1f…
Commit: 0492586f1f6e0198e9cc99eb846cc14d48e4c197
Parent: dfa6d76b29dcc48c20ebada3ad9f57598b72f490
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue May 14 13:50:38 2013 -0400
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Wed May 15 10:45:24 2013 +0100
gfs2: add native setup to man page
List the simplest sequence of steps to manually
set up and run gfs2/dlm.
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
gfs2/man/gfs2.5 | 187 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 187 insertions(+), 0 deletions(-)
diff --git a/gfs2/man/gfs2.5 b/gfs2/man/gfs2.5
index 25effdd..0517944 100644
--- a/gfs2/man/gfs2.5
+++ b/gfs2/man/gfs2.5
@@ -196,3 +196,190 @@ The GFS2 documentation has been split into a number of sections:
\fBgfs2_tool\fP(8) Tool to manipulate a GFS2 file system (obsolete)
\fBtunegfs2\fP(8) Tool to manipulate GFS2 superblocks
+.SH SETUP
+
+GFS2 clustering is driven by the dlm, which depends on dlm_controld to
+provide clustering from userspace. dlm_controld clustering is built on
+corosync cluster/group membership and messaging.
+
+Follow these steps to manually configure and run gfs2/dlm/corosync.
+
+.B 1. create /etc/corosync/corosync.conf and copy to all nodes
+
+In this sample, replace cluster_name and IP addresses, and add nodes as
+needed. If using only two nodes, uncomment the two_node line.
+See corosync.conf(5) for more information.
+
+.nf
+totem {
+ version: 2
+ secauth: off
+ cluster_name: abc
+}
+
+nodelist {
+ node {
+ ring0_addr: 10.10.10.1
+ nodeid: 1
+ }
+ node {
+ ring0_addr: 10.10.10.2
+ nodeid: 2
+ }
+ node {
+ ring0_addr: 10.10.10.3
+ nodeid: 3
+ }
+}
+
+quorum {
+ provider: corosync_votequorum
+# two_node: 1
+}
+
+logging {
+ to_syslog: yes
+}
+.fi
+
+.PP
+
+.B 2. start corosync on all nodes
+
+.nf
+systemctl start corosync
+.fi
+
+Run corosync-quorumtool to verify that all nodes are listed.
+
+.PP
+
+.B 3. create /etc/dlm/dlm.conf and copy to all nodes
+
+.B *
+To use no fencing, use this line:
+
+.nf
+enable_fencing=0
+.fi
+
+.B *
+To use no fencing, but exercise fencing functions, use this line:
+
+.nf
+fence_all /bin/true
+.fi
+
+The "true" binary will be executed for all nodes and will succeed (exit 0)
+immediately.
+
+.B *
+To use manual fencing, use this line:
+
+.nf
+fence_all /bin/false
+.fi
+
+The "false" binary will be executed for all nodes and will fail (exit 1)
+immediately.
+
+When a node fails, manually run: dlm_tool fence_ack <nodeid>
+
+.B *
+To use stonith/pacemaker for fencing, use this line:
+
+.nf
+fence_all /usr/sbin/dlm_stonith
+.fi
+
+The "dlm_stonith" binary will be executed for all nodes. If
+stonith/pacemaker systems are not available, dlm_stonith will fail and
+this config becomes the equivalent of the previous /bin/false config.
+
+.B *
+To use an APC power switch, use these lines:
+
+.nf
+device apc /usr/sbin/fence_apc ipaddr=1.1.1.1 login=admin password=pw
+connect apc node=1 port=1
+connect apc node=2 port=2
+connect apc node=3 port=3
+.fi
+
+Other network switch based agents are configured similarly.
+
+.B *
+To use sanlock/watchdog fencing, use these lines:
+
+.nf
+device wd /usr/sbin/fence_sanlock path=/dev/fence/leases
+connect wd node=1 host_id=1
+connect wd node=2 host_id=2
+unfence wd
+.fi
+
+See fence_sanlock(8) for more information.
+
+.B *
+For other fencing configurations see dlm.conf(5) man page.
+
+.PP
+
+.B 4. start dlm_controld on all nodes
+
+.nf
+systemctl start dlm
+.fi
+
+Run "dlm_tool status" to verify that all nodes are listed.
+
+.PP
+
+.B 5. if using clvm, start clvmd on all nodes
+
+systemctl clvmd start
+
+.PP
+
+.B 6. make new gfs2 file systems
+
+mkfs.gfs2 -p lock_dlm -t cluster_name:fs_name -j num /path/to/storage
+
+The cluster_name must match the name used in step 1 above.
+The fs_name must be a unique name in the cluster.
+The -j option is the number of journals to create, there must
+be one for each node that will mount the fs.
+
+.PP
+
+.B 7. mount gfs2 file systems
+
+mount /path/to/storage /mountpoint
+
+Run "dlm_tool ls" to verify the nodes that have each fs mounted.
+
+.PP
+
+.B 8. shut down
+
+.nf
+umount -a -t gfs2
+systemctl clvmd stop
+systemctl dlm stop
+systemctl corosync stop
+.fi
+
+.PP
+
+.B More setup information:
+.br
+.BR dlm_controld (8),
+.br
+.BR dlm_tool (8),
+.br
+.BR dlm.conf (5),
+.br
+.BR corosync (8),
+.br
+.BR corosync.conf (5)
+.br
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=1cebece3e9…
Commit: 1cebece3e922bfffa52f58ac6594700764868771
Parent: a3ab08213c87313ec899c114c23650d05268eef5
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Fri Mar 1 16:03:52 2013 +0000
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Tue May 14 14:05:11 2013 +0100
libgfs2: Remove 'writes' field from gfs2_sbd
This was only used to print out how many writes mkfs.gfs2 had made
during its run in debug mode, which doesn't really make sense any more
as we don't use bwrite for much of the mkfs process now.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/libgfs2/buf.c | 1 -
gfs2/libgfs2/libgfs2.h | 1 -
gfs2/mkfs/main_mkfs.c | 5 -----
3 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/gfs2/libgfs2/buf.c b/gfs2/libgfs2/buf.c
index 68f0731..6fcdd17 100644
--- a/gfs2/libgfs2/buf.c
+++ b/gfs2/libgfs2/buf.c
@@ -80,7 +80,6 @@ int bwrite(struct gfs2_buffer_head *bh)
if (pwritev(sdp->device_fd, &bh->iov, 1, bh->b_blocknr * sdp->bsize) != bh->iov.iov_len)
return -1;
- sdp->writes++;
bh->b_modified = 0;
return 0;
}
diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
index 7d2d9ff..e069e9d 100644
--- a/gfs2/libgfs2/libgfs2.h
+++ b/gfs2/libgfs2/libgfs2.h
@@ -311,7 +311,6 @@ struct gfs2_sbd {
struct gfs2_inode *master_dir;
struct master_dir md;
- unsigned int writes;
int metafs_fd;
char metafs_path[PATH_MAX]; /* where metafs is mounted */
struct special_blocks eattr_blocks;
diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/main_mkfs.c
index 6471600..864ff98 100644
--- a/gfs2/mkfs/main_mkfs.c
+++ b/gfs2/mkfs/main_mkfs.c
@@ -583,15 +583,10 @@ static void print_results(struct gfs2_sbd *sdp, uint64_t real_device_size,
printf("%-27s%llu\n", _("Resource groups:"), (unsigned long long)sdp->rgrps);
printf("%-27s\"%s\"\n", _("Locking protocol:"), sdp->lockproto);
printf("%-27s\"%s\"\n", _("Lock table:"), sdp->locktable);
-
- if (opts->debug) {
- printf("%-27s%u\n", _("Writes:"), sdp->writes);
- }
/* Translators: "UUID" = universally unique identifier. */
printf("%-27s%s\n", _("UUID:"), str_uuid(uuid));
}
-
/**
* If path is a symlink, return 1 with *abspath pointing to the absolute path,
* otherwise return 0. Exit on errors. The caller must free the memory pointed