Skip to content

Commit 7070ad5

Browse files
committed
docs: add NFS driver documentation
Signed-off-by: Morten Linderud <[email protected]>
1 parent c44b31f commit 7070ad5

File tree

4 files changed

+120
-15
lines changed

4 files changed

+120
-15
lines changed

doc/config_options.txt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5652,6 +5652,40 @@ This value is required by some providers.
56525652
```
56535653

56545654
<!-- config group storage_lvm-common end -->
5655+
<!-- config group storage_nfs-common start -->
5656+
```{config:option} nfs.host storage_nfs-common
5657+
:default: "-"
5658+
:scope: "global"
5659+
:shortdesc: "Hostname or IP address of the remote NFS server. Optional if included in `source`, or a configuration is used."
5660+
:type: "string"
5661+
5662+
```
5663+
5664+
```{config:option} nfs.mount_options storage_nfs-common
5665+
:default: "-"
5666+
:scope: "local"
5667+
:shortdesc: "Additional mount options for the NFS mount."
5668+
:type: "string"
5669+
5670+
```
5671+
5672+
```{config:option} nfs.path storage_nfs-common
5673+
:default: "-"
5674+
:scope: "local"
5675+
:shortdesc: "Remote NFS path. Typically inferred from `source`, but can be overridden."
5676+
:type: "string"
5677+
5678+
```
5679+
5680+
```{config:option} source storage_nfs-common
5681+
:default: "-"
5682+
:scope: "local"
5683+
:shortdesc: "NFS remote storage path. Format: `[<host>:]<remote path>`. If `host` is omitted here, it must be set via `nfs.host`."
5684+
:type: "string"
5685+
5686+
```
5687+
5688+
<!-- config group storage_nfs-common end -->
56555689
<!-- config group storage_truenas-common start -->
56565690
```{config:option} source storage_truenas-common
56575691
:default: "-"

doc/reference/storage_drivers.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ storage_cephfs
1515
storage_cephobject
1616
storage_linstor
1717
storage_truenas
18+
storage_nfs
1819
```
1920

2021
See the corresponding pages for driver-specific information and configuration options.
@@ -24,21 +25,21 @@ See the corresponding pages for driver-specific information and configuration op
2425

2526
Where possible, Incus uses the advanced features of each storage system to optimize operations.
2627

27-
| Feature | Directory | Btrfs | LVM | ZFS | Ceph RBD | CephFS | Ceph Object | LINSTOR | TRUENAS |
28-
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
29-
| {ref}`storage-optimized-image-storage` | no | yes | yes | yes | yes | n/a | n/a | yes | yes |
30-
| Optimized instance creation | no | yes | yes | yes | yes | n/a | n/a | yes | yes |
31-
| Optimized snapshot creation | no | yes | yes | yes | yes | yes | n/a | yes | yes |
32-
| Optimized image transfer | no | yes | no | yes | yes | n/a | n/a | no | no |
33-
| {ref}`storage-optimized-volume-transfer` | no | yes | no | yes | yes | n/a | n/a | no | no |
34-
| Copy on write | no | yes | yes | yes | yes | yes | n/a | yes | yes |
35-
| Block based | no | no | yes | no | yes | no | n/a | yes | yes |
36-
| Instant cloning | no | yes | yes | yes | yes | yes | n/a | yes | yes |
37-
| Storage driver usable inside a container | yes | yes | no | yes[^1] | no | n/a | n/a | no | no |
38-
| Restore from older snapshots (not latest) | yes | yes | yes | no | yes | yes | n/a | no | no |
39-
| Storage quotas | yes[^2] | yes | yes | yes | yes | yes | yes | yes | yes |
40-
| Available on `incus admin init` | yes | yes | yes | yes | yes | no | no | no | no |
41-
| Object storage | yes | yes | yes | yes | no | no | yes | no | no |
28+
| Feature | Directory | Btrfs | LVM | ZFS | Ceph RBD | CephFS | Ceph Object | LINSTOR | TRUENAS | NFS |
29+
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
30+
| {ref}`storage-optimized-image-storage` | no | yes | yes | yes | yes | n/a | n/a | yes | yes | no |
31+
| Optimized instance creation | no | yes | yes | yes | yes | n/a | n/a | yes | yes | no |
32+
| Optimized snapshot creation | no | yes | yes | yes | yes | yes | n/a | yes | yes | no |
33+
| Optimized image transfer | no | yes | no | yes | yes | n/a | n/a | no | no | no |
34+
| {ref}`storage-optimized-volume-transfer` | no | yes | no | yes | yes | n/a | n/a | no | no | no |
35+
| Copy on write | no | yes | yes | yes | yes | yes | n/a | yes | yes | no |
36+
| Block based | no | no | yes | no | yes | no | n/a | yes | yes | n/a |
37+
| Instant cloning | no | yes | yes | yes | yes | yes | n/a | yes | yes | no |
38+
| Storage driver usable inside a container | yes | yes | no | yes[^1] | no | n/a | n/a | no | no | yes |
39+
| Restore from older snapshots (not latest) | yes | yes | yes | no | yes | yes | n/a | no | no | yes |
40+
| Storage quotas | yes[^2] | yes | yes | yes | yes | yes | yes | yes | yes | no |
41+
| Available on `incus admin init` | yes | yes | yes | yes | yes | no | no | no | no | yes |
42+
| Object storage | yes | yes | yes | yes | no | no | yes | no | no | no |
4243

4344
[^1]: Requires [`zfs.delegate`](storage-zfs-vol-config) to be enabled.
4445
[^2]: % Include content from [storage_dir.md](storage_dir.md)

doc/reference/storage_nfs.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
(storage-nfs)=
2+
# NFS - `nfs`
3+
4+
Network File System is a distributed file system protocol. It is used to serve and access files over a computer network.
5+
6+
To use NFS one need to setup a NFS file system following documentation from your Linux distribution of choice.
7+
8+
## `nfs` driver in Incus
9+
10+
The `nfs` driver in Incus only supports NFS version 4.2 and has a couple of limitations.
11+
12+
UID/GID squashing should be enabled. This can be done by explicitly setting `no_root_squash` and `no_all_squash` in `/etc/export`.
13+
14+
Note that it is not recommended to use `nfs` driver as container or vm storage volumes as it is unclear how well it works.
15+
16+
## Configuration options
17+
18+
The following configuration options are available for storage pools that use the `nfs` driver and for storage volumes in these pools.
19+
20+
### Storage pool configuration
21+
22+
% Include content from [config_options.txt](../config_options.txt)
23+
```{include} ../config_options.txt
24+
:start-after: <!-- config group storage_nfs-common start -->
25+
:end-before: <!-- config group storage_nfs-common end -->
26+
```
27+
28+
{{volume_configuration}}

internal/server/metadata/configuration.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6427,6 +6427,48 @@
64276427
]
64286428
}
64296429
},
6430+
"storage_nfs": {
6431+
"common": {
6432+
"keys": [
6433+
{
6434+
"nfs.host": {
6435+
"default": "-",
6436+
"longdesc": "",
6437+
"scope": "global",
6438+
"shortdesc": "Hostname or IP address of the remote NFS server. Optional if included in `source`, or a configuration is used.",
6439+
"type": "string"
6440+
}
6441+
},
6442+
{
6443+
"nfs.mount_options": {
6444+
"default": "-",
6445+
"longdesc": "",
6446+
"scope": "local",
6447+
"shortdesc": "Additional mount options for the NFS mount.",
6448+
"type": "string"
6449+
}
6450+
},
6451+
{
6452+
"nfs.path": {
6453+
"default": "-",
6454+
"longdesc": "",
6455+
"scope": "local",
6456+
"shortdesc": "Remote NFS path. Typically inferred from `source`, but can be overridden.",
6457+
"type": "string"
6458+
}
6459+
},
6460+
{
6461+
"source": {
6462+
"default": "-",
6463+
"longdesc": "",
6464+
"scope": "local",
6465+
"shortdesc": "NFS remote storage path. Format: `[\u003chost\u003e:]\u003cremote path\u003e`. If `host` is omitted here, it must be set via `nfs.host`.",
6466+
"type": "string"
6467+
}
6468+
}
6469+
]
6470+
}
6471+
},
64306472
"storage_truenas": {
64316473
"common": {
64326474
"keys": [

0 commit comments

Comments
 (0)