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
11.5.1 deadtimeThis 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 commandThis 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 fstypeThis 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
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 keepaliveThis 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 sizeThis 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 muxThis 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 filesThis 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 xmitThis 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 supportThis 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 supportThis 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 compatibilityThis 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 actionThis 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 directoryThis 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 statusThis 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 syncThis 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 alwaysThis 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 dotThis 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 timeoutThe 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 cacheThe 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 sizeThe 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. |