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