Manage NFS networking using the CLI
This page describes how to configure the NFS networking using the CLI.
Using the CLI, you can:
Configure the NFS cluster level
Configure the NFS export level (permissions)
Create interface groups
Command: weka nfs interface-group add
Use the following command line to add an interface group:
weka nfs interface-group add <name> <type> [--subnet subnet] [--gateway gateway] [--allow-manage-gids allow-manage-gids]
Parameters
Name | Type | Value | Limitations | Mandatory | Default |
| String | Unique interface group name | Up to 11 characters in length | Yes | |
| String | Group type | Can only be | Yes | |
| String | The subnet mask in the 255.255.0.0 format | Valid netmask | No | 255.255.255.255 |
| String | Gateway IP | Valid IP | No | 255.255.255.255 |
| String | Allows the hosts within this interface group to use With |
Cannot be set if one of the hosts belongs to an interface group which does not have the | No |
|
Notes:
Do not mount the same filesystem by containers residing in interface groups with different values of the
allow-manage-gids.
As a best practice, it is recommended to have only one of the following protocol containers, NFS, SMB, or S3, installed on the same server. Starting from version 4.2, setting more than one additional protocol to the existing POSIX is not allowed.
Set interface group ports
Commands:
weka nfs interface-group port add
weka nfs interface-group port delete
Use the following command lines to add an interface group port:
weka nfs interface-group port add <name> <host-id> <port>
Use the following command lines to delete an interface group port:
weka nfs interface-group port delete <name> <host-id> <port>
Parameters
Name | Type | Value | Limitations | Mandatory | Default |
| String | Interface group name | None | Yes | |
| String | Host ID on which the port resides (can be obtained by running the | Valid host ID | Yes | |
| String | Port's device, e.g., eth1 | Valid device | Yes |
Set interface group IPs
Commands:
weka nfs interface-group ip-range add
weka nfs interface-group ip-range delete
Use the following command lines to add an interface group IP:
weka nfs interface-group ip-range add <name> <ips>
Use the following command lines to delete an interface group IP:
weka nfs interface-group ip-range delete <name> <ips>
Parameters
Name | Type | Value | Limitations | Mandatory | Default |
| String | Interface group name | None | Yes | |
| String | IP range | Valid IP range | Yes |
The AWS environment does not support interface group IPs.
Configure the service mountd port
The mountd service receives requests from clients to mount to the NFS server. When working with interface groups (with allow-manage-gids=on
), it is possible to set it explicitly rather than have it randomly selected on each server startup. This allows an easier setup of the firewalls to allow that port.
Use the following command to set and view the mountd configuration: weka nfs global-config set --mountd-port <mountd-port>
and weka nfs global-config show
Define client access groups
Command: weka nfs client-group
Use the following command lines to add a client access group:
weka nfs client-group add <name>
Use the following command lines to delete a client access group:
weka nfs client-group delete <name>
Parameters
Name | Type | Value | Limitations | Mandatory | Default |
| String | Group name | Valid name | Yes |
Manage client access groups
Add or delete DNS
Command: weka nfs rules
Use the following command lines to add a client group DNS:
weka nfs rules add dns <name> <dns>
Use the following command lines to delete a client group DNS:
weka nfs rules delete dns <name> <dns>
Parameters
Name | Type | Value | Limitations | Mandatory | Default |
| String | Group name | Valid name | Yes | |
| String | DNS rule with *?[] wildcard rules | Yes |
Add or delete an IP
Command: weka nfs rules
Use the following command line to add a client group IP:
weka nfs rules add ip <name> <ip>
Use the following command line to delete a client group IP:
weka nfs rules delete ip <name> <ip>
Parameters
Name | Type | Value | Limitations | Mandatory | Default |
| String | Group name | Valid name | Yes | |
| String | IP with netmask rule, in the 1.1.1.1/255.255.0.0 format | Valid IP | Yes |
Manage NFS client permissions
Command: weka nfs permission
Use the following command line to add or update NFS permissions:
weka nfs permission add <filesystem> <group> [--path path] [--permission-type permission-type] [--squash squash] [--anon-uid anon-uid] [--anon-gid anon-gid] [--obs-direct obs-direct] [--manage-gids manage-gids] [--privileged-port privileged-port]
Use the following command line to update NFS permissions:
weka nfs permission update <filesystem> <group> [--path path] [--permission-type permission-type] [--squash squash] [--anon-uid anon-uid] [--anon-gid anon-gid] [--obs-direct obs-direct] [--manage-gids manage-gids] [--privileged-port privileged-port] [--supported-versions supported-versions]
Use the following command line to delete NFS permissions:
weka nfs permission delete <filesystem> <group> [--path path]
Parameters
Name | Type | Value | Limitations | Mandatory | Default |
| String | Filesystem name | Existing filesystem. A filesystem set with required authentication cannot be used for NFS export. | Yes | |
| String | Client group name | Existing client group | Yes | |
| String | The root of the share | Valid path | No | / |
| String | Permission type |
| No |
|
| String | Squashing type |
| No |
|
| Number | Anonymous user ID (relevant only for root squashing) | Valid UID (between 1 and 65535) | Yes (if root squashing is enabled) | 65534 |
| Number | Anonymous user group ID (relevant only for root squashing) | Valid GID (between 1 and 65535) | Yes (if root squashing is enabled) | 65534 |
| Boolean | See Object-store Direct Mount section |
| No | No |
| String | Sets external group IDs resolution. The list of group IDs received from the client will be replaced by a list of group IDs determined by an appropriate lookup on the server. | Relevant only when using | No |
|
| String | Sets the share to only be mounted via privileged ports (1-1024), usually only allowed by the root user. |
Relevant only when using | No |
|
| String | A comma-separated list of supported NFS versions. |
| No |
|
Last updated