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