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