smbctune Command

Purpose

Sets and displays the tunable parameters for the mount operations of the Server Message Block (SMB) client file system.

Syntax

smbctune [ -l | -f ] | [ [ -p ] -s smbc_tunable_parameter1=value smbc_tunable_parameter2=value …]

Description

You can run this command with the -s flag to set new values for the tunable parameters by specifying the tunable parameters as an argument. When you set new values for the tunable parameters, the smbctune command updates the kernel with new values of the tunable parameters. If you use -p flag along with the -s flag, the smbctune command updates the /etc/smbc/smbctune.conf file with new values to make tunable parameters persistent. This file is used when logical partition starts and initializes the SMB client subsystem.

When you do not specify the pver, signing, secure_negotiate, and encryption parameters with the mount command by using the -o flag, default values are used from the tunable parameter values in the kernel that are read from the smbctune.conf file or set by using the smbctune command.

Flags

-f
Displays the tunable parameter values that are specified in the /etc/smbc/smbctune.conf file.
-l
Displays the tunable parameter values that are specified in the kernel.
-p
Makes the tunable parameter values persistent by writing values to /etc/smbc/smbctune.conf file. Should be used only along with -s.
-s smbc_tunable_parameter=value
Sets specified values to specified tunable parameters. You can update multiple tunable parameters in a single command. You must not specify any negative values.
smbc_max_concurrent_mount
Specifies the maximum number of concurrent authentications that the smbcd daemon can perform at a time. This value indicates the threshold limit for the number of concurrent mount operations that can be processed at a time. When you set a new value to this tunable parameter, the smbctune command refreshes the smbcd daemon so that the corresponding value in the userspace daemon changes accordingly. Valid values for this tunable parameter can be in the range 0-INT_MAX-1. The default value is 0.
smbc_request_timeout
Specifies the amount of time, in seconds, to wait before a request from the SMB client system to the SMB server times out. When this tunable parameter is set to 0, the requests do not expire on the SMB client system. Valid values for this tunable parameter can be in the range 0-INT_MAX-1. The default value for this tunable parameter is 0.
smbc_max_connections
Specifies the maximum number of SMB client connections that can exist with any number of SMB servers. When this tunable parameter is set to 0, the SMB client system can establish unlimited number of connections with the SMB servers. Valid values for this tunable parameter can be in the range 0-INT_MAX-1. This tunable parameter is set to 0 by default.
smbc_lookup_cache_size
Specifies the cache memory size of the SMB client lookup file. This lookup file keeps N file identifiers open so that these identifiers can be reused for lookup operations. The contents of this lookup file is similar to a Least Recently Used (LRU) cache memory that is implemented for each mount operation. The size of cache memory is same for each mount operation of the SMB client systems. The size of the cache memory cannot be a negative value. Valid value for this tunable parameter can be in the range 0-100. The default value is 32 cache entries. You can set a higher value if less number of SMB client systems are connecting to the SMB server.
smbc_krb5_lifetime
Specifies the token expiry time. The SMB client system and the SMB server communicate with each other by using tokens. This token is valid for a specific period. Based on the default values of Kerberos authentication, the token is valid for 10 hours. After that time period, the authenticated session between the SMB client system and SMB server expires and you cannot perform any other operation on the mounted remote share. Token expiry time is saved both in the cache memory of the SMB client credentials and in the token. The duration of the token can be renewed by reauthenticating to the SMB server. You can set this tunable parameter to a value less than 10 hours so that you can reauthenticate to the SMB server before 10 hours. Valid values for this tunable parameter can be in the range 0-INT_MAX-1. The default value is 0.
smbc_krb5_renew_till
Specifies the maximum time in seconds that a token can be reauthenticated to renew the token duration. After this period, the existing token context is deleted, and a new authenticated token context is created and used. Valid values for this tunable parameter can be in the range 0-INT_MAX-1. The default value is 0. Kerberos authentication follows its own default values.
smbc_file_lease_enable
Enables the leasing function in the SMB client file system. By default, this tunable parameter is enabled and is applicable for each SMB client file system.

The SMB client file system can use the file leasing function only when the file leasing function is enabled in the SMB client and in the SMB server systems, and when the SMB server supports the file leasing function. The file leasing function is preferred over the oplock function. The valid values are 1 and 0. You can change the value of this tunable parameter only when SMB client mount points are not available on the SMB client system.

smbc_oplock_enable
Enables the opportunistic locks (oplock) function for the SMB client system. By default, this tunable parameter is enabled and is applicable for each SMB client system.
The SMB client file system can use the oplock function only when the oplock function is enabled in the SMB server and in the SMB client system, and when the file leasing function is disabled in the SMB server or SMB client system. The valid values are 1 and 0. You can change the value of this tunable parameter only when SMB client mount points are not available on the SMB client system.
Note: When the SMB server or the SMB client system disables the file leasing function and the oplock function, the SMB client file system uses direct I/O operations.
smbc_protocol_version
Specifies the version of the SMB protocol that is used to communicate with the SMB server. The valid values are 2.1, 3.0.2, and auto. The default value is auto. For the value, auto, the SMB client protocol version 2.1 or version 3.0.2 is used based on the specified version of the SMB server.
smbc_signing
Specifies whether the file system of SMB client requires digital signature for communication. The valid values are enabled and required. The default value is enabled.
smbc_secure_negotiate
Specifies whether file system of SMB client requires secure dialect negotiation capability. Valid values are desired, required, and disabled. Default value is desired.
smbc_encryption
Specifies whether SMB client file system requires encryption. Valid values are desired, required, and disabled. Default value is desired.
The following table shows few tunable parameters in the smbctune.conf file and their peer options for the mount command.
Tunable parameter of the smbctune.conf file Corresponding mount option Valid tunable parameter values (smbctune.conf file) Default tunable parameter values (smbctune.conf file)
smbc_protocol_version pver 2.1, 3.0.2, auto auto
smbc_signing signing enabled, required enabled
smbc_secure_negotiate secure_negotiate desired, required, disabled desired
smbc_encryption encryption desired, required, disabled desired

Exit status

0
Indicates success.
>0
Indicates error.

Example

  • To set the value of the smbc_max_concurrent_mount tunable parameter to 20, enter the following command:
    /usr/sbin/smbctune -s smbc_max_concurrent_mount=20
  • To update the smbc_max_concurrent_mount tunable parameter value, enter the following command:
    /usr/sbin/smbctune -p -s smbc_max_concurrent_mount=20
    Note: The command also updates the smbctune.conf file, which makes the updates persistent.