HP CIFS Server Administrator Guide Version A.02.04.04 (5070-6710, October 2011)

11 CIFS File System Module (CFSM) Support
This chapter describes the CIFS File System Module (CFSM) support, it contains the following
sections:
Using the CIFS File System Module (CFSM) for Concurrent NFS Client Access
Stacking CFSM
Using CFSM with Other Stackable File System Modules
CFSM Implemented as Dynamically Loadable Kernel Modules (DLKMs)
Special Issues When Using CFSM
CFSM Tracing
Using the CIFS File System Module (CFSM) for Concurrent NFS Client
Access
Due to differences in file locking between CIFS (Windows) environments and POSIX (UNIX)
environments, accessing files from both CIFS clients and NFS clients can create some risks. CIFS
file locks are expected to be enforced, preventing files from being read, written or even renamed
by other clients. In a POSIX environment, file locks typically only prevent other processes from
creating a conflicting file lock, as only file permissions are checked before reading, writing or
renaming a file.
The well behaved POSIX programs should always request a lock on a file if the file is to be accessed
by more than one process concurrently. But there is no guarantee that a POSIX program may not
read, write or rename a file, ignoring any file locks owned by other processes. If these cases were
to happen, it could cause file corruption.
Also, the performance enhancing feature of CIFS called opportunistic locking (or OpLocks)
could be safely used if the shared files were only accessed by CIFS clients. If other local programs
or NFS clients accessed the same files, it might cause file corruption.
To address these issues, the HP CIFS Server implements the CIFS File System Module (CFSM).
CFSM is a stackable file system module that takes advantage of the Stackable File System
architecture introduced in HP-UX 11i v3 and provides a method that allows CIFS file locks to
inter-operate with accesses from NFS clients and other HP-UX processes.
Enabling the CFSM functionality prevents the possibility of file corruption due to concurrent file
accesses from both CIFS and NFS, and allows for performance enhancing opportunistic locks to
be safely used. All the locks (CIFS record locks, share mode locks and opportunistic locks) that are
granted to CIFS clients are enforced by CFSM. NFS clients and other local users can then
concurrently access files with CIFS clients with no risk of file corruption, even with opportunistic
locking turned on.
NOTE: The CIFS File System Module (CFSM) is only available with the HP CIFS Server on HP-UX
11i v3 and later.
Stacking CFSM
CFSM is stacked onto the file system based on the contents of a template file. This template is
managed and defined through the use of the fstadm command described below. The predefined
CFSM template, cfsmtemplate, is automatically created when the HP CIFS product is installed.
The template that is provided with HP CIFS Server is usable on the specific file system that is
supported with CFSM.
CFSM can be stacked onto the physical file system when a file system is mounted, either through
the mount command or by specifying it in /etc/fstab.
136 CIFS File System Module (CFSM) Support