45Drives Knowledge Base
KB450406 - Exporting NFS-Ganesha to multiple subnets
https://knowledgebase.45drives.com/kb/kb450406-exporting-nfs-ganesha-to-multiple-subnets/

KB450406 - Exporting NFS-Ganesha to multiple subnets

Posted on June 1, 2021 by Mitchell Hall


Scope/Description

This guide will run through the steps of adding new VIP's (virtual IP addresses) with pacemaker to service secondary/tertiary subnets from the same gateway servers to allow NFS shares to be exported via additional subnets.

Prerequisites

This guide assumes the cluster is up and functioning, with NFS deployed with 45Drives Ansible playbooks using a single VIP in active/passive mode.

The user must have dedicated network interface(s) to have a dedicated static IP assigned to the secondary subnet(s) before they can begin creating VIP's with pacemaker.

Steps

 

 

 

 

# pcs status
Cluster name: hacluster
Cluster Summary:
* Stack: corosync
* Current DC: octnfs2 (version 2.0.4-6.el8_3.1-2deceaa3ae) - partition with quorum
* Last updated: Tue Jun 1 12:47:23 2021
* Last change: Tue Jun 1 12:09:20 2021 by root via cibadmin on octnfs2
* 2 nodes configured
* 3 resource instances configured

Node List:
* Online: 

Full List of Resources:
* nfs_server (systemd:nfs-ganesha): Started octnfs2
* nfs_ip (ocf::heartbeat:IPaddr2): Started octnfs2

Daemon Status:
corosync: active/enabled
pacemaker: active/enabled
pcsd: active/enabled

 

# pcs resource create nfs_ip2 ocf:heartbeat:IPaddr2 ip=172.16.152.20 cidr_netmask=24 nic=ens7 op monitor interval=30s

This command is creating a new VIP resource called nfs_ip2.

This command is creating a VIP on the 172.16.152.0/24 network

This command is ensuring that this VIP always runs on the ens7 network interface, because that is the NIC that is dedicated to the 172.16.152.0/24 network.

Make sure to replace the ip with an unused IP on the correct chosen subnet

Make sure to replace the cidr_netmask with the correct subnet size

Make sure to replace the NIC with the correct network interface

# systemctl restart nfs-ganesha.service
# systemctl restart nfs-ganesha.service

 

 


Verification

Troubleshooting