summaryrefslogtreecommitdiffstats
path: root/docs-xml/manpages/vfs_glusterfs.8.xml
blob: d25135e14ac3cd99f55588db763718a208b4a8fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
<refentry id="vfs_glusterfs.8">

<refmeta>
	<refentrytitle>vfs_glusterfs</refentrytitle>
	<manvolnum>8</manvolnum>
	<refmiscinfo class="source">Samba</refmiscinfo>
	<refmiscinfo class="manual">System Administration tools</refmiscinfo>
	<refmiscinfo class="version">&doc.version;</refmiscinfo>
</refmeta>


<refnamediv>
	<refname>vfs_glusterfs</refname>
	<refpurpose>
		Utilize features provided by GlusterFS
	</refpurpose>
</refnamediv>

<refsynopsisdiv>
	<cmdsynopsis>
		<command>vfs objects = glusterfs</command>
	</cmdsynopsis>
</refsynopsisdiv>

<refsect1>
	<title>DESCRIPTION</title>

	<para>This VFS module is part of the
	<citerefentry><refentrytitle>samba</refentrytitle>
	<manvolnum>8</manvolnum></citerefentry> suite.</para>

	<para>
		GlusterFS
		(<ulink url="http://www.gluster.org/">http://www.gluster.org</ulink>)
		is an Open Source clustered file system capable of scaling to
		several peta-bytes.  With its FUSE based native client,
		GlusterFS is available as a POSIX compliant file system and can
		hence be shared by Samba without additional steps.
	</para>

	<para>
		The <command>vfs_glusterfs</command> VFS module provides an
		alternative, and superior way to access a Gluster filesystem
		from Samba for sharing. It does not require a Gluster FUSE mount
		but directly accesses the GlusterFS daemon through its library
		<command>libgfapi</command>, thereby omitting the expensive
		kernel-userspace context switches and taking advantage of some
		of the more advanced features of GlusterFS.
	</para>

	<para>
		This module can be combined with other modules, but it
		should be the last module in the <command>vfs objects</command>
		list. Modules added to this list to the right of the glusterfs
		entry may not have any effect at all.
	</para>
</refsect1>

<refsect1>
	<title>CONFIGURATION</title>

	<para>
		A basic configuration looks like this.
	</para>

	<programlisting>
		<smbconfsection name="[share]"/>
		<smbconfoption name="vfs objects">glusterfs</smbconfoption>
		<smbconfoption name="path">/relative/base/path</smbconfoption>
		<smbconfoption name="glusterfs:volume">gv0</smbconfoption>
		<smbconfoption name="kernel share modes">no</smbconfoption>
	</programlisting>

	<para>
		Note that since <command>vfs_glusterfs</command> does not
		require a Gluster mount, the share <command>path</command> is
		treated differently than for other shares: It is interpreted as
		the base path of the share relative to the gluster volume used.
		Because this is usually not at the same time a system path, in a
		ctdb cluster setup where ctdb manages Samba, you need to set
		<command>CTDB_SAMBA_SKIP_SHARE_CHECK=yes</command> in ctdb's
		configuration file. Otherwise ctdb will not get healthy.
	</para>

	<para>
		Note that currently kernel share modes have to be disabled
		in a share running with the glusterfs vfs module for file
		serving to work properly.
	</para>
</refsect1>

<refsect1>
	<title>OPTIONS</title>

	<variablelist>

		<varlistentry>
		<term>glusterfs:logfile = path</term>
		<listitem>
		<para>
			Defines whether and where to store a vfs_glusterfs specific
			logfile. Client variable substitution is supported (i.e.
			%M, %m, %I), hence per client log file can be specified.
		</para>
		<para>
			Example: glusterfs:logfile =
			/var/log/samba/glusterfs-vol2.%M.log
		</para>
		</listitem>
		</varlistentry>

		<varlistentry>
		<term>glusterfs:loglevel = 0-9</term>
		<listitem>
		<para>
			Defines the level of logging, with higher numbers corresponding to more verbosity.
			0 - No logs; 9 - Trace log level; 7 being the info log level is preferred.
		</para>
		<para>
			If this option is not defined with an explicit loglevel,
			the glusterfs default is used (currently loglevel 7).
		</para>
		</listitem>
		</varlistentry>


		<varlistentry>
		<term>glusterfs:volfile_server = servername</term>
		<listitem>
		<para>
			Defines which volfile server to use, defaults to
			localhost. It could be list of white space
			separated elements where each element could be
		</para>
		<para>
			1. unix+/path/to/socket/file
		</para>
		<para>
			2. [tcp+]IP|hostname|\[IPv6\][:port]
		</para>
		<para>
			Note the restriction on naming a IPv6 host, it follows
			the same restriction that is based on IPv6 naming in
			URL as per RFC 2732.
		</para>
		</listitem>
		</varlistentry>

		<varlistentry>
		<term>glusterfs:volume = volumename</term>
		<listitem>
		<para>
			Defines the glusterfs volumename to use for this share.
		</para>
		</listitem>

		</varlistentry>
	</variablelist>

</refsect1>

<refsect1>
	<title>CAVEATS</title>

	<para>
                The GlusterFS write-behind performance translator, when used
                with Samba, could be a source of data corruption. The
                translator, while processing a write call, immediately returns
                success but continues writing the data to the server in the
                background. This can cause data corruption when two clients
                relying on Samba to provide data consistency are operating on
                the same file.
        </para>
        <para>
                The write-behind translator is enabled by default on GlusterFS.
                The vfs_glusterfs plugin will check for the presence of the
                translator and refuse to connect if detected.
                Please disable the write-behind translator for the GlusterFS
                volume to allow the plugin to connect to the volume.
                The write-behind translator can easily be disabled via calling
                <programlisting>
                        gluster volume set &lt;volumename&gt; performance.write-behind off
                </programlisting> on the commandline.
	</para>
        <para>
                With GlusterFS versions >= 9, we silently bypass write-behind
                translator during initial connect and failure is avoided.
        </para>

</refsect1>


<refsect1>
	<title>VERSION</title>

	<para>
		This man page is part of version &doc.version; of the Samba suite.
	</para>
</refsect1>

<refsect1>
	<title>AUTHOR</title>

	<para>The original Samba software and related utilities
	were created by Andrew Tridgell. Samba is now developed
	by the Samba Team as an Open Source project similar
	to the way the Linux kernel is developed.</para>

</refsect1>

</refentry>