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