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