Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP CIFS Server 3.0g Administrator's Guide version A.02.03.01: HP-UX 11i v1, v2 and v3 > Chapter 2 Installing and Configuring the HP CIFS Server

Other Samba Configuration Issues

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

Translate Open-Mode Locks into HP-UX Advisory Locks

The HP CIFS Server A.02.* versions can translate open mode locks into HP-UX advisory locks. This functionality prevents HP-UX processes from obtaining advisory locks on files with conflicting open mode locks from CIFS clients. This also means CIFS clients cannot open files that have conflicting advisory locks from HP-UX processes.

You must change the map share modes setting in smb.conf to yes to translate open mode locks to HP-UX advisory locks. The default setting of map share modes is no.

Performance Tuning using Change Notify

This section describes performance tuning using the Change Notify feature and internationalization.

The Samba Server supports a new feature called Change Notify. Change Notify provides the ability for a client to request notification from the server when changes occur to files or subdirectories below a directory on a mapped file share. When a file or directory which is contained within the specified directory is modified, the server notifies the client. The purpose of this feature is to keep the client screen display up-to-date in Windows Explorer. The result: if a file you are looking at in Windows Explorer is changed while you are looking at it, you will see the changes on the screen almost immediately.

The only way to implement this feature in Samba is to periodically scan through every file and subdirectory below the directory in question and check for changes made since the last scan. This is a resource intensive operation which has the potential to affect the performance of Samba as well as other applications running on the system. Two major factors affect how resource intensive a scan is: the number of directories having a Change Notify request on them, and the size of those directories. If you have many clients running Windows Explorer (or other file browsers) or if you have directories on shares with a large number of files and/or subdirectories, each scan cycle might be very CPU intensive.

To counteract the possible performance impact, you can control how often Samba scans for changes in the directories it has been requested to monitor. The parameter that controls how often Samba scans for changes is Change Notify Timeout. The parameter value represents the number of seconds between the start of each scanning cycle. The default value is 60. So, if your system takes 55 seconds to complete the scan of all the directories with Change Notify requests, it would be under a heavy load at nearly all times.You can increase the Change Notify Timeout value to a larger number to decrease how often these Change Notify directory scans are done. The trade off is that your clients will take longer to see that changes were made in the directories that they have placed Change Notify requests on. You will have to decide what the right trade-off is: performance loss or slow updates to client file browsers.

Special Concerns when Using HP CIFS Server on a Network File System (NFS) or a Clustered File System (CFS)

Both NFS and CFS provide file system access to unique file storage from multiple systems. However, controlling access to files, particularly files open for write access, from multiple systems poses challenges. Applications are not necessarily network or cluster-aware. Applications may not be able to make use of locking mechanisms when multiple systems are involved. You need to be aware of the following things when using HP CIFS Server in either an NFS or a Veritas CFS environment:

  • CIFS Server running simultaneously on multiple nodes should not use either NFS or Veritas CFS to concurrently share the smb.conf configuration and its subordinate CIFS system files in /var/opt/samba/locks and /var/opt/samba/private.

    There are operational reasons why multiple nodes should not share a configuration file concurrently such a name/IP registration conflicts, etc. Also, sharing ansmb.conf file will likely lead to sharing CIFS Server system data, increasing the likelihood of concurrent file access and the possibility of CIFS Server corruption.

  • Beginning with version A.02.02, HP CIFS Server does not start if another master daemon is sharing the daemon PID files including a daemon on another node. (By default, PID files are found in the /var/opt/samba/lock path). CIFS does this to prevent the problems with sharing the CIFS Server configuration as discussed above.

  • Avoid using HP CIFS Server to share Veritas CFS directories simultaneously on multiple nodes.

    Since NFS and Veritas CFS provides for multiple nodes to read and write the same files concurrently, you should use extra caution when configuring HP CIFS Server on multiple nodes since most locking mechanisms do not span across multiple nodes. Simultaneous file access can lead to data corruption if multiple producers overwrite each others work.

  • The smb.conf parameter strict locking may be set to yes to prevent data corruption but it may also lead to decrease performance.

    By default, since HP CIFS Server provides access to files from multiple clients (and from multiple nodes sharing an NFS or a Veritas CFS), there is the possibility of concurrent file access and hence at least a remote chance of data corruption. Therefore, HP CIFS Server provides a "strict locking" mechanism that can be enabled to prevent concurrent file access. When strict locking is set toyes in smb.conf, the server checks every read and write access for file locks, and denies access if locks exist. Since this check will be slow on some systems and well behaved clients do ask for lock checks when it is important, HP recommends that you set strict locking to no in smb.conf for most environments. The default value for strict locking is no.

NetBIOS Names Are Not Supported on Port 445

HP CIFS Server A.02.* versions (based and Samba 3.0.x) can accept connections on port 445 as well as the original port 139. However, since port 445 connections are for SMB over TCP and do not support the NetBIOS protocol. NetBIOS names are not supported on port 445. This means features of Samba that depend on NetBIOS will not work. For example, the "virtual server" technique depending on an "include = /etc/opt/samba/smb.conf.%L" which ends up referring to another smb.conf.<netbios name> will not work.

You can use the smb.conf parametersmb ports to specify which ports the server should listen on for SMB traffic. Set smb ports to 139 to disable port 445. By default, smb ports is set to 445 139.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2007 Hewlett-Packard Development Company, L.P.