HP-UX HB v13.00 Ch-20 - CIFS

HP-UX Handbook Rev 13.00 Page 21 (of 40)
Chapter 20 CIFS
October 29, 2013
you need to authenticate as root.
Useful share configuration parameters
strict allocate
This is a boolean that controls the handling of disk space allocation in the server. When this is set
to yes the server will change from UNIX behaviour of not committing real disk storage blocks
when a file is extended to the Windows behaviour of actually forcing the disk system to allocate
real storage blocks when a file is created or extended to be a given size. In UNIX terminology
this means that Samba will stop creating sparse files. This can be slow on some systems.
When strict allocate is no the server does sparse disk block allocation when a file is extended or
created. Sparse file means that a file with zero byte is written with a large enough offset and
zeros are written to it to make sure the physical space adequate for the entire eventual operation
is available before writing data to the file. A zero byte write request to an offset beyond the eof is
typically used by MS applications (Outlook, writing pst files; MS Office) to 'extend' a file. If the
used OS is actually reserving this space by writing 'zeros' to each and every byte between 0 and
the offset, this could conceivably take a long time.
Setting strict allocate to yes would cause Samba to reject a zero write request and instead start
writing data imidiately:
strict allocate = yes
level2 oplocks
This parameter controls whether Samba supports level2 (read-only) oplocks on a share. Level2,
or read-only oplocks allow Windows NT clients that have an oplock on a file to downgrade from
a read-write oplock to a read-only oplock once a second client opens the file (instead of releasing
all oplocks on a second open, as in traditional, exclusive oplocks). This allows all openers of the
file that support level2 oplocks to cache the file for read-ahead only (ie. they may not cache
writes or lock requests) and increases performance for many accesses of files that are not
commonly written (such as application .exe files).
The oplocks parameter must be set to true on this share in order for this parameter to have any
effect.
oplocks
This boolean option tells smbd whether to issue oplocks (opportunistic locks) to file open
requests on this share. The oplock code can dramatically (approx. 30% or more) improve the
speed of access to files on Samba servers. It allows the clients to aggressively cache files locally
and you may want to disable this option for unreliable network environments (it is turned on by
default in Windows NT Servers). For more information see the file Speed.txt in the Samba docs/
directory.
Oplocks may be selectively turned off on certain files with a share. See the veto oplock files
parameter.