]> git.proxmox.com Git - pve-docs.git/blob - pve-storage-cifs.adoc
fix #2641: document subdir parameter for CIFS backend
[pve-docs.git] / pve-storage-cifs.adoc
1 [[storage_cifs]]
2 CIFS Backend
3 -----------
4 ifdef::wiki[]
5 :pve-toplevel:
6 :title: Storage: CIFS
7 endif::wiki[]
8
9 Storage pool type: `cifs`
10
11 The CIFS backend extends the directory backend, so that no manual
12 setup of a CIFS mount is needed. Such a storage can be added directly
13 through the {pve} API or the WebUI, with all our backend advantages,
14 like server heartbeat check or comfortable selection of exported
15 shares.
16
17 Configuration
18 ~~~~~~~~~~~~~
19
20 The backend supports all common storage properties, except the shared
21 flag, which is always set. Additionally, the following CIFS special
22 properties are available:
23
24 server::
25
26 Server IP or DNS name. Required.
27
28 TIP: To avoid DNS lookup delays, it is usually preferable to use an IP
29 address instead of a DNS name - unless you have a very reliable DNS
30 server, or list the server in the local `/etc/hosts` file.
31
32 share::
33
34 CIFS share to use (get available ones with `pvesm scan cifs <address>` or the
35 WebUI). Required.
36
37 username::
38
39 The username for the CIFS storage. Optional, defaults to `guest'.
40
41 password::
42
43 The user password. Optional.
44 It will be saved in a file only readable by root
45 (`/etc/pve/priv/storage/<STORAGE-ID>.pw`).
46
47 domain::
48
49 Sets the user domain (workgroup) for this storage. Optional.
50
51 smbversion::
52
53 SMB protocol Version. Optional, default is `3`.
54 SMB1 is not supported due to security issues.
55
56 path::
57
58 The local mount point. Optional, defaults to `/mnt/pve/<STORAGE_ID>/`.
59
60 content-dirs::
61
62 Overrides for the default directory layout. Optional.
63
64 subdir::
65
66 The subdirectory of the share to mount. Optional, defaults to the root directory of the share.
67
68 .Configuration Example (`/etc/pve/storage.cfg`)
69 ----
70 cifs: backup
71 path /mnt/pve/backup
72 server 10.0.0.11
73 share VMData
74 content backup
75 username anna
76 smbversion 3
77 subdir /data
78
79 ----
80
81 Storage Features
82 ~~~~~~~~~~~~~~~~
83
84 CIFS does not support snapshots on a storage level. But you may use
85 `qcow2` backing files if you still want to have snapshots and cloning
86 features available.
87
88 .Storage features for backend `cifs`
89 [width="100%",cols="m,m,3*d",options="header"]
90 |==============================================================================
91 |Content types |Image formats |Shared |Snapshots |Clones
92 |images rootdir vztmpl iso backup snippets |raw qcow2 vmdk |yes |qcow2 |qcow2
93 |==============================================================================
94
95 Examples
96 ~~~~~~~~
97
98 You can get a list of exported CIFS shares with:
99
100 ----
101 # pvesm scan cifs <server> [--username <username>] [--password]
102 ----
103
104 Then you could add this share as a storage to the whole {pve} cluster
105 with:
106
107 ----
108 # pvesm add cifs <storagename> --server <server> --share <share> [--username <username>] [--password]
109 ----
110
111 ifdef::wiki[]
112
113 See Also
114 ~~~~~~~~
115
116 * link:/wiki/Storage[Storage]
117
118 endif::wiki[]