Storage: NFS: Difference between revisions
(Created page with "{{#pvedocs:pve-storage-nfs-plain.html}} Category:Reference Documentation") |
No edit summary |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<!--PVE_IMPORT_START_MARKER--> | |||
<!-- Do not edit - this is autogenerated content --> | |||
{{#pvedocs:pve-storage-nfs-plain.html}} | {{#pvedocs:pve-storage-nfs-plain.html}} | ||
[[Category:Reference Documentation]] | [[Category:Reference Documentation]] | ||
<pvehide> | |||
Storage pool type: nfs | |||
The NFS backend is based on the directory backend, so it shares most | |||
properties. The directory layout and the file naming conventions are | |||
the same. The main advantage is that you can directly configure the | |||
NFS server properties, so the backend can mount the share | |||
automatically. There is no need to modify /etc/fstab. The backend | |||
can also test if the server is online, and provides a method to query | |||
the server for exported shares. | |||
Configuration | |||
The backend supports all common storage properties, except the shared | |||
flag, which is always set. Additionally, the following properties are | |||
used to configure the NFS server: | |||
server | |||
Server IP or DNS name. To avoid DNS lookup delays, it is usually | |||
preferable to use an IP address instead of a DNS name - unless you | |||
have a very reliable DNS server, or list the server in the local | |||
/etc/hosts file. | |||
export | |||
NFS export path (as listed by pvesm nfsscan). | |||
You can also set NFS mount options: | |||
path | |||
The local mount point (defaults to /mnt/pve/<STORAGE_ID>/). | |||
content-dirs | |||
Overrides for the default directory layout. Optional. | |||
options | |||
NFS mount options (see man nfs). | |||
Configuration Example (/etc/pve/storage.cfg) | |||
nfs: iso-templates | |||
path /mnt/pve/iso-templates | |||
server 10.0.0.10 | |||
export /space/iso-templates | |||
options vers=3,soft | |||
content iso,vztmpl | |||
After an NFS request times out, NFS request are retried | |||
indefinitely by default. This can lead to unexpected hangs on the | |||
client side. For read-only content, it is worth to consider the NFS | |||
soft option, which limits the number of retries to three. | |||
Storage Features | |||
NFS does not support snapshots, but the backend uses qcow2 features | |||
to implement snapshots and cloning. | |||
Table 1. Storage features for backend nfs | |||
Content types | |||
Image formats | |||
Shared | |||
Snapshots | |||
Clones | |||
images rootdir vztmpl iso backup snippets | |||
raw qcow2 vmdk | |||
yes | |||
qcow2 | |||
qcow2 | |||
Examples | |||
You can get a list of exported NFS shares with: | |||
# pvesm nfsscan <server> | |||
See Also | |||
Storage | |||
</pvehide> | |||
<!--PVE_IMPORT_END_MARKER--> |
Latest revision as of 09:11, 23 March 2023
Storage pool type: nfs
The NFS backend is based on the directory backend, so it shares most properties. The directory layout and the file naming conventions are the same. The main advantage is that you can directly configure the NFS server properties, so the backend can mount the share automatically. There is no need to modify /etc/fstab. The backend can also test if the server is online, and provides a method to query the server for exported shares.
Configuration
The backend supports all common storage properties, except the shared flag, which is always set. Additionally, the following properties are used to configure the NFS server:
- server
-
Server IP or DNS name. To avoid DNS lookup delays, it is usually preferable to use an IP address instead of a DNS name - unless you have a very reliable DNS server, or list the server in the local /etc/hosts file.
- export
-
NFS export path (as listed by pvesm nfsscan).
You can also set NFS mount options:
- path
-
The local mount point (defaults to /mnt/pve/<STORAGE_ID>/).
- content-dirs
-
Overrides for the default directory layout. Optional.
- options
-
NFS mount options (see man nfs).
nfs: iso-templates path /mnt/pve/iso-templates server 10.0.0.10 export /space/iso-templates options vers=3,soft content iso,vztmpl
After an NFS request times out, NFS request are retried indefinitely by default. This can lead to unexpected hangs on the client side. For read-only content, it is worth to consider the NFS soft option, which limits the number of retries to three. |
Storage Features
NFS does not support snapshots, but the backend uses qcow2 features to implement snapshots and cloning.
Content types | Image formats | Shared | Snapshots | Clones |
---|---|---|---|---|
images rootdir vztmpl iso backup snippets |
raw qcow2 vmdk |
yes |
qcow2 |
qcow2 |
Examples
You can get a list of exported NFS shares with:
# pvesm nfsscan <server>
See Also