Skip to main content

Share Configuration

VFS

The configuration strings for VFS are as the follows:

  • <type> – VFS type label.
  • <parameter=value> – The list of parameters for VFS of specified type.
vfs = <type>:[<parameter=value>]

Available VFS types:

  • libc (default VFS)
  • module

Optional parameters supported by all VFS types:

  • force_sync – Opens each file in O_SYNC mode, so guarantee that every write will be flushed to the disk before the exit. This option drops the performance significantly, but on active/passive cluster this is essential.

  • nodirect – Ignores the SMB client’s request to perform direct (unbuffered) I/O. If an application on a client opens files without file system buffering (FILE_NO_IMMEDIATE_BUFFERING on Windows, F_NOCACHE on Mac or O_DIRECT on Linux) then this is propagated as a flag via the SMB protocol. To ignore this flag you need to specify this ‘nodirect’ option. This option may increase or decrease performance at the cost of not respecting the SMB client’s request.

    Use it with caution.

Example:

vfs = libc:force_sync,nodirect

VFS type ‘module’ supports loading shared-object based external modules as a VFS layer for interacting with the underlying filesystem, which allows development of custom private VFS layers.

Mandatory parameters for VFS type ‘module’:

  • name - Name of the VFS layer, as defined by the shared object itself.
  • path - Path to the shared object, or the name of the shared object provided that it is located in one of the linker search directories.

Each shared object may define other optional parameters in addition to those previously mentioned.

vfs = module:name=<name>,path=<path>[,<parameter=value>]

GPFS VFS module

A custom VFS layer for IBM Spectrum® Scale (GPFS) included in the delivery can be loaded by configuring:

vfs = module:name=gpfs,path=path/to/tsmb_vfs_gpfs.so

To enable native support for Windows File Attributes (stored as GPFS winAttrs) and Windows Access Control Lists (stored as GPFS ACLs), following options must be specified in share configuration:

[share]
...
vfs = module:name=gpfs,path=path/to/tsmb_vfs_gpfs.so
map_attributes = native
map_acls = native
...
[/share]

For more details on these additional configuration options, see sections Windows File Attributes and Windows Access Control Lists of this document.

VFS Threads

The following options can be used to configure the number of threads in the share’s pool, available for metadata and data operations respectively.

For metadata operations:

Default:

vfs_metadata_threads = 1

For data operations:

Default:

vfs_data_threads = 1

To configure a generic pool of threads, rather than two separate pools for metadata or data operations, set one of the either configuration options namely, ‘vfs_metadata_threads’ or ‘vfs_data_threads’ as zero (0).

If both the above configuration options are set to 0, then this share will make use of the global thread pool for VFS.

Client-side caching (Oplocks and Leases)

A boolean, if set, indicates whether the server will allow a client to place opportunistic locks (oplocks) on remote files on a specific share. These locks are used by the client to cache data and file handles locally.

enable_oplock = [true | false]

Allowing SMB clients to cache data locally, the server can drastically decrease the latency while accessing a file.

If both the global and share options are set for this configuration option, then the share configuration will take precedence.

Default:

enable_oplock = true

Level 2 Oplocks

This boolean, controls whether the server only issues a read-only (Level 2) oplocks to the SMB clients.

force_level2oplock = [true | false]

In environments which may involve no write access but mostly read-only access to file, this option can increase performance. This option is only applicable when either the global or share configuration option is set to:

enable_oplock = true

For more information on oplocks and leases, refer to [MS-SMB2] or [MS-SMB] or File Systems behavior Overview document [FSBO] provided by Microsoft.

By default:

force_level2oplock = false

Zero-Copy Write

This option controls the way Fusion File Share processes write requests from a client. When enabled and if the underlying VFS supports it, then Fusion File Share attempts to perform zero-copy writes from network socket buffers to file-system page-cache pages (buffers).

Enabling this option may improve performance and so this option should be tested for any real-world performance benefits. If explicitly disabled, Fusion File Share falls back to performing the conventional read from socket to buffer and write from buffer to file mechanism for write requests from client.

This option will have no effect on compounded messages, signed, and encrypted connections.

Default:

vfs_zerocopy_write = true

Zero-Copy Read

This option controls the way Fusion File Share processes read requests from a client. When enabled and if the underlying filesystem supports it, then Fusion File Share will perform zero-copy reads from the filesystem’s page-cache pages (buffers) to the network socket buffers using filesystem-specific zero-copy read method e.g., linux-specific sendfile().

Otherwise, if disabled, Fusion File Share falls back to performing the conventional read/write approach, where data is read from file to buffer and written from buffer to socket when a client attempts to read a file.

Zero-copy read is disabled, if a received read request is compounded, signed and/or encrypted.

Default:

vfs_zerocopy_read = true

Case Insensitive Filenames

You may enable case insensitivity for a share. Please note that this option may not be included in your release.

Default: false.

case_insensitive = true
important

You have to be careful with this option. Use it only if you really need case insensitive share, otherwise keep it case sensitive. Case insensitivity can drop the performance of metadata tests (creating a lot of files/directory trees).

Fallocate

You may enable and use the following two options to specify a range of values for which to invoke fallocate() system call on creating a file or setting file allocation. Each of these configuration options can have the value from 0 to 261 − 1 (UINT64_MAX).

  • vfs_fallocate_min – Minimum value (in bytes) in the range of allowed values for allocation.
  • vfs_fallocate_max – Maximum value (in bytes) in the range of allowed values for allocation. The options call fallocate() when the desired size of allocation is in range [vfs_fallocate_min, vfs_fallocate_max].

Default:

vfs_fallocate_min = 0
vfs_fallocate_max = 0

By default, Fusion File Share does not fallocate size for files, but sometimes it may improve performance.