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