Setting Up VIPs for NFSv4
Describes how to setup Virtual IPs (VIPs) for high availability of NFSv4 servers, using either the Control System or the CLI.
About this task
Virtual IP addresses (VIPs) allow you to achieve high availability with failover when the NFS servers use them to connect to your cluster. When configuring VIPs for NFSv4 servers, ensure that you select NFSv4 server nodes only. HPE Ezmeral Data Fabric does not support failing over between NFSv3 and NFSv4 servers.
Adding VIPs Using the Control System
About this task
You can use the Control System to specify a range of virtual IP addresses and assign them to the pool of servers that are running the NFS service. You can also restrict the assignment of virtual IP addresses to certain subnets.
Before following this procedure, make sure that:
- You have installed NFS on at least three nodes (recommended).
- You have started the NFS gateway service on the servers to which you plan to assign VIPs.
Procedure
- Log in to the Control System and go to the NFS4 service information page where you can configure VIPs for NFSv4 nodes.
- Click Add Virtual IP to display the Add Virtual IP page.
-
Enter the start of the VIP range in the Starting Virtual IP field.
HPE Ezmeral Data Fabric distributes the VIPs in this range to the selected network interfaces. VIPs are automatically migrated between the network interfaces when failures occur.
-
Enter the end of the VIP range in the Ending Virtual IP field.
If you are assigning only one VIP, you can leave the field blank. HPE Ezmeral Data Fabric distributes the VIPs in this range to the selected network interfaces. VIPs are automatically migrated between the network interfaces when failures occur.
-
Enter the Netmask for the VIP range in the Netmask field.
For example:
255.255.255.0
. HPE Ezmeral Data Fabric assigns this netmask to the network interfaces along with the VIPs. - Specify whether (Yes) or not (No) to assign a particular VIP address to a specific server or MAC address. If Yes, enter the MAC address for the network interface to be assigned to the Starting Virtual IP address. The remaining VIP addresses from the same pool are assigned randomly.
-
Select one of the following:
- Use all network interfaces on all nodes that are running
the NFS Gateway service to set up VIPs that use all
network interfaces on all the nodes running the NFS Gateway
service.
If additional NFS Gateway services are started, the network interfaces on their nodes automatically become candidates for the VIPs in this range.
- Select network interfaces to restrict the
assignment of virtual IP addresses to certain subnets: The system displays a list of available and selected node names, physical IP addresses, and MAC addresses. Do one of the following:
- Select from the available list and click to move the selection to Selected VIPs.
- Choose from the selected list and click to remove the chosen entries from the selected list of VIPs.
- Use all network interfaces on all nodes that are running
the NFS Gateway service to set up VIPs that use all
network interfaces on all the nodes running the NFS Gateway
service.
-
Confirm the actual VIP assignment by clicking Save
Changes.
It might take up to 40 seconds to assign the VIPs. If necessary, refresh the page in your browser to view the list of VIPs.
Setting up VIPs for NFSv4 Server from the Command-Line
About this task
To set up VIPs for NFSv4 server:
Procedure
-
Add VIPs to the NFS server nodes in the cluster by running the
virtualip add
command.
For example, for a range of virtual IPs use:maprcli virtualip add -virtualip <vip> -virtualipend <vipend> -service nfs4 -netmask <netmask> -macs <mac>
maprcli virtualip add -virtualip 10.10.104.203 -virtualipend 10.10.104.206 -service nfs4 -netmask 255.255.255.0 -macs "18:e7:28:2e:b0:80 18:e7:28:2e:2d:a0 18:e7:28:2e:2d:a8"
For a single virtual IP, do not include the-virtualipend
parameter. For example:maprcli virtualip add -virtualip 10.10.104.203 -service nfs4 -netmask 255.255.255.0 -macs "18:e7:28:2e:b0:80 18:e7:28:2e:2d:a0 18:e7:28:2e:2d:a8"
For the complete list of required and optional parameters, seevirtualip add
. -
Add the hostname for each VIP in the
/etc/hosts
file on all the nodes in the cluster. -
Add the principal for each VIP and generate the keytab file. That is, repeat
this step in the following order for each VIP:
-
Restart the
rpc.gssd
service on all the NFSv4 server nodes.To restart, run the following command:service rpcgssd start
- Mount the cluster.