1ganesha_conf(8) System Manager's Manual ganesha_conf(8)
2
3
4
6 ganesha_conf - Ganesha configuration editor
7
8
10 ganesha_conf set <block-description> [--key1 value1 [--key2 value2]...]
11 ganesha_conf del <block-description> [--key1 [--key2 ]...]
12
13
15 The set command adds or changes the given key value parameters in the
16 block. It also creates the block if the block corresponding to the
17 given block description (see section BLOCK DESCRIPTION below) is not
18 present in the configuration.
19
20 The del command deletes given keys from the ganesha configuration block
21 described by the block description. It will delete the block itself if
22 no keys are provided.
23
24
26 Block description is a list of block names and possibly some key value
27 parameters that uniquely identify a ganesha configuration block.
28
29 NFS Ganesha configuration file contains a list of blocks. Each block
30 starts with a block name followed by a left brace, then a list of key =
31 value; entries. The block may optionally have sub blocks (note the re‐
32 cursive definition!). Finally, the block ends with a right brace.
33 (Note that key = value; entries can come after a sub block as well, but
34 we don't allow this with ganesha_conf editor! All key value entries
35 should come before any sub blocks.)
36
37 An example of a ganesha configuration block:
38
39
40 nfs_core_param {
41 Nb_Worker = 256;
42 Clustered = TRUE;
43 NFS_Protocols = 3,4;
44 }
45
46 Since there should be only one nfs_core_param block, we just need the
47 name of the block to uniquely identify it. So "nfs_core_param" would be
48 its block description!
49
50 An example of a ganesha configuration block with a couple sub blocks:
51
52 log {
53 default_log_level = EVENT;
54 format {
55 date_format = ISO-8601;
56 time_format = ISO-8601;
57 thread_name = TRUE;
58 }
59 components {
60 all = EVENT;
61 }
62 }
63
64 Ganesha configuration should have only one log block as well, so "log"
65 would identify the log block. To identify format sub block inside the
66 log block, "log format" would be the block description for the above
67 format sub block. Similarly "log components" would be the block de‐
68 scription for the above components sub block.
69
70 An export block is special in that there can be many export blocks, one
71 for each export. A client block is also special. There can be many
72 client blocks and they are always sub blocks inside export blocks. ex‐
73 port_id key value uniquely identifies an export block. clients key
74 value uniquely identifies a client block inside a given export block.
75
76 Here are couple export blocks with couple client blocks in them:
77
78 export {
79 export_id = 1;
80 path = /fs1/export1;
81 pseudo = /fs1/export1;
82 manage_gids = true;
83 client {
84 clients = 192.168.122.31;
85 access_type = RW;
86 }
87 client {
88 clients = *;
89 access_type = RO;
90 }
91 }
92
93 export {
94 export_id = 2;
95 path = /fs1/export2;
96 pseudo = /fs1/export2;
97 manage_gids = true;
98 client {
99 clients = 192.168.122.31;
100 access_type = RW;
101 }
102 client {
103 clients = 192.168.122.32;
104 access_type = RO;
105 }
106 }
107
108 To identify the correct export block, we need to supply its export_id.
109 For example "export export_id 2" identifies the second export block
110 above. export blocks can be uniquely identified by pseudo or path keys
111 in some environments. One could specify "export path /fs1/export2" to
112 identify the second export block as well. Similarly, a client block
113 needs additional clients key value to identify the correct client
114 block. For example, "export export_id 2 client clients 192.168.122.31"
115 identifies the first client block in the second export block above!
116
117
119 1. To change number of ganesha worker threads:
120
121 ganesha_conf set nfs_core_param --nb_worker 256
122
123 2. To change the date and time format of ganesha log messages:
124
125 ganesha_conf set log format --date_format ISO-8601 --time_format
126 ISO-8601
127
128 3. Create an export and allow client with IP address 192.168.122.31 to
129 be able to do read write and all other clients to do read only:
130
131 ganesha_conf set export path /fs1/export2 --export_id 2 --pseudo
132 /fs1/export2 --manage_gids true
133 ganesha_conf set export path /fs1/export2 client clients 192.168.122.31
134 --access_type RW
135 ganesha_conf set export path /fs1/export2 client clients 192.168.122.32
136 --access_type RO
137
138
140 ganesha_conf by default uses /etc/ganesha/ganesha.conf file as the con‐
141 figuration file. If your environment uses a different file (or set of
142 files), you can use CONFFILE environment variable to override the de‐
143 fault configuration file. For example, "CONFFILE=/etc/ganesha/gane‐
144 sha.main.conf ganesha_conf set nfs_core_param --nb_worker 256" will use
145 /etc/ganesha/ganesha.main.conf file for changing the worker threads.
146
147 ganesha_conf can't handle comments within a block at this point.
148
149 Neither block descriptions nor key value parameters are verified to be
150 valid ganesha configuration blocks or parameter values currently.
151
152
153
154 21 Mar 2017 ganesha_conf(8)