Explains how to set environment variables on a client node.
About this task
Some of the environment variables defined on the servers for the HPE Data Fabric cluster must be defined with the same values on
the client. You can add environment variables directly to the startup script, or create
a local env.sh file in
/usr/local/mapr-loopbacknfs/conf. You cannot simply copy the
env.sh file from a server node in the cluster because the
MAPR_HOME setting would be different.The
loopbacknfs service can run either on file server nodes or
external edge nodes.
loopbacknfs running on file server node:
- If you want
loopbacknfs to avoid using the internal IP address
that has been set by using the MAPR_SUBNETS (usually set
through env_override.sh/env.sh which is
applied across all processes running in a machine), mark
NFS_LOOPBACK_HONOUR_SUBNETS as false.
loopbacknfs running on edge node:
- When
MAPR_SUBNETS environment variable is set on edge nodes,
the intention is to divert the traffic through the intended IP address, instead
of all. Whether the given subnet is to be used or not is determined by the value
of the NFS_LOOPBACK_HONOUR_SUBNETS environment variable.
Re-registration of loopbacknfs service
- The process of re-registration of
loopbacknfs with CLDB when
using or honoring subnets is done as follows:
Complete the following steps to specify environment variables:
Procedure
-
On a server node in the HPE Data Fabric cluster,
locate the
env.sh and env_override.sh files in
the /opt/mapr/conf directory. If the
env_override.sh file is not present, use the
env.sh file. For more information about these files, see
About env_override.sh.
-
Retrieve the values for
MAPR_SUBNETS and
JAVA_HOME from the server files and clone them to
/usr/local/mapr-loopbacknfs/conf/env.sh on the client node.
-
(Optional) Set the
NFS_LOOPBACK_HONOUR_SUBNETS environment
variable to avoid re-registration whenever there is a change in any network
interface. The value can be:
true to consider the MAPR_SUBNETS
while registering with CLDB. If set to true,
re-registration does not happen when there is a change in any network
interface with IP that is not in the given MAPR_SUBNETS. If
there is a change in the device address, but the device address is outside
of subnet, the re-registration does not happen. Re-registration happens if
there are no subnets at all and the device address has changed.
false to ignore the MAPR_SUBNETS. If
set to false, re-registration happens when there is a
change in any network interface.
For example:
# export NFS_LOOPBACK_HONOUR_SUBNETS=true
# export MAPR_SUBNETS=10.10.104.0/24
# env | grep SUBNET
NFS_LOOPBACK_HONOUR_SUBNETS=true
MAPR_SUBNETS=10.10.105.0/24,10.10.104.0/24
-
Change the
JAVA_HOME setting to point to the location where
Java is installed on the client.
-
Add the following lines to the client node
env.sh file:
export MAPR_HOME=/usr/local/mapr-loopbacknfs
export MAPR_TICKETFILE_LOCATION=<MAPR user ticket path>
NOTE
To allow impersonation, set the value for
MAPR_TICKETFILE_LOCATION to the path to the
mapr user ticket.
-
Save and close the
env.sh file.
-
Restart the
loopbacknfs service for the changes to take
effect.