• Documentation
  • Contact
  • About
  • Developers
  • Download

Gluster 3.1: Setting Volume Options

From GlusterDocumentation

You can set volume options, as needed, while the cluster is online and available.

To set volume options

  • Set volume options using the following command:

    # gluster volume set VOLNAME OPTION PARAMETER

    The following lists the options you can set:
cluster.self-heal-window-size         ( 0 < data-self-heal-window-size < 1025)      ( full/diff )
cluster.stripe-block-size             ( list such as : "*.jpg:1,abc*:2" )
diagnostics.brick-log-level           ( DEBUG|WARNING|ERROR|CRITICAL|NONE|TRACE )
diagnostics.client-log-level          ( DEBUG|WARNING|ERROR|CRITICAL|NONE|TRACE )
performance.cache-max-file-size       ( size in bytes )
performance.cache-min-file-size       ( size in bytes )
performance.cache-refresh-timeout     ( 0 < cache-timeout < 61 )
performance.flush-behind              ( on/off )           ( 0 < io-threads < 65 )
performance.write-behind-window-size  ( Write-behind cache size )
auth.allow                            ( valid IP address which includes wild card               
auth.reject                             patterns including *, such as 192.168.1.* )
nfs.enable-ino32                      ( on/off )
nfs.mem-factor                        ( integer, default is 15 )

For example, to specify the performance cache size for test-volume:

# gluster volume set test-volume performance.cache-size 256MB
Set volume successful

The following table lists the Volume options along with its description and default value:

Note: The default options given here are hard coded in the source file and is subject to modification at any given time. The following default values may not be the same for all versions.

Option Description Default Value
Specifies the number of maximum number blocks per file for which self-heal process would be applied simultaneously. 16
Selects between "full", "diff", and reset. The "full" algorithm copies the entire file from source to sinks. The "diff" algorithm copies to sinks only those blocks whose checksums don't match with those of source. Reset uses a heuristic model.

If the file does not exist on one of the subvolumes, or a zero-byte file exists (created by entry self-heal) the entire content has to be copied anyway, so there is no benefit from using the "diff" algorithm.

If the file size is about the same as page size, the entire file can be read and written with a few operations, which will be faster than "diff" which has to read checksums and then read and write.

Specifies the size of the stripe unit that will read from or written to the striped servers.

Optionally different stripe unit sizes can be specified for different files, with the following pattern <filename-pattern:blk-size>.

128 KB (for all files)
Changes the log-level of the bricks. NORMAL
Changes the log-level of the clients. NORMAL
Sets the maximum file size cached by the io-cache translator. Can use the normal size descriptors of KB,MB,GB,TB or PB (ie. 6GB). Maximum size uint64. 18,446,744,073,709,551,615B
Sets the minimum file size cached by the io-cache translator. Same as "max" above. 0B
The cached data for a file will be retained till 'cache-refresh-timeout' seconds, after which data re-validation is performed. 1 sec
network.frame-timeout The time frame after which the operation has to be declared as dead, if the server does not respond for a particular operation. 1800 (30 mins) The time duration for which the client waits to check if the server is responsive. 42 secs
auth.allow 'IP addresses/Host name' of the clients which should be allowed to access the the volume. * (allow all)
auth.reject 'IP addresses/Host name' of the clients which should be denied to access the volume. NONE (reject none)
performance.cache-size Size of the read cache. 32 MB
performance.write-behind-window-size Size of the per-file write-behind buffer. 1 MB
diagnostics.latency-measurement Statistics related to the latency of each operation would be tracked inside GlusterFS data-structures. off
diagnostics.dump-fd-stats Statistics related to file-operations would be tracked inside GlusterFS data-structures. off
For 32-bit nfs clients or applications that do not support 64-bit inode numbers or large files. Use this

option from the CLI to make Gluster NFS return 32-bit inode numbers instead. Applications that will benefit are those that were either:

  • Built 32-bit and run on 32-bit machines.
  • Built 32-bit on 64-bit systems.
  • Built 64-bit but use a library built 32-bit, especially relevant for python and perl scripts.

This option is disabled by default so NFS returns 64-bit inode numbers by default. Either of the conditions above can lead to application on Linux NFS clients failing with "Invalid argument" or "Value too large for defined data type" errors.


See also: Undocumented Volume Options


Copyright © Gluster, Inc. All Rights Reserved.