-This is the CIFS VFS support for Linux. It supports many advanced network filesystem
-features such as heirarchical dfs like filesystem, hardlinks, locking and more.
+The CIFS VFS support for Linux supports many advanced network filesystem
+features such as heirarchical dfs like namespace, hardlinks, locking and more.
It was designed to comply with the SNIA CIFS Technical Reference (which supersedes
the 1992 X/Open SMB Standard) as well as to perform best practice practical
interoperability with Windows 2000, Windows XP, Samba and equivalent
Build instructions:
==================
-Get the kernel source e.g. http://linux.bkbits.net/linux-2.5 or http://www.kernel.org
-http://cifs.bkbits.net/linux-2.4
-make menuconfig (or make xconfig)
-select cifs from within the network filesystem choices
-save and exit
-make dep
-make modules (or "make" if you did not select CIFS VFS to be built as a module)
+For Linux 2.4:
+1a) Get the linux kernel source with cifs vfs already in it
+from bitkeeper via bk://cifs.bkbits.net/linux-2.4
+or
+1b) Get the kernel source (e.g.from http://www.kernel.org)
+and download the cifs vfs source (see the project page
+at http://us1.samba.org/samba/Linux_CIFS_client.html)
+and change directory into the top of the kernel directory
+then patch the kernel (e.g. "patch -p1 < cifs_24.patch")
+to add the cifs vfs to your kernel configure options if
+it has not already been added (e.g. current SuSE and UL
+users do not need to do not need that patch since the cifs vfs is
+already in the kernel configure menu) and then
+mkdir linux/fs/cifs and then copy the current cifs vfs files from
+the cifs download to your kernel build directory e.g.
+ cp <cifs_download_dir>/fs/cifs/* to <kernel_download_dir>/fs/cifs
+2) make menuconfig (or make xconfig)
+3) select cifs from within the network filesystem choices
+4) save and exit
+5) make dep
+6) make modules (or "make" if CIFS VFS not to be built as a module)
+
+For Linux 2.5:
+1) Download the kernel (e.g. from http://www.kernel.org or from bitkeeper
+at bk://linux.bkbits.net/linux-2.5) and change directory into the top
+of the kernel directory tree (e.g. /usr/src/linux-2.5.73)
+2) make menuconfig (or make xconfig)
+3) select cifs from within the network filesystem choices
+4) save and exit
+5) make
+
Installation instructions:
=========================
-If you have built the CIFS vfs as module (successfully)you
-simply type "make modules_install" (or if you prefer manually copy the file to
+If you have built the CIFS vfs as module (successfully) simply
+type "make modules_install" (or if you prefer, manually copy the file to
the modules directory e.g. /lib/modules/2.4.10-4GB/kernel/fs/cifs/cifs.o).
If you have built the CIFS vfs into the kernel itself, follow the instructions
for your distribution on how to install a new kernel (usually you
would simply type "make install").
-If you do not have the utility mount.cifs (in the Samba 3.0 source tree and on the
-CIFS VFS web site) copy it to the directory /sbin (or the same directory in which
-mount.smbfs resides). Although no helper software is required, the installation
-of mount.cifs is recommended. Eventually the Samba 3.0 utility program "net"
+If you do not have the utility mount.cifs (in the Samba 3.0 source tree and on
+the CIFS VFS web site) copy it to the same directory in which mount.smbfs and
+similar files reside (usually /sbin). Although the helper software is required,
+mount.cifs is recommended. Eventually the Samba 3.0 utility program "net"
may also be helpful since it may someday provide easier mount syntax for users used
to Windows e.g.
net use <mount point> <UNC name or cifs URL>
-and there will likely be other helper programs available ala smbmount to provide
-additional optional function in the future. Note that running Winbind on all
-of your Linux clients is useful in mapping Uids and Gids consistently to the
-proper network user.
+Note that running Winbind on all of your Linux clients is useful in
+in mapping Uids and Gids consistently to the proper network user.
Samba Considerations
====================
To get the maximum benefit from the CIFS VFS, we recommend using a server that
-supports the SNIA CIFS Unix Extensions standard (e.g. Samba 2.2.5 or Samba 3.0)
-but the CIFS vfs works fine with a wide variety of CIFS servers. Note that the
-uid, gid and file permissions will display default values if you do not have
-a server that supports the Unix extensions for CIFS (such as Samba 2.2.3 or
+supports the SNIA CIFS Unix Extensions standard (e.g. Samba 2.2.5 or later or
+Samba 3.0) but the CIFS vfs works fine with a wide variety of CIFS servers.
+Note that uid, gid and file permissions will display default values if you do
+not have a server that supports the Unix extensions for CIFS (such as Samba 2.2.3 or
later). To enable the Unix CIFS Extensions in the Samba server, add the line:
unix extensions = yes
to your smb.conf file on the server. Note that the following smb.conf settings are
"Netbios-Over-TCP/IP." Neither of these is likely to be a problem as most servers
support this. IPv6 support is planned for the future.
+CIFS VFS Mount Options
+======================
+A partial list of the supported mount options follows:
+ user The user name to use when trying to establish
+ the CIFS session.
+ password The user password. If the mount helper is
+ installed, the user will be prompted for password
+ if it is not supplied.
+ ip The ip address of the target server
+ unc The target server Universal Network Name (export) to
+ mount.
+ domain Set the SMB/CIFS workgroup name prepended to the
+ username during CIFS session establishment
+ uid If CIFS Unix extensions are not supported by the server
+ this overrides the default uid for inodes.
+ gid If CIFS Unix extensions are not supported by the server
+ this overrides the default gid for inodes.
+ file_mode If CIFS Unix extensions are not supported by the server
+ this overrides the default mode for file inodes.
+ dir_mode If CIFS Unix extensions are not supported by the server
+ this overrides the default mode for directory inodes.
+ port attempt to contact the server on this tcp port, before
+ trying the usual ports (port 445, then 139).
+ rsize default read size
+ wsize default write size
+ rw mount the network share read-write (note that the
+ server may still consider the share read-only)
+ ro mount network share read-only
+ version used to distinguish different versions of the
+ mount helper utility (not typically needed)
+
Misc /proc/fs/cifs Flags and Debug Info
=======================================
-Various experimental features and tracing can be enabled by changing flags in /proc/fs/cifs (after
-the cifs module has been installed or built into the kernel, e.g. insmod cifs). To enable
-a feature you can set it to 1 e.g. to enable tracing to the kernel message log you can do
-"echo 1 > /proc/fs/cifs/cifsFYI" and "echo 1 > /proc/fs/cifs/traceSMB"
-Also note that "cat /proc/fs/cifs/DebugData" will display some information about the currently
-active sessions and the shares that are mounted. Currently the ntlmv2 enablement and packet
-signing will not work since they the implementation is not quite complete, so do not enable
+Informational pseudo-files:
+ DebugData Displays information about active CIFS sessions
+ SimultaneousOps Counter which holds maximum number of
+ simultaneous outstanding SMB/CIFS requests.
+ Stats Lists summary resource usage information
+
+Configuration pseudo-files:
+ MultiuserMount If set to one, more than one CIFS session to
+ the same server ip address can be established
+ if more than one uid accesses the same mount
+ point and if the uids user/password mapping
+ information is available. (default is 0)
+ PacketSigningEnabled If set to one, cifs packet signing is enabled
+ (default 0)
+ cifsFYI If set to one, additional debug information is
+ logged to the system error log. (default 0)
+ ExtendedSecurity If set to one, SPNEGO session establishment
+ is allowed which enables more advanced
+ secure CIFS session establishment (default 0)
+ NTLMV2Enabled If set to one, more secure password hashes
+ are used when the server supports them and
+ when kerberos is not negotiated (default 0)
+ traceSMB If set to one, debug information is logged to the
+ system error log with the start of smb requests
+ and responses (default 0)
+ LookupCacheEnable If set to one, inode information is kept cached
+ for one second improving performance of lookups
+ (default 1)
+ OplockEnabled If set to one, safe distributed caching enabled.
+
+These experimental features and tracing can be enabled by changing flags in /proc/fs/cifs
+(after the cifs module has been installed or built into the kernel, e.g. insmod cifs).
+To enable a feature set it to 1 e.g. to enable tracing to the kernel message log
+type:
+ echo 1 > /proc/fs/cifs/cifsFYI
+and for more extensive tracing including the start of smb requests and responses
+ echo 1 > /proc/fs/cifs/traceSMB
+Also note that "cat /proc/fs/cifs/DebugData" will display some information about the
+active sessions and the shares that are mounted. NTLMv2 enablement and packet
+signing will not work since they the implementation is not quite complete. Do not enable
these flags unless you are doing specific testing. Enabling extended security works to
Windows 2000 Workstations and XP but not to Windows 2000 server or Samba since it does not
usually send "raw NTLMSSP" (instead it sends NTLMSSP encapsulated in SPNEGO/GSSAPI, which
-version 0.6.5 February 15, 2003
+version 0.8.1 July 4th, 2003
A Partial List of Known Problems and Missing Features
=====================================================
e) NTLMv2 authentication and MD5-HMAC signing SMB PDUs - (mostly implemented)
signing necessary for some Windows 2003 servers in domain
- controller mode.
+ mode.
-f) oplock support (ie safe CIFS distributed file caching) is not quite complete.
-In addition Directory entry caching relies on a 1 second timer, rather than
+f) Directory entry caching relies on a 1 second timer, rather than
using FindNotify or equivalent. - (started)
g) There may be a few additional changes that could be done to take advantage
n) send oplock break response when sent (oplock currently disabled in
/proc/fs/cifs)
-o) remove calls to set end of file by name when we already have file open
-(use the existing handle since some servers only support that and it
-reduces the oplock breaks coming from windows). Piggyback identical
+o) reduces the oplock breaks coming from windows). Piggyback identical
file opens on top of each other by incrementing reference count rather
than resending (helps reduce server resource utilization and avoid
spurious oplock breaks).
+p) Improve performance of readpages by sending more than one read
+at a time when 8 pages or more are requested.
-KNOWN BUGS (updated May 16, 2003)
+
+KNOWN BUGS (updated July 4th, 2003)
====================================
1) existing symbolic links (Windows reparse points) are recognized but
can not be created remotely. They are implemented for Samba and those that
1) check out max path names and max path name components against various server
types.
-2) Run dbench
+2) Run dbench. Modify file portion of ltp so it can run against a mounted network
+share and run it against cifs vfs.
-3) Finish high stress fsx testing on SMP clients
+3) Additional performance testing and optimization using iozone and similar tools.
-4) Additional performance testing and optimization