pve-docs/pve-storage-cifs.adoc
Daniel Kral 500faf0743 storage: make description of storage CLI examples more consistent
Make the text for `pvesm scan` and `pvesm add` command examples more
consistent by introducing `pvesm scan` with "You can get ... with", as
it is already done for other storage plugins, and changing from past
tense to present tense in existing descriptions for the `pvesm add` as
recommended in the Technical Writing Style Guide for instructions [0].

While at it, replace the term "share" with the more appropriate
"datastore" for the example in the PBS section.

[0] https://pve.proxmox.com/wiki/Technical_Writing_Style_Guide#Second_person_imperative_mood

Signed-off-by: Daniel Kral <d.kral@proxmox.com>
Link: https://lore.proxmox.com/20250304100915.55114-1-d.kral@proxmox.com
2025-04-07 15:20:37 +02:00

128 lines
3.1 KiB
Plaintext

[[storage_cifs]]
CIFS Backend
-----------
ifdef::wiki[]
:pve-toplevel:
:title: Storage: CIFS
endif::wiki[]
Storage pool type: `cifs`
The CIFS backend extends the directory backend, so that no manual
setup of a CIFS mount is needed. Such a storage can be added directly
through the {pve} API or the web UI, with all our backend advantages,
like server heartbeat check or comfortable selection of exported
shares.
Configuration
~~~~~~~~~~~~~
The backend supports all common storage properties, except the shared
flag, which is always set. Additionally, the following CIFS special
properties are available:
server::
Server IP or DNS name. Required.
TIP: To avoid DNS lookup delays, it is usually preferable to use an IP
address instead of a DNS name - unless you have a very reliable DNS
server, or list the server in the local `/etc/hosts` file.
share::
CIFS share to use (get available ones with `pvesm scan cifs <address>` or the
web UI). Required.
username::
The username for the CIFS storage. Optional, defaults to `guest'.
password::
The user password. Optional.
It will be saved in a file only readable by root
(`/etc/pve/priv/storage/<STORAGE-ID>.pw`).
domain::
Sets the user domain (workgroup) for this storage. Optional.
smbversion::
SMB protocol Version. Optional, default is `3`.
SMB1 is not supported due to security issues.
path::
The local mount point. Optional, defaults to `/mnt/pve/<STORAGE_ID>/`.
content-dirs::
Overrides for the default directory layout. Optional.
options::
Additional CIFS mount options (see `man mount.cifs`). Some options are set
automatically and shouldn't be set here. {pve} will always set the option
`soft`. Depending on the configuration, these options are set automatically:
`username`, `credentials`, `guest`, `domain`, `vers`.
subdir::
The subdirectory of the share to mount. Optional, defaults to the root directory
of the share.
.Configuration Example (`/etc/pve/storage.cfg`)
----
cifs: backup
path /mnt/pve/backup
server 10.0.0.11
share VMData
content backup
options noserverino,echo_interval=30
username anna
smbversion 3
subdir /data
----
Storage Features
~~~~~~~~~~~~~~~~
CIFS does not support snapshots on a storage level. But you may use
`qcow2` backing files if you still want to have snapshots and cloning
features available.
.Storage features for backend `cifs`
[width="100%",cols="m,m,3*d",options="header"]
|==============================================================================
|Content types |Image formats |Shared |Snapshots |Clones
|images rootdir vztmpl iso backup snippets |raw qcow2 vmdk |yes |qcow2 |qcow2
|==============================================================================
Examples
~~~~~~~~
You can get a list of exported CIFS shares with:
----
# pvesm scan cifs <server> [--username <username>] [--password]
----
Then you can add one of these shares as a storage to the whole {pve} cluster
with:
----
# pvesm add cifs <storagename> --server <server> --share <share> [--username <username>] [--password]
----
ifdef::wiki[]
See Also
~~~~~~~~
* link:/wiki/Storage[Storage]
endif::wiki[]