Logical hosts are the objects that fail over if a node fails. Each logical host is composed of a disk group or groups, a relocatable IP address, and a logical host name. Logical hosts are only used in configurations with HA data services. There are no logical hosts in a parallel database configuration.
You add or remove logical hosts by updating the logical host configuration information stored by the cluster, and then reconfiguring the cluster. When you configure the cluster originally, you provide scinstall(1M) with information about your logical host configuration. Once the cluster is up, there are two ways to change this information:
Rerun the scinstall(1M) command - The scinstall(1M) command provides a menu-based interface to the scconf(1M) command and is the recommended way to modify your logical host configuration. You must run scinstall(1M) as root.
Run the scconf(1M) command - If you choose to use the scconf(1M) command, refer to the man page for options and other information. If you are going to set up a logical host with more than one disk group, you must use the scconf(1M) command to configure it.
As part of the process of adding a logical host, you will be asked to provide the following information:
The names of the primary public network controllers for the cluster nodes.
Whether the cluster serves any secondary public subnets.
Whether you want to initialize Public Network Management (PNM) on the current cluster node. You would only re-initialize PNM if you have added a network controller, or changed your controller configuration while adding the new logical host.
The name of the new logical host.
The name of the default master for the new logical host.
The name of the disk group included in the logical host.
Whether to enable automatic failback for the new logical host. Automatic failback means that in the event that this logical host fails over to a backup node, it will be remastered by its default master once the failed node is back in the cluster. See "Disabling Automatic Switchover" for details.
The disk group name for the new logical host.
Gather the answers to these questions before starting the procedure. Note that you must have already set up your disk group to be used by the new logical host. Refer to the appropriate appendix in the Sun Cluster 2.2 Software Installation Guide for your volume manager for details.
Use the following procedure to add a logical host to a cluster.
Run the scinstall(1M) command and select the Change option from the main menu.
# scinstall Assuming a default cluster name of planets Note: Cluster planets is currently running. Install/Uninstall actions are disabled during cluster operation. <<Press return to continue>> Checking on installed package state ........................ ============ Main Menu ================= 1) Change - Modify cluster or data service configuration. 2) Verify - Verify installed package sets. 3) List - List installed package sets. 4) Quit - Quit this program. 5) Help - The help screen for this menu. Please choose one of the menu items: [5]: 1 |
From the Change menu, choose the Logical Hosts option.
=========== Changes Menu ================ Choices from this menu: 1) Logical Hosts - Change the logical hosts configuration. 2) NAFO - Re-initialize the NAFO configuration. 3) Close - Close this menu to return to the Main Menu. 4) Quit - Exit this program. 5) Help - Show the Help screen. Please choose a displayed option: [5] 1 |
This will display the Logical Hosts Configuration menu.
From the Logical Hosts Configuration menu, select the Add option.
====== Logical Hosts Configuration ====== 1) Add - Add a logical host to the cluster. 2) Remove - Remove a logical host from the cluster. 3) List - List the logical hosts in the cluster. 4) Close - Return to the previous menu. 5) Quit - Exit. Please choose an option: 1 |
You will be asked a series of questions regarding the new logical host.
Respond to the prompts with the required information.
Once the scinstall(1M) portion of this procedure is complete, you will be returned to the Logical Hosts Configuration menu.
What is the primary public network controller for "phys-hahost1"? What is the primary public network controller for "phys-hahost2"? Does the cluster serve any secondary public subnets (yes/no) [no]? Re-initialize NAFO on "phys-hahost1" with one ctlr per group (yes/no)? What is the name of the new logical host? hahost1 What is the name of the default master for "hahost1"? phys-hahost1 Enable automatic failback for "hahost1" (yes/no) [no]? Disk group name for logical host "hahost1" [hahost1]? Is it okay to add logical host "hahost1" now (yes/no) [yes]? /etc/opt/SUNWcluster/conf/ha.cdb Checking node status... |
Create a new HA administrative file system and update the /etc/opt/SUNWcluster/conf/hanfs/vfstab.logicalhost file.
When you add a new logical host, you must set up a file system on a disk group within the logical host to store administrative information. The steps for setting up the HA administrative file system differ depending on your volume manager. These steps are described in the volume manager appendixes of the Sun Cluster 2.2 Software Installation Guide.
Do not use host name aliases for the logical hosts. NFS clients mounting Sun Cluster file systems using logical host name aliases might experience statd lock recovery problems.
To remove a logical host from the cluster configuration, the cluster must be up and there must be no data services registered for the logical host.
Stop all data service applications running on the logical host to be removed.
# hareg -n dataservice |
Unregister the data service.
# hareg -u dataservice |
Remove the logical host from the cluster.
Run the scinstall(1M) command as described in the Sun Cluster 2.2 Software Installation Guide and select the Change option from the main menu.
# scinstall Assuming a default cluster name of planets Note: Cluster planets is currently running. Install/Uninstall actions are disabled during cluster operation. <<Press return to continue>> Checking on installed package state ........................ ============ Main Menu ================= 1) Change - Modify cluster or data service configuration. 2) Verify - Verify installed package sets. 3) List - List installed package sets. 4) Quit - Quit this program. 5) Help - The help screen for this menu. Please choose one of the menu items: [5]: 1 |
From the Change menu, select the Logical Hosts option.
=========== Changes Menu ================ Choices from this menu: 1) Logical Hosts - Change the logical hosts configuration. 2) NAFO - Re-initialize the NAFO configuration. 3) Close - Close this menu to return to the Main Menu. 4) Quit - Exit this program. 5) Help - Show the Help screen. Please choose a displayed option: [5] 1 |
This will display the Logical Hosts Configuration menu.
From the Logical Hosts Configuration menu, select the Remove option.
====== Logical Hosts Configuration ====== 1) Add - Add a logical host to the cluster. 2) Remove - Remove a logical host from the cluster. 3) List - List the logical hosts in the cluster. 4) Close - Return to the previous menu. 5) Quit - Exit. Please choose an option: 2 |
This displays a list of configured logical hosts.
Enter the name of the logical host to be removed from the list of configured logical hosts.
The list of logical hosts is: hahost1 hahost2 Which one do you want to remove? hahost1 |
The procedure is now complete and you are returned to the Logical Hosts Configuration menu.
As root, delete the /etc/opt/SUNWcluster/conf/hanfs/vfstab.logicalhost file that was created when the logical host was added to the cluster configuration.