|
|
5eee7b |
From 0b3c633002a10419080312ce72cf1a971fd383d0 Mon Sep 17 00:00:00 2001
|
|
|
5eee7b |
From: Steve French <stfrench@microsoft.com>
|
|
|
5eee7b |
Date: Wed, 3 Apr 2019 23:46:34 -0500
|
|
|
5eee7b |
Subject: [PATCH 21/36] Update man page for mount.cifs to add new options
|
|
|
5eee7b |
|
|
|
5eee7b |
Add description of "snapshot" and "handletimeout" mount
|
|
|
5eee7b |
options and a security section noting that the use of
|
|
|
5eee7b |
cifs is discouraged, and various minor updates.
|
|
|
5eee7b |
|
|
|
5eee7b |
Signed-off-by: Steve French <stfrench@microsoft.com>
|
|
|
5eee7b |
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
|
|
|
5eee7b |
Reviewed-by: Paulo Alcantara <palcantara@suse.de>
|
|
|
5eee7b |
(cherry picked from commit cbdd6552bc5978476e344a253941e714d983c27b)
|
|
|
5eee7b |
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
|
|
|
5eee7b |
---
|
|
|
5eee7b |
mount.cifs.rst | 98 +++++++++++++++++++++++++++++++++++-----------------------
|
|
|
5eee7b |
1 file changed, 60 insertions(+), 38 deletions(-)
|
|
|
5eee7b |
|
|
|
5eee7b |
diff --git a/mount.cifs.rst b/mount.cifs.rst
|
|
|
5eee7b |
index f64d1f1..8ba6e7b 100644
|
|
|
5eee7b |
--- a/mount.cifs.rst
|
|
|
5eee7b |
+++ b/mount.cifs.rst
|
|
|
5eee7b |
@@ -15,13 +15,13 @@ SYNOPSIS
|
|
|
5eee7b |
|
|
|
5eee7b |
This tool is part of the cifs-utils suite.
|
|
|
5eee7b |
|
|
|
5eee7b |
-``mount.cifs`` mounts a Linux CIFS filesystem. It is usually invoked
|
|
|
5eee7b |
-indirectly by the mount(8) command when using the "-t cifs"
|
|
|
5eee7b |
+``mount.cifs`` mounts a CIFS or SMB3 filesystem from Linux. It is
|
|
|
5eee7b |
+usually invoked indirectly by the mount(8) command when using the "-t cifs"
|
|
|
5eee7b |
option. This command only works in Linux, and the kernel must support
|
|
|
5eee7b |
-the cifs filesystem. The CIFS protocol is the successor to the SMB
|
|
|
5eee7b |
-protocol and is supported by most Windows servers and many other
|
|
|
5eee7b |
-commercial servers and Network Attached Storage appliances as well as
|
|
|
5eee7b |
-by the popular Open Source server Samba.
|
|
|
5eee7b |
+the cifs filesystem. The SMB3 protocol is the successor to the CIFS (SMB)
|
|
|
5eee7b |
+protocol and is supported by most Windows servers, Azure (cloud storage),
|
|
|
5eee7b |
+Macs and many other commercial servers and Network Attached Storage
|
|
|
5eee7b |
+appliances as well as by the popular Open Source server Samba.
|
|
|
5eee7b |
|
|
|
5eee7b |
The mount.cifs utility attaches the UNC name (exported network
|
|
|
5eee7b |
resource) specified as service (using ``//server/share`` syntax, where
|
|
|
5eee7b |
@@ -266,6 +266,13 @@ handlecache
|
|
|
5eee7b |
nohandlecache
|
|
|
5eee7b |
Disable caching of the share root directory handle.
|
|
|
5eee7b |
|
|
|
5eee7b |
+handletimeout=arg
|
|
|
5eee7b |
+ The time (in milliseconds) for which the server should reserve the handle after
|
|
|
5eee7b |
+ a failover waiting for the client to reconnect. When mounting with
|
|
|
5eee7b |
+ resilienthandles or persistenthandles mount option, or when their use is
|
|
|
5eee7b |
+ requested by the server (continuous availability shares) then this parameter
|
|
|
5eee7b |
+ overrides the server default handle timeout (which for most servers is 120 seconds).
|
|
|
5eee7b |
+
|
|
|
5eee7b |
rwpidforward
|
|
|
5eee7b |
Forward pid of a process who opened a file to any read or write
|
|
|
5eee7b |
operation on that file. This prevent applications like wine(1) from
|
|
|
5eee7b |
@@ -387,6 +394,12 @@ persistenthandles
|
|
|
5eee7b |
nopersistenthandles
|
|
|
5eee7b |
(default) Disable persistent handles.
|
|
|
5eee7b |
|
|
|
5eee7b |
+snapshot=time
|
|
|
5eee7b |
+ Mount a specific snapshot of the remote share. ``time`` must be a
|
|
|
5eee7b |
+ positive integer identifying the snapshot requested (in 100-nanosecond
|
|
|
5eee7b |
+ units that have elapsed since January 1, 1601, or alternatively it can
|
|
|
5eee7b |
+ be specified in GMT format e.g. @GMT-2019.03.27-20.52.19)
|
|
|
5eee7b |
+
|
|
|
5eee7b |
nobrl
|
|
|
5eee7b |
Do not send byte range lock requests to the server. This is necessary
|
|
|
5eee7b |
for certain applications that break with cifs style mandatory byte
|
|
|
5eee7b |
@@ -401,7 +414,7 @@ locallease
|
|
|
5eee7b |
Check cached leases locally instead of querying the server.
|
|
|
5eee7b |
|
|
|
5eee7b |
sfu
|
|
|
5eee7b |
- When the CIFS Unix Extensions are not negotiated, attempt to create
|
|
|
5eee7b |
+ When the CIFS or SMB3 Unix Extensions are not negotiated, attempt to create
|
|
|
5eee7b |
device files and fifos in a format compatible with Services for Unix
|
|
|
5eee7b |
(SFU). In addition retrieve bits 10-12 of the mode via the
|
|
|
5eee7b |
``SETFILEBITS`` extended attribute (as SFU does). In the future the
|
|
|
5eee7b |
@@ -450,11 +463,11 @@ noserverino
|
|
|
5eee7b |
|
|
|
5eee7b |
See section `INODE NUMBERS`_ for more information.
|
|
|
5eee7b |
|
|
|
5eee7b |
-unix|linux
|
|
|
5eee7b |
+posix|unix|linux
|
|
|
5eee7b |
(default) Enable Unix Extensions for this mount. Requires CIFS
|
|
|
5eee7b |
(vers=1.0) or SMB3.1.1 (vers=3.1.1) and a server supporting them.
|
|
|
5eee7b |
|
|
|
5eee7b |
-nounix|nolinux
|
|
|
5eee7b |
+noposix|nounix|nolinux
|
|
|
5eee7b |
Disable the Unix Extensions for this mount. This can be useful in
|
|
|
5eee7b |
order to turn off multiple settings at once. This includes POSIX acls,
|
|
|
5eee7b |
POSIX locks, POSIX paths, symlink support and retrieving
|
|
|
5eee7b |
@@ -479,38 +492,35 @@ nosharesock
|
|
|
5eee7b |
Do not try to reuse sockets if the system is already connected to
|
|
|
5eee7b |
the server via an existing mount point. This will make the client
|
|
|
5eee7b |
always make a new connection to the server no matter what he is
|
|
|
5eee7b |
- already connected to.
|
|
|
5eee7b |
+ already connected to. This can be useful in simulating multiple
|
|
|
5eee7b |
+ clients connecting to the same server, as each mount point
|
|
|
5eee7b |
+ will use a different TCP socket.
|
|
|
5eee7b |
|
|
|
5eee7b |
noblocksend
|
|
|
5eee7b |
Send data on the socket using non blocking operations (MSG_DONTWAIT flag).
|
|
|
5eee7b |
|
|
|
5eee7b |
rsize=bytes
|
|
|
5eee7b |
Maximum amount of data that the kernel will request in a read request
|
|
|
5eee7b |
- in bytes. Prior to kernel 3.2.0, the default was 16k, and the maximum
|
|
|
5eee7b |
- size was limited by the ``CIFSMaxBufSize`` module parameter. As of
|
|
|
5eee7b |
- kernel 3.2.0, the behavior varies according to whether POSIX
|
|
|
5eee7b |
- extensions are enabled on the mount and the server supports large
|
|
|
5eee7b |
- POSIX reads. If they are, then the default is 1M, and the maximum is
|
|
|
5eee7b |
- 16M. If they are not supported by the server, then the default is 60k
|
|
|
5eee7b |
- and the maximum is around 127k. The reason for the 60k is because it's
|
|
|
5eee7b |
- the maximum size read that windows servers can fill. Note that this
|
|
|
5eee7b |
- value is a maximum, and the client may settle on a smaller size to
|
|
|
5eee7b |
- accommodate what the server supports. In kernels prior to 3.2.0, no
|
|
|
5eee7b |
- negotiation is performed.
|
|
|
5eee7b |
+ in bytes. Maximum size that servers will accept is typically 8MB for SMB3
|
|
|
5eee7b |
+ or later dialects. Default requested during mount is 4MB. Prior to the 4.20
|
|
|
5eee7b |
+ kernel the default requested was 1MB. Prior to the SMB2.1 dialect the
|
|
|
5eee7b |
+ maximum was usually 64K.
|
|
|
5eee7b |
|
|
|
5eee7b |
wsize=bytes
|
|
|
5eee7b |
Maximum amount of data that the kernel will send in a write request in
|
|
|
5eee7b |
- bytes. Prior to kernel 3.0.0, the default and maximum was 57344 (14 \*
|
|
|
5eee7b |
- 4096 pages). As of 3.0.0, the default depends on whether the client
|
|
|
5eee7b |
- and server negotiate large writes via POSIX extensions. If they do,
|
|
|
5eee7b |
- then the default is 1M, and the maximum allowed is 16M. If they do
|
|
|
5eee7b |
- not, then the default is 65536 and the maximum allowed is 131007. Note
|
|
|
5eee7b |
- that this value is just a starting point for negotiation in 3.0.0 and
|
|
|
5eee7b |
- up. The client and server may negotiate this size downward according
|
|
|
5eee7b |
- to the server's capabilities. In kernels prior to 3.0.0, no
|
|
|
5eee7b |
- negotiation is performed. It can end up with an existing superblock if
|
|
|
5eee7b |
- this value isn't specified or it's greater or equal than the existing
|
|
|
5eee7b |
- one.
|
|
|
5eee7b |
+ bytes. Maximum size that servers will accept is typically 8MB for SMB3
|
|
|
5eee7b |
+ or later dialects. Default requested during mount is 4MB. Prior to the 4.20
|
|
|
5eee7b |
+ kernel the default requested was 1MB. Prior to the SMB2.1 dialect the
|
|
|
5eee7b |
+ maximum was usually 64K.
|
|
|
5eee7b |
+
|
|
|
5eee7b |
+bsize=bytes
|
|
|
5eee7b |
+ Override the default blocksize (1MB) reported on SMB3 files (requires
|
|
|
5eee7b |
+ kernel version of 5.1 or later). Prior to kernel version 5.1, the
|
|
|
5eee7b |
+ blocksize was always reported as 16K instead of 1MB (and was not
|
|
|
5eee7b |
+ configurable) which can hurt the performance of tools like cp and scp
|
|
|
5eee7b |
+ (especially for uncached I/O) which decide on the read and write size
|
|
|
5eee7b |
+ to use for file copies based on the inode blocksize. bsize may not be
|
|
|
5eee7b |
+ less than 16K or greater than 16M.
|
|
|
5eee7b |
|
|
|
5eee7b |
max_credits=n
|
|
|
5eee7b |
Maximum credits the SMB2 client can have. Default is 32000. Must be
|
|
|
5eee7b |
@@ -885,14 +895,26 @@ CONFIGURATION
|
|
|
5eee7b |
The primary mechanism for making configuration changes and for reading
|
|
|
5eee7b |
debug information for the cifs vfs is via the Linux /proc
|
|
|
5eee7b |
filesystem. In the directory */proc/fs/cifs* are various
|
|
|
5eee7b |
-configuration files and pseudo files which can display debug
|
|
|
5eee7b |
-information. There are additional startup options such as maximum
|
|
|
5eee7b |
-buffer size and number of buffers which only may be set when the
|
|
|
5eee7b |
+configuration files and pseudo files which can display debug information
|
|
|
5eee7b |
+and performance statistics. There are additional startup options such as
|
|
|
5eee7b |
+maximum buffer size and number of buffers which only may be set when the
|
|
|
5eee7b |
kernel cifs vfs (cifs.ko module) is loaded. These can be seen by
|
|
|
5eee7b |
running the ``modinfo`` utility against the file cifs.ko which will
|
|
|
5eee7b |
list the options that may be passed to cifs during module installation
|
|
|
5eee7b |
(device driver load). For more information see the kernel file
|
|
|
5eee7b |
-*fs/cifs/README*.
|
|
|
5eee7b |
+*fs/cifs/README*. When configuring dynamic tracing (trace-cmd)
|
|
|
5eee7b |
+note that the list of SMB3 events which can be enabled can be seen at:
|
|
|
5eee7b |
+*/sys/kernel/debug/tracing/events/cifs/*.
|
|
|
5eee7b |
+
|
|
|
5eee7b |
+********
|
|
|
5eee7b |
+SECURITY
|
|
|
5eee7b |
+********
|
|
|
5eee7b |
+
|
|
|
5eee7b |
+The use of SMB2.1 or later (including the latest dialect SMB3.1.1)
|
|
|
5eee7b |
+is recommended for improved security and SMB1 is no longer requested
|
|
|
5eee7b |
+by default at mount time. Old dialects such as CIFS (SMB1, ie vers=1.0)
|
|
|
5eee7b |
+have much weaker security. Use of CIFS (SMB1) can be disabled by
|
|
|
5eee7b |
+modprobe cifs disable_legacy_dialects=y.
|
|
|
5eee7b |
|
|
|
5eee7b |
****
|
|
|
5eee7b |
BUGS
|
|
|
5eee7b |
@@ -913,8 +935,8 @@ bugs (minimum: mount.cifs (try ``mount.cifs -V``), kernel (see
|
|
|
5eee7b |
VERSION
|
|
|
5eee7b |
*******
|
|
|
5eee7b |
|
|
|
5eee7b |
-This man page is correct for version 1.74 of the cifs vfs filesystem
|
|
|
5eee7b |
-(roughly Linux kernel 3.0).
|
|
|
5eee7b |
+This man page is correct for version 2.18 of the cifs vfs filesystem
|
|
|
5eee7b |
+(roughly Linux kernel 5.0).
|
|
|
5eee7b |
|
|
|
5eee7b |
********
|
|
|
5eee7b |
SEE ALSO
|
|
|
5eee7b |
--
|
|
|
5eee7b |
1.8.3.1
|
|
|
5eee7b |
|