11.5 Miscellaneous Options

   

Many Samba options are available to deal with operating system issues on either Unix or Windows. In particular, some of these options are used for setting limits for clients ' use of resources on the Unix server. The options shown in Table 11-9 deal with some of these issues.

Table 11-9. Miscellaneous options

Option

Parameters

Function

Default

Scope

deadtime

numeric (minutes)

Number of minutes of inactivity before a connection should be terminated .

Global

dfree command

string (command)

Used to specify a command that returns free disk space in a format recognized by Samba.

None

Global

fstype

NTFS , FAT , or Samba

Filesystem type reported by the server to the client.

NTFS

Global

keepalive

numeric (seconds)

Number of seconds between checks for an inoperative client.

300 (none)

Global

max disk size

numeric (MB)

Largest disk size to return to a client, some of which have limits. Does not affect actual operations on the disk.

(infinity)

Global

max mux

numeric

Maximum number of simultaneous SMB operations that clients can make.

50

Global

max open files

numeric

Limits number of open files to be below Unix limits.

10000

Global

max xmit

numeric

Specifies the maximum packet size that Samba will send.

65535 or 16644

Global

nt pipe support

Boolean

Turns off an NT/2000/XP support feature; for benchmarking or in case of an error.

yes

Global

nt smb support

Boolean

Turns off an NT/2000/XP support feature; for benchmarking or in case of an error.

yes

Global

ole locking compatibility

Boolean

Remaps out-of-range lock requests used on Windows to fit in allowable range on Unix. Turning it off causes Unix lock errors.

yes

Global

panic action

string

Command to run if Samba server fails; for debugging.

None

Global

set directory

Boolean

If yes , allows VMS clients to issue set dir commands.

no

Global

status

Boolean

If yes , allows Samba to monitor status for smbstatus command.

yes

Global

strict sync

Boolean

If no , ignores Windows application requests to perform a sync-to-disk.

no

Global

sync always

Boolean

If yes , forces all client writes to be committed to disk before returning from the call.

no

Global

strip dot

Boolean

If yes , strips trailing dots from Unix filenames.

no

Global

change notify timeout

numeric (seconds)

Interval between checks when a client asks to wait for a change in a specified directory.

60

Global

stat cache

Boolean

If yes , Samba will cache recent name mappings.

yes

Global

stat cache size

numeric

Number of entries in the stat cache.

50

Global

11.5.1 deadtime

This global option sets the number of minutes that Samba will wait for an inactive client before closing its session with the Samba server. A client is considered inactive when it has no open files and no data is being sent from it. The default value for this option is 0, which means that Samba never closes any connection, regardless of how long they have been inactive. This can lead to unnecessary consumption of the server's resources by inactive clients. We recommend that you override the default as follows :

 [global]     deadtime = 10 

This tells Samba to terminate any inactive client sessions after 10 minutes. For most networks, setting this option as such will not inconvenience users because reconnections from the client are generally performed transparently to the user . See also the keepalive parameter.

11.5.1.1 dfree command

This global option is used on systems that incorrectly determine the free space left on the disk. So far, the only confirmed system that needs this option set is Ultrix. There is no default value for this option, which means that Samba already knows how to compute the free disk space on its own and the results are considered reliable. You can override it as follows:

 [global]     dfree command = /usr/local/bin/dfree 

This option should point to a script that returns the total disk space in a block and the number of available blocks. The Samba documentation recommends the following as a usable script:

 #!/bin/sh df   tail -1  awk '{print " "}' 

On System V machines, the following will work:

 #!/bin/sh /usr/bin/df   tail -1  awk '{print " "}' 
11.5.1.2 fstype

This share-level option sets the type of filesystem that Samba reports when queried by the client. Three strings can be used as a value to this configuration option, as listed in Table 11-10.

Table 11-10. Filesystem types

Value

Definition

NTFS

Microsoft Windows NT filesystem

FAT

DOS FAT filesystem

Samba

Samba filesystem

The default value for this option is NTFS , which represents a Windows NT filesystem. There probably isn't a need to specify any other type of filesystem. However, if you need to, you can override the default value per share as follows:

 [data]     fstype = FAT 
11.5.1.3 keepalive

This global option specifies the number of seconds that Samba waits between sending NetBIOS keepalive packets . These packets are used to ping a client to detect whether it is still alive and on the network. The default value for this option is 300 (5 minutes), which you can override as follows:

 [global]     keepalive = 600 

The value of 600 (10 minutes) is good for networks populated by reliable clients. If your network contains relatively unreliable clients, you might prefer to set keepalive to a lower value, such as 30 . If keepalive is set to 0, no NetBIOS keepalive packets will be sent. See also the deadtime parameter.

11.5.1.4 max disk size

This global option specifies an illusory limit, in megabytes, for each share that Samba is offering. It only affects how much disk space Samba reports the share as having and does not prevent more disk space from actually being available for use. You would typically set this option to prevent clients with older operating systems ”or running buggy applications ”from being confused by large disk spaces. For example, some older Windows applications become confused when they encounter a share larger than 1 gigabyte. To work around this problem, max disk size can be set as follows:

 [global]     max disk size = 1000 

The default value for this option is , which means there is no upper limit.

11.5.1.5 max mux

This global option specifies the maximum number of concurrent SMB operations Samba allows. The default value for this option is 50 . You can override it as follows:

 [global]     max mux = 100 
11.5.1.6 max open files

This global option specifies the maximum number of open files that Samba should allow at any given time for all processes. This value must be equal to or less than the amount allowed by the operating system, which varies from system to system. The default value for this option is 10000 . You can override it as follows:

 [global]     max open files = 8000 
11.5.1.7 max xmit

This global option sets the maximum size of packets that Samba exchanges with a client. In rare cases, setting a smaller maximum packet size can increase performance, especially with Windows for Workgroups. In Samba versions up to 2.2.5, the default value for this option is 65535 . In 2.2.7 and later versions, the default was changed to 16644 to match the behavior of Windows 2000 and improve support for Windows NT 4.0. You can override the default as follows:

 [global]     max xmit = 4096 
11.5.1.8 nt pipe support

This global option is used by developers to allow or disallow Windows NT/2000/XP clients the ability to make connections to NT-specific SMB IPC$ pipes. As a user, you should never need to override the default:

 [global]     nt pipe support = yes 
11.5.1.9 nt smb support

This global option is used by developers to negotiate NT-specific SMB options with Windows NT/2000/XP clients. The Samba Team has discovered that slightly better performance comes from setting this value to no . However, as a user, you should probably not override the default:

 [global]     nt smb support = yes 
11.5.1.10 ole locking compatibility

This global option turns off Samba's internal byte-range locking manipulation in files, which gives compatibility with Object Linking and Embedding (OLE) applications that use high byte-range locks as a method of interprocess communication. The default value for this option is yes . If you trust your Unix locking mechanisms, you can override it as follows:

 [global]     ole locking compatibility = no 
11.5.1.11 panic action

This global option specifies a command to execute in the event that Samba encounters a fatal error when loading or running. There is no default value for this option. You can specify an action as follows:

 [global]     panic action = /bin/csh -c           'xedit <<: "Samba has shutdown unexpectedly";:' 
11.5.1.12 set directory

This Boolean share-level option allows Digital Pathworks clients to use the setdir command to change directories on the server. If you are not using the Digital Pathworks client, you should not need to alter this option. The default value for this option is no . You can override it per share as follows:

 [data]     set directory = yes 
11.5.1.13 status

This global option indicates whether Samba should log all active connections to a status file. This file is used only by the smbstatus command. If you have no intentions of using this command, you can set this option to no , which can result in a small increase of speed on the server. The default value for this option is yes . You can override it as follows:

 [global]     status = no 
11.5.1.14 strict sync

This share-level option determines whether Samba honors all requests to perform a disk sync when requested to do so by a client. Many Windows clients request a disk sync when they are really just trying to flush data to their own open files. In this case, a disk sync is generally unnecessary on Unix due to its high reliability, and it mostly has the effect of substantially reducing the performance of the Samba host system. The default value for this option is no , which allows the superfluous disk sync requests to be ignored. You can override the default as follows:

 [data]     strict sync = yes 
11.5.1.15 sync always

This share-level option decides whether every write to disk should be followed by a disk synchronization before the write call returns control to the client. Even if the value of this option is no , clients can request a disk synchronization; see the earlier strict sync option. The default value for this option is no . You can override it per share as follows:

 [data]     sync always = yes 
11.5.1.16 strip dot

This global option determines whether to remove the trailing dot from Unix filenames that are formatted with a dot at the end. The default value for this option is no . You can override it per share as follows:

 [global]     strip dot = yes 
11.5.1.17 change notify timeout

The change notify timeout global option emulates a Windows NT/2000 SMB feature called change notification . This allows a client to request that a Windows NT/2000 server periodically monitor a specific directory on a share for any changes. If changes occur, the server will notify the client.

Samba performs this function for its clients at an interval that defaults to 1 minute (60 seconds). Performing these checks too often can slow down the server considerably; however, you can use this option to specify an alternate time that Samba should wait between performing checks:

 [global]     change notify timeout = 30 
11.5.1.18 stat cache

The stat cache global option turns on caching of recent case-insensitive name mappings. The default is yes . The Samba Team recommends that you never change this parameter.

11.5.1.19 stat cache size

The stat cache size global option sets the number of cache entries to be used for the stat cache option. The default here is 50 . Again, the Samba Team recommends that you never change this parameter.

   


Using Samba
Using Samba: A File and Print Server for Linux, Unix & Mac OS X, 3rd Edition
ISBN: 0596007698
EAN: 2147483647
Year: 2003
Pages: 475

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net