summaryrefslogtreecommitdiffstats
path: root/extras/volgen/glusterfs-volgen.in
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-08-14 04:36:47 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-08-15 11:28:40 -0700
commit2b8545f1a21efe5e9944bccdebdff49e22fb6e6b (patch)
tree2195f781bfaaf95cda486792645cf9675d5f2b2c /extras/volgen/glusterfs-volgen.in
parentdd6c4b0e0db5fbe05a0c7927c780c96d5a97a966 (diff)
new option to volgen '--portmapper-mode'
* without which, it generates volume files in old fashioned way. * with portmapper mode, no port option is taken, and there will be one process per one export. * corresponding changes in 'mgmt/glusterd' is made Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1341 (glusterfs-volgen should behave differently for flag '--internal') URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1341
Diffstat (limited to 'extras/volgen/glusterfs-volgen.in')
-rwxr-xr-xextras/volgen/glusterfs-volgen.in23
1 files changed, 23 insertions, 0 deletions
diff --git a/extras/volgen/glusterfs-volgen.in b/extras/volgen/glusterfs-volgen.in
index 3ab5aa1cdc0..31a81122810 100755
--- a/extras/volgen/glusterfs-volgen.in
+++ b/extras/volgen/glusterfs-volgen.in
@@ -72,6 +72,8 @@ def generate_volume_files ():
help="number of file replica needed")
group.add_option("--num-stripe", type="int", dest="num_stripe",
help="number of stripe count needed")
+ group.add_option("--portmapper-mode", action="store_true", dest="portmapper",
+ default=False, help="generate volume files for glusterfs portmapper friendly way")
parse.add_option_group(group)
@@ -164,6 +166,27 @@ def generate_volume_files ():
len(server_array))
raise ValueError
+ if options.portmapper is True:
+ for server in server_dict.keys():
+ create_exp = CreateVolfile (server_dict, server,
+ None, transports,
+ options, None)
+ try:
+ create_exp.create_pmap_export_volfile ()
+ except IOError, (errno, strerror):
+ print "Got %s creating server volfiles for %s" % (strerror, server)
+
+ for transport in transports:
+ create_mnt = CreateVolfile (server_dict, None,
+ transport, transports,
+ options, server_array)
+ try:
+ create_mnt.create_pmap_mount_volfile ()
+ except IOError, (errno, strerror):
+ print "Got %s creating client volfiles for transport '%s'" % (strerror, transport)
+
+ return
+
for server in server_dict.keys():
create_exp = CreateVolfile (server_dict, server,
None, transports,