This article describes the steps needed to expose directories exclusively to the NFSv3 file sharing protocol . If you would like to set up multiprotocol views which expose directories to both SMB and NFS clients, please follow Enabling Multiprotocol Access (NFSv3 + SMB).
File access is usually authorized through an external authorization provider. You can also use the local provider, which is internal to the VAST Cluster and lets you add users with their NFS user attributes.
If auth provider(s) or local users are not yet configured, see:
A view policy is a reusable set of configurations. Every view has a view policy. Multiple views may use the same view policy. Before creating a view that is exposed as an NFS export, you need to make sure you have a view policy that is configured correctly for this type of view. You can either modify a view policy or create a new one.
In the VAST Web UI, select Element Store from the left navigation menu and then select View Policies.
The View Policies tab displays at least one view policy, the default view policy.
To edit a view policy, click to open the Actions menu for the policy and select Edit. Alternatively, to create a new view policy, click Create Policy at the top right of the grid.
The Add Policy or Update Policy dialog opens with the General area expanded.
In the Name field, enter a unique name for the policy.
From the Security Flavor dropdown, select NFS. Security flavors determine how file permissions are managed when views are exposed to multiple file sharing protocols. NFS is the setting you need for views that you will expose as NFS exports without exposing them to other client protocols.
To limit access to specific VIP pools, select those VIP pool(s) in the VIP Pools dropdown.
If no VIP pools are selected, all VIP pools can access all views that are attached to this view policy.
From the Group Membership Source dropdown, choose the source used for retrieving group memberships of NFS users for the purposes of authorizing access to files and directories:
Client. The GIDs declared in the RPC as the user's leading group and auxiliary groups are trusted and provider-sourced groups are not considered.
Providers. Group memberships retrieved from authorization providers are considered as the user's group memberships (as for SMB-only and multiprotocol views). The GIDs declared in the RPC are ignored.
Client and Providers. Both the GIDs declared in the RPC and group memberships retrieved from authorization providers are considered.
For more information about the impact of this setting, see The VAST Cluster Authorization Flow.
Expand the NFS section. Here you can manage which NFS hosts are allowed to access the view and the types of access you allow to different hosts.
Two wildcard entries initially appear in the Read/Write and Root Squash rows of the grid:
These wildcards represent all IPs of all hosts. This default configuration gives all hosts read/write access and root squashing.
Add and remove entries in the access type grid to allow the exact host access that you want.
Click the +Add new IP button for the access type you want to add hosts to.
The IPs list for the access type becomes editable.
Add hosts using any of the following expressions in a comma separated list:
A single IP.
A netgroup key, which starts with '@'. This is supported for NIS netgroups if NIS is configured. For information about how to use netgroups, see Using NIS Netgroups to Authorize Host Access to NFS Exports for more information.
A subnet indicated by CIDR notation. For example: 22.214.171.124/24.
A range of IPs indicated by an IP address with '*' as a wildcard in place of any of the 8-bit fields in the address. For example, 3.3.3.*, or 3.3.*.*.
The access types comprise these categories:
Controlling read and write operations:
Read / Write. Read/write access.
Read Only. Read only access.
Controlling squash policy:
No Squash. All operations are supported. Use this option if you trust the root user not to perform operations that will corrupt data.
Root Squash. The root user is mapped to nobody for all file and folder management operations on the export. This enables you to prevent the strongest super user from corrupting all user data on the VAST Cluster.
All Squash. All client users are mapped to nobody for all file and folder management operations on the export.
Controlling access to the trash folder:
Trash Access. This option does not appear here by default. It appears only if Enable trash folder access is enabled on the Settings page. Granting this permission gives hosts the ability to delete files by moving them into a trash folder, from which they are automatically deleted. Requires also No Squash. For more information, see Trash Folder (for Rapid Parallel File Deletion).
You can add hosts to any and all of the types, but within each category no more than one type will be applied to any given host. If a host is specified with multiple entries in mutually exclusive types, the conflict is resolved as follows:
Click Add or press the ENTER key on your keyboard.
The entries are added.
To remove an entry, hover to the right of the entry until a removal button appears and click it:
Switch back to the General tab and (optionally) expand the Advanced section and change the following settings:
Atime frequency. atime is a metadata attribute of NFS files that represents the last time the file was updated. atime is updated on read operations if the difference between the current time and the file's atime value is greater than the configured atime frequency. Consider that a very low value might have a performance impact if high numbers of files are being read.
Specify ATIME_FREQUENCY as an integer followed by a unit of time (s = seconds, m= minutes, h=hours, d=days).
Posix ACL. Enables full support of extended POSIX Access Control Lists (ACL). By default, VAST Cluster supports the traditional POSIX file system object permission mode bits, (minimal ACL mode) in which each file has three ACL entries defining the permissions for the owner, owning group, and others, respectively. To learn more about POSIX ACL, see https://linux.die.net/man/5/acl.
setfaclLinux command is blocked if this option is not enabled.
Use 32-bit File IDs (disabled by default). Sets the VAST Cluster's NFS server to use 32bit file IDs. This setting supports legacy 32-bit applications running over NFS.
The policy is created and added to the list.
Use the viewpolicy create command to create a new view policy or the viewpolicy modify command to modify the default view policy. For command syntax, follow NFS Usage.
A view exposes a specific directory to a client protocol (in this case NFS). In other words, this is how you create a directory in the file system and create an NFS export on the directory.
In the VAST Web UI, select Element Store from the left navigation menu and then select Views.
Click Create View to add a new view.
The Add View dialog appears.
In the Path field, enter the full path from the top level of the storage system on the cluster to the location that you want to expose. The directory may exist already, such as if it was created by a client inside a mounted parent directory. It could also be a path to a new directory which you'll create now (see step 7).
Open the Protocols dropdown, select NFS to expose the view to NFS clients.
In the NFS Alias field, you can optionally specify an alias for the mount path of the NFS export. An alias must begin with a forward slash ("/") and must consist of only ASCII characters.
From the Policy Name dropdown, select the view policy that is configured as described in the previous step. It might be the default policy or one you created for this purpose.
If the directory does not already exist in the file system, enable the Create Directory setting to create the directory.
The view is now created. You can see it displayed in the Views tab.
Use the view create command.
Article is closed for comments.