Renaming a Node from the Command-Line
Provides distribution-specific instructions for renaming a node.
Procedure
ATTENTION
Ensure that the host name you set is resolvable. Add the
host name to the /etc/hosts
file. For example: 10.10.19.22
host.qa.net
. Data
Fabric installation and commands fail if the host name is not
resolvable.-
Stop Warden on the node. Example:
service mapr-warden stop
-
If the node is a ZooKeeper node, stop ZooKeeper on the node. Example:
service mapr-zookeeper stop
-
Rename the host:
- Red Hat 6.x and CentOS 6.x: To preserve the new host name after reboot, edit
the
HOSTNAME
parameter in the/etc/sysconfig/network
file and restart thexinetd
service or reboot the node. To change the host name temporarily without a reboot, run:hostname desired-host-name
- Red Hat 7.x and CentOS 7.x: Run the command:
hostnamectl set-hostname desired-host-name --static
Alternatively, enter the host name in the/etc/hostname
file, and run:
Both these methods preserve the host name across reboots.hostname -F /etc/hostname
- On Ubuntu, first install dbus if it is not installed.
Next, run the command:apt-get install dbus
hostnamectl set-hostname desired-host-name --static
Alternatively, edit the host name in the/etc/hostname
file, and run:
Both these methods preserve the host name across reboots.hostname -F /etc/hostname
- Red Hat 6.x and CentOS 6.x: To preserve the new host name after reboot, edit
the
-
If the node is a ZooKeeper node or a CLDB node, run
configure.sh
with a list of CLDB and ZooKeeper nodes. -
If the node is a ZooKeeper node, start ZooKeeper on the node. Run:
service mapr-zookeeper start
-
Start Warden on the node. Run:
service mapr-warden start
What to do next
- CLDB or ZooKeeper node, run
configure.sh
on all the nodes with the new host name, to update themapr-clusters.conf
file with the new host name. Ensure that there are no duplicate entries in the file. Also, verify that the new host is accessible from all the nodes. - Node, some local volumes (such as for audit, and metrics) may exist with both the old and new host names. If you want, you can remove the local volumes with the old host name, use the existing local volume path, or remount to the new path.