]>
Commit | Line | Data |
---|---|---|
0ddd42aa | 1 | [[storage_cifs]] |
de14ebff WL |
2 | CIFS Backend |
3 | ----------- | |
4 | ifdef::wiki[] | |
5 | :pve-toplevel: | |
6 | :title: Storage: CIFS | |
7 | endif::wiki[] | |
8 | ||
9 | Storage pool type: `cifs` | |
10 | ||
0ddd42aa TL |
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 | |
e2b3622a | 13 | through the {pve} API or the web UI, with all our backend advantages, |
0ddd42aa TL |
14 | like server heartbeat check or comfortable selection of exported |
15 | shares. | |
de14ebff WL |
16 | |
17 | Configuration | |
18 | ~~~~~~~~~~~~~ | |
19 | ||
20 | The backend supports all common storage properties, except the shared | |
0ddd42aa TL |
21 | flag, which is always set. Additionally, the following CIFS special |
22 | properties are available: | |
de14ebff WL |
23 | |
24 | server:: | |
25 | ||
0ddd42aa | 26 | Server IP or DNS name. Required. |
de14ebff | 27 | |
0ddd42aa TL |
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. | |
de14ebff | 31 | |
0ddd42aa | 32 | share:: |
de14ebff | 33 | |
84f91027 | 34 | CIFS share to use (get available ones with `pvesm scan cifs <address>` or the |
e2b3622a | 35 | web UI). Required. |
de14ebff WL |
36 | |
37 | username:: | |
38 | ||
0ddd42aa | 39 | The username for the CIFS storage. Optional, defaults to `guest'. |
de14ebff WL |
40 | |
41 | password:: | |
42 | ||
0ddd42aa TL |
43 | The user password. Optional. |
44 | It will be saved in a file only readable by root | |
84f91027 | 45 | (`/etc/pve/priv/storage/<STORAGE-ID>.pw`). |
de14ebff WL |
46 | |
47 | domain:: | |
48 | ||
0ddd42aa | 49 | Sets the user domain (workgroup) for this storage. Optional. |
de14ebff WL |
50 | |
51 | smbversion:: | |
52 | ||
0ddd42aa | 53 | SMB protocol Version. Optional, default is `3`. |
de14ebff WL |
54 | SMB1 is not supported due to security issues. |
55 | ||
56 | path:: | |
57 | ||
0ddd42aa | 58 | The local mount point. Optional, defaults to `/mnt/pve/<STORAGE_ID>/`. |
de14ebff | 59 | |
93ee25d0 | 60 | content-dirs:: |
432750f7 LN |
61 | |
62 | Overrides for the default directory layout. Optional. | |
63 | ||
cdf9d3f9 SH |
64 | options:: |
65 | ||
66 | Additional CIFS mount options (see `man mount.cifs`). Some options are set | |
67 | automatically and shouldn't be set here. {pve} will always set the option | |
68 | `soft`. Depending on the configuration, these options are set automatically: | |
69 | `username`, `credentials`, `guest`, `domain`, `vers`. | |
70 | ||
3cd0ecb4 LN |
71 | subdir:: |
72 | ||
cdf9d3f9 SH |
73 | The subdirectory of the share to mount. Optional, defaults to the root directory |
74 | of the share. | |
3cd0ecb4 | 75 | |
de14ebff WL |
76 | .Configuration Example (`/etc/pve/storage.cfg`) |
77 | ---- | |
78 | cifs: backup | |
79 | path /mnt/pve/backup | |
80 | server 10.0.0.11 | |
81 | share VMData | |
82 | content backup | |
cdf9d3f9 | 83 | options noserverino,echo_interval=30 |
de14ebff WL |
84 | username anna |
85 | smbversion 3 | |
3cd0ecb4 | 86 | subdir /data |
de14ebff WL |
87 | |
88 | ---- | |
89 | ||
90 | Storage Features | |
91 | ~~~~~~~~~~~~~~~~ | |
92 | ||
0ddd42aa TL |
93 | CIFS does not support snapshots on a storage level. But you may use |
94 | `qcow2` backing files if you still want to have snapshots and cloning | |
95 | features available. | |
de14ebff | 96 | |
0ddd42aa | 97 | .Storage features for backend `cifs` |
de14ebff WL |
98 | [width="100%",cols="m,m,3*d",options="header"] |
99 | |============================================================================== | |
c2c8eb89 DC |
100 | |Content types |Image formats |Shared |Snapshots |Clones |
101 | |images rootdir vztmpl iso backup snippets |raw qcow2 vmdk |yes |qcow2 |qcow2 | |
de14ebff WL |
102 | |============================================================================== |
103 | ||
104 | Examples | |
105 | ~~~~~~~~ | |
106 | ||
107 | You can get a list of exported CIFS shares with: | |
108 | ||
0ddd42aa | 109 | ---- |
84f91027 | 110 | # pvesm scan cifs <server> [--username <username>] [--password] |
0ddd42aa TL |
111 | ---- |
112 | ||
113 | Then you could add this share as a storage to the whole {pve} cluster | |
114 | with: | |
115 | ||
116 | ---- | |
117 | # pvesm add cifs <storagename> --server <server> --share <share> [--username <username>] [--password] | |
118 | ---- | |
de14ebff WL |
119 | |
120 | ifdef::wiki[] | |
121 | ||
122 | See Also | |
123 | ~~~~~~~~ | |
124 | ||
125 | * link:/wiki/Storage[Storage] | |
126 | ||
127 | endif::wiki[] |