Accessing VPC regional file storage shares from IBM Power Virtual Server instances
This tutorial might incur costs. Use the Cost Estimator to generate a cost estimate based on your projected usage.
In this tutorial, you learn how to mount a file share with regional availability on IBM Power Virtual Server server instances. You cannot directly mount a file storage share on IBM Power Virtual Server instances and must instead use a path through a network load balancer (NLB). You create a file storage profile with regional availability and a mount target in IBM VPC. You create two network load balancers with routing mode in different availability zones in IBM VPC, and configure the route tables. Then, you mount the file storage share on the virtual server instances in IBM Power Virtual Server.
The following architecture overview diagram illustrates this scenario.
The virtual server instance in IBM Power Virtual Server sends a request through a transit gateway to the file storage share. According to the rule in the routing table of the VPC, the network traffic to the file storage share is directed to the
network load balancer.
Routing_mode is enabled for the network load balancer. It bypasses a back-end pool and sends requests directly to the destination IP address. The file storage share responds and the response is sent directly to the virtual server instance
in IBM Power Virtual Server. The network load balancer (NLB) with routing mode has two IP addresses (active and standby). When a failover occurs, the route mode updates all routing rules that are created for the VPC with a next_hop of the standby IP. Both the active IP and the standby IP are used during the lifetime of an NLB with route mode.
Before you begin
-
Create a VPC spanning at least two availability zones, or use an existing one.
-
Create the address prefixes and the subnets for the multizone region VPC.
-
Create two IBM Power Virtual Server workspaces in the IBM Cloud region, with affinity to the availability zones of the VPC.
See the mapping between the VPC zones and the Power Virtual Server zones in IBM Cloud regions.
-
Create two virtual server instances in IBM Power Virtual Server. Deploy one virtual server instance in each of the two workspaces. Note the IP addresses of the virtual server instances.
-
Create a Transit Gateway and attach the VPC subnets and the IBM Power Virtual Server workspaces to the Transit Gateway.
-
Check the user permissions. Make sure that your user account has permissions to create and manage VPC resources. See Granting user permissions for VPC resources. Assign a viewer role or higher on the resource group used for the VPC resources. Assign an editor role or higher on the service VPC Infrastructure Services.
-
Use or create an SSH key to connect to the virtual server instances. If you don't have an SSH key, see Getting started with SSH keys.
Creating a security group to allow NFS V4 traffic
Create a security group and configure inbound rules for port 2049.
- Go to Security groups for VPC and click Create.
- Verify or set the Geography and Region fields.
- Enter
nfs-server-sgfor the Name. - Select the same Resource group as the VPC resource group.
- Select your VPC in the Virtual private cloud list.
- Create an inbound rule for each virtual server instance (NFS client).
- In the Inbound rules section, click Create.
- Configure the rule as follows:
- Protocol: Select TCP.
- Port: Select Port range, and enter
2049for both Port min and Port max. - Source type: Select IP or CIDR.
- Enter the IP address of each virtual server instance.
- If your instances are in a subnet and you want to allow access from all members of the subnet, enter the subnet's CIDR block.
- Destination type: Select Any.
- Configure the rule as follows in addition to above when provisioning a mount target with in-transit encryption EIT:
- Protocol: Select TCP.
- Port: Select Port range, and enter
20049for both Port min and Port max. - Source type: Select IP or CIDR.
- Enter the IP address of each virtual server instance.
- If your instances are in a subnet and you want to allow access from all members of the subnet, enter the subnet's CIDR block.
- Destination type: Select Any.
- Click Create to save the rule.
- Create a common outbound rule.
- In the Outbound rules section, click Create.
- Configure the rule as follows:
- Protocol: Select TCP.
- Port: Select Any.
- Destination type: Select Any.
- Source type: Select Any.
- Click Create to save the rule.
- Finalize the security group.
Gathering the file storage IP address and mount path information
Later, set the Destination parameter in the VPC route entry to the primary IP of the mount target. Use the Mount path parameter as an argument for the mount command on the IBM Power
Virtual Server instance.
Creating the private network load balancers with routing mode
Creating the service-to-service authentication policy
To support routing mode, you must first create a service-to-service authentication policy for your NLB.
Creating the network load balancers
You need to create two load balancers, each of them for the specific subnet in an availability zone.
-
Go to the Load balancers for VPC page and click Create.
-
Select Network Load Balancer (NLB) as the Load balancer type.
-
In the Location section, select the same Geography and Region that is used for the virtual private cloud.
-
Enter
nfs-server-nlb-1in the Name field. -
Select the same Resource group as the VPC resource group.
-
Select your VPC in the Virtual private cloud list.
-
Select the Subnet according to the subnet of the availability zone.
-
Check Private in the Type section.
-
Set Routing mode to On to create a network load balancer with routing mode.
-
In the Back-end pools section, click Create pool. Set the parameters to the following values.
- Name:
nfs-server-fwd-pool - Pool protocol:
TCP - Session stickiness:
None - Method:
Round robin - Click Create.
- Name:
-
In the Front-end listeners section, click Create listener. Select your Back-end pool and click Save.
-
In the Security Groups sections, check the
nfs-server-sgsecurity group, and clear the default security group. -
Click Create a load balancer to provision the load balancer.
As part of the process, you create a back-end pool. However, you cannot define the back-end pool Failsafe policy directly, and it must be updated in the next step.
Repeat the step and create the second load balancer nfs-server-nlb-2 in the other VPC zone.
Updating the network load balancer failsafe policy
Update the Failsafe policy for the nfs-server-fwd-pool back-end pool. The network load balancer then bypasses the back-end pool and sends requests directly to the destination IP address.
- Go to Load balancers for VPC.
- Click the load balancer
nfs-server-nlb-1. - Click the Back-end pools tab and select the pool
nfs-server-fwd-pool. - Click
nfs-server-fwd-pooland thenEdit. - In the
Failsafe policysection, selectBypassas the Action. - Click
Save.
Repeat those steps for load balancer nfs-server-nlb-2.
Collecting the private IP addresses of the load balancer
-
Go to Load balancers for VPC.
-
Click
nfs-server-nlb-1. -
In the Load balancer details - Private IPs section, make a note of the first IP address entry in the list.
Repeat those steps for load balancer nfs-server-nlb-2.
Later, you set the Next hop parameter in the VPC route entries to the active Private IP address of the load balancer.
Creating a routing table and routes for VPC
Creating a routing table
Customize the Ingress routes to route incoming traffic from external sources such as the IBM Cloud Transit Gateway. Only one custom routing table is associated with an ingress source. If an ingress routing table exists for the IBM Cloud Transit Gateway source, add the route to that table.
Updating the routing table
To propagate routes outside the VPC address prefix range, enable Advertise to for the transit gateway.
Creating routes
-
Go to Routing tables for VPC.
-
Click the name
nfs-server-routing. -
Click Create.
-
Select the zone, according to the zone of the network load balancer, in the Zone field.
-
Enter
rfs-route-1in the Name field. -
Using CIDR notation, enter the IP address of the mount target as Destination CIDR.
-
Select
Deliveras the Action. -
Enter the
IP address of the network load balancer #1as the Next hop (IP address). -
Switch
AdvertisetoOn. -
Click Save to add the route to the table.
Repeat those steps, and use the name rfs-route-2, for the IP address of the network load balancer #2.