]> git.proxmox.com Git - pve-docs.git/blame - pve-storage-nfs.adoc
new file pve-docs-mediawiki-import.in
[pve-docs.git] / pve-storage-nfs.adoc
CommitLineData
aa039b0f
DM
1NFS Backend
2-----------
fc3425bd 3include::attributes.txt[]
aa039b0f 4
5f09af76
DM
5ifdef::wiki[]
6:pve-toplevel:
cb84ed18 7:title: Storage: NFS
5f09af76
DM
8endif::wiki[]
9
aa039b0f
DM
10Storage pool type: `nfs`
11
12The NFS backend is based on the directory backend, so it shares most
13properties. The directory layout and the file naming conventions are
14the same. The main advantage is that you can directly configure the
15NFS server properties, so the backend can mount the share
8c1189b6 16automatically. There is no need to modify `/etc/fstab`. The backend
aa039b0f
DM
17can also test if the server is online, and provides a method to query
18the server for exported shares.
19
20Configuration
21~~~~~~~~~~~~~
22
23The backend supports all common storage properties, except the shared
24flag, which is always set. Additionally, the following properties are
25used to configure the NFS server:
26
27server::
28
29Server IP or DNS name. To avoid DNS lookup delays, it is usually
5eba0743 30preferable to use an IP address instead of a DNS name - unless you
aa039b0f
DM
31have a very reliable DNS server, or list the server in the local
32`/etc/hosts` file.
33
34export::
35
36NFS export path (as listed by `pvesm nfsscan`).
37
38You can also set NFS mount options:
39
40path::
41
8c1189b6 42The local mount point (defaults to `/mnt/pve/<STORAGE_ID>/`).
aa039b0f
DM
43
44options::
45
46NFS mount options (see `man nfs`).
47
8c1189b6 48.Configuration Example (`/etc/pve/storage.cfg`)
aa039b0f
DM
49----
50nfs: iso-templates
51 path /mnt/pve/iso-templates
52 server 10.0.0.10
53 export /space/iso-templates
54 options vers=3,soft
55 content iso,vztmpl
56----
57
58TIP: After an NFS request times out, NFS request are retried
59indefinitely by default. This can lead to unexpected hangs on the
60client side. For read-only content, it is worth to consider the NFS
61`soft` option, which limits the number of retries to three.
62
63
64Storage Features
65~~~~~~~~~~~~~~~~
66
5eba0743 67NFS does not support snapshots, but the backend uses `qcow2` features
aa039b0f
DM
68to implement snapshots and cloning.
69
70.Storage features for backend `nfs`
71[width="100%",cols="m,m,3*d",options="header"]
72|==============================================================================
73|Content types |Image formats |Shared |Snapshots |Clones
74|images rootdir vztempl iso backup |raw qcow2 vmdk subvol |yes |qcow2 |qcow2
75|==============================================================================
76
77Examples
78~~~~~~~~
79
80You can get a list of exported NFS shares with:
81
82 # pvesm nfsscan <server>
deb4673f
DM
83
84ifdef::wiki[]
85
86See Also
87~~~~~~~~
88
f532afb7 89* link:/wiki/Storage[Storage]
deb4673f
DM
90
91endif::wiki[]