summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-07-20 01:23:17 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-07-20 20:44:14 -0700
commit9e3b58a2abdee5c1cf748eb463042ca9ef6aac66 (patch)
treebf77466ac242b04427d9f3391a78fa6e4606d102
parente235a743d2b4d409945770a6d5f803360932bd3d (diff)
'glusterd' command
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
-rw-r--r--doc/Makefile.am4
-rw-r--r--doc/glusterd.vol6
-rw-r--r--glusterfsd/src/Makefile.am3
-rw-r--r--glusterfsd/src/glusterfsd.c10
-rw-r--r--glusterfsd/src/glusterfsd.h1
5 files changed, 19 insertions, 5 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 58b5e95b758..a29335817b0 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,11 +1,11 @@
EXTRA_DIST = glusterfs.vol.sample glusterfsd.vol.sample glusterfs.8 mount.glusterfs.8\
porting_guide.txt authentication.txt coding-standard.pdf get_put_api_using_xattr.txt \
- translator-options.txt mac-related-xattrs.txt replicate.pdf
+ translator-options.txt mac-related-xattrs.txt replicate.pdf glusterd.vol
SUBDIRS = examples hacker-guide
voldir = $(sysconfdir)/glusterfs
-vol_DATA = glusterfs.vol.sample glusterfsd.vol.sample
+vol_DATA = glusterfs.vol.sample glusterfsd.vol.sample glusterd.vol
man8_MANS = glusterfs.8 mount.glusterfs.8
diff --git a/doc/glusterd.vol b/doc/glusterd.vol
new file mode 100644
index 00000000000..5cadfb48a80
--- /dev/null
+++ b/doc/glusterd.vol
@@ -0,0 +1,6 @@
+volume management
+ type mgmt/glusterd
+ option working-directory /etc/glusterd
+ # option listen-port 6969
+end-volume
+
diff --git a/glusterfsd/src/Makefile.am b/glusterfsd/src/Makefile.am
index 1c67e1cf117..f185f982c8f 100644
--- a/glusterfsd/src/Makefile.am
+++ b/glusterfsd/src/Makefile.am
@@ -22,9 +22,12 @@ $(top_builddir)/libglusterfs/src/libglusterfs.la:
uninstall-local:
rm -f $(DESTDIR)$(sbindir)/glusterfs
+ rm -f $(DESTDIR)$(sbindir)/glusterd
install-data-local:
$(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/run
$(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/log/glusterfs
rm -f $(DESTDIR)$(sbindir)/glusterfs
+ rm -f $(DESTDIR)$(sbindir)/glusterd
ln -s glusterfsd $(DESTDIR)$(sbindir)/glusterfs
+ ln -s glusterfsd $(DESTDIR)$(sbindir)/glusterd
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index 76d07af770f..29debda4b9e 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -657,9 +657,9 @@ generate_uuid ()
return gf_strdup (tmp_str);
}
-#define GF_SERVER_PROCESS 0
-#define GF_CLIENT_PROCESS 1
-
+#define GF_SERVER_PROCESS 0
+#define GF_CLIENT_PROCESS 1
+#define GF_GLUSTERD_PROCESS 2
static uint8_t
gf_get_process_mode (char *exec_name)
@@ -672,6 +672,8 @@ gf_get_process_mode (char *exec_name)
if (!strncmp (base, "glusterfsd", 10)) {
ret = GF_SERVER_PROCESS;
+ } else if (!strncmp (base, "glusterd", 8)) {
+ ret = GF_GLUSTERD_PROCESS;
} else {
ret = GF_CLIENT_PROCESS;
}
@@ -872,6 +874,8 @@ parse_cmdline (int argc, char *argv[], cmd_args_t *cmd_args)
&& (cmd_args->volfile == NULL)) {
if (process_mode == GF_SERVER_PROCESS)
cmd_args->volfile = gf_strdup (DEFAULT_SERVER_VOLFILE);
+ else if (process_mode == GF_GLUSTERD_PROCESS)
+ cmd_args->volfile = gf_strdup (DEFAULT_GLUSTERD_VOLFILE);
else
cmd_args->volfile = gf_strdup (DEFAULT_CLIENT_VOLFILE);
}
diff --git a/glusterfsd/src/glusterfsd.h b/glusterfsd/src/glusterfsd.h
index d67d181e174..7827c9800a7 100644
--- a/glusterfsd/src/glusterfsd.h
+++ b/glusterfsd/src/glusterfsd.h
@@ -27,6 +27,7 @@
#include "glusterfsd-common.h"
+#define DEFAULT_GLUSTERD_VOLFILE CONFDIR "/glusterd.vol"
#define DEFAULT_CLIENT_VOLFILE CONFDIR "/glusterfs.vol"
#define DEFAULT_SERVER_VOLFILE CONFDIR "/glusterfsd.vol"
#define DEFAULT_LOG_FILE_DIRECTORY DATADIR "/log/glusterfs"