From 0088e318c1218191535ea0baa04b4fe858412f54 Mon Sep 17 00:00:00 2001 From: Meghana M Date: Mon, 24 Mar 2014 13:58:38 +0530 Subject: cli/hooks : Add volume set options to enable/disable nfs-ganesha support. 1. gluster volume set nfs-ganesha.enable ON/OFF If the option is set to ON, the volume field in the nfs-ganesha configuartion file is edited. Gluster-nfs is disabled on that volume and the volume is exported using nfs-ganesha. 2.gluster volume set nfs-ganesha.host IP This is used to provide the IP of the nfs-ganesha host. Note : nfs-ganesha.host MUST be set before using nfs-ganesha.enable ON The switch from gluster-nfs to nfs-ganesha is mostly done by the hook-scripts in the post phase of the 'set' option. As a result, gluster volume reset does not function as it is expected to. By default, nfs-ganesha will be set to off but the process will not be killed. Hence, a few changes have to be made post 'reset' option as well. Those changes also have been added. Change-Id: I7fdc14ee49d1724af96eda33c6a3ec08b1020788 BUG: 1092283 Signed-off-by: Meghana Reviewed-on: http://review.gluster.org/7321 Reviewed-by: Raghavendra Talur Reviewed-by: Santosh Pradhan Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/nfs/server/src/nfs.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'xlators/nfs/server/src/nfs.c') diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c index 918e8631255..65814ebc17c 100644 --- a/xlators/nfs/server/src/nfs.c +++ b/xlators/nfs/server/src/nfs.c @@ -1827,6 +1827,16 @@ struct volume_options options[] = { .description = "This option is used to start or stop the NFS server " "for individual volumes." }, + { .key = {"nfs-ganesha.*.host"}, + .type = GF_OPTION_TYPE_INTERNET_ADDRESS_LIST, + .default_value = "none", + .description = "Set nfs-ganesha host IP" + }, + { .key = {"nfs-ganesha.*.enable"}, + .type = GF_OPTION_TYPE_BOOL, + .default_value = "off", + .description = "This option, if set to 'on', enables exports via nfs-ganesha " + }, { .key = {"nfs.nlm"}, .type = GF_OPTION_TYPE_BOOL, -- cgit