从群集的一个节点中执行此过程,以便在群集的两个节点上配置 Open HA Cluster 软件。
此过程使用的是 scinstall 命令的交互形式。要使用 scinstall 命令的非交互形式(如在开发安装脚本时),请参见 scinstall(1M) 手册页。
执行以下任务:
确保每个节点上都安装了 Open HA Cluster 软件包。请参见如何安装 Open HA Cluster 2009.06 软件。
确定要使用的 scinstall 实用程序的模式是“典型”还是“自定义”。
使用“自定义”模式可让 scinstall 实用程序为群集专用互连创建新的虚拟网络接口 (VNIC)。
如果您已预配置了 VNIC,则既可以使用“典型”模式,也可以使用“自定义”模式。
对于 Open HA Cluster 软件的“典型”安装,scinstall 将自动指定以下配置默认值。
组件 |
默认值 |
---|---|
专用网地址 |
172.16.0.0 |
专用网网络掩码 |
255.255.240.0 |
群集传输适配器 |
恰好两个适配器 |
群集传输交换机 |
switch1 和 switch2 |
全局隔离 |
已启用 |
全局设备文件系统名称 |
查找 /globaldevices 分区,然后提示您配置 lofi 设备 |
安装安全性 (DES) |
已限制 |
根据是在“典型”模式还是在“自定义”模式下运行 scinstall 实用程序,填写以下群集配置工作单之一。
“典型”模式工作单-如果将使用“典型”模式并接受所有默认值,请填写以下工作单。
“自定义”模式工作单-如果将使用“自定义”模式并自定义配置数据,请填写以下工作单。
对于全局设备文件系统,请仅使用 lofi 设备。请勿尝试配置专用 /globaldevices 分区。对于询问是否要使用或创建文件系统的所有提示均回答“否”。拒绝配置文件系统后,scinstall 实用程序会提示您创建 lofi 设备。
按照以下指导在此过程中使用交互式的 scinstall 实用程序:
交互式的 scinstall 使您可以提前键入。因此,如果未立即显示下一个菜单屏幕,请勿多次按回车键。
除非另外指明,否则按 Ctrl-D 键可返回到一系列相关问题的开始处或者返回到主菜单。
默认答案或先前会话的答案将显示在问题末尾的方括号 ([ ]) 中。按回车键即可输入方括号中的答复而无需键入。
在要在群集中配置的每个节点上,成为超级用户。
或者,如果为您的用户帐户指定了主管理员 (Primary Administrator) 配置文件,则可通过配置文件 shell 以非超级用户身份执行命令,或者在命令的前面加上 pfexec 命令。
在每个节点上,禁用网络自动配置 (Network Auto-Magic, NWAM)。
NWAM 会激活单个网络接口并禁用所有其他网络接口。因此,NWAM 不能与 Open HA Cluster 2009.06 软件共存,您必须在配置或运行群集之前禁用 NWAM。
在每个群集节点上,确定 NWAM 处于启用状态还是禁用状态。
phys-schost# svcs -a | grep /network/physical |
如果 NWAM 处于启用状态,则输出内容将类似如下:
online Mar_13 svc:/network/physical:nwam disabled Mar_13 svc:/network/physical:default |
如果 NWAM 处于禁用状态,则输出内容将类似如下:
disabled Mar_13 svc:/network/physical:nwam online Mar_13 svc:/network/physical:default |
如果 NWAM 在某一节点上处于启用状态,请将其禁用。
phys-schost# svcadm disable svc:/network/physical:nwam phys-schost# svcadm enable svc:/network/physical:default |
在每个节点上,配置每个公共网络适配器。
确定系统上有哪些适配器。
phys-schost# dladm show-link |
激活 (plumb) 某个适配器。
phys-schost# ifconfig adapter plumb up |
为该适配器指定 IP 地址和网络掩码。
phys-schost# ifconfig adapter IPaddress netmask + netmask |
检验适配器是否已启动。
确保注释输出中包含 UP 标志。
phys-schost# ifconfig -a |
为适配器创建一个配置文件。
此文件可确保适配器的配置在重新引导后不会失效。
phys-schost# vi /etc/hostname.adapter IPaddress |
在两个节点上,对于在每个节点上配置的每个公共网络适配器,将一个条目添加到 /etc/inet/hosts 文件。
phys-schost# vi /etc/inet/hosts hostname IPaddress |
如果使用命名服务,请添加所配置的每个公共网络适配器的主机名和 IP 地址。
重新引导每个节点。
phys-schost# /usr/sbin/shutdown -y -g0 -i6 |
检验所有适配器是否均进行了配置且已启动。
phys-schost# ifconfig -a |
在每个节点上,启用交互式 scinstall 实用程序启用时所需的最少量的 RPC 服务。
安装 OpenSolaris 软件时,将会自动配置一个限制性的网络配置文件。此配置文件的限制性很强,使得群集专用网络无法正常运行。要启用专用网络功能,请运行以下命令:
phys-schost# svccfg svc:> select network/rpc/bind svc:/network/rpc/bind> setprop config/local_only=false svc:/network/rpc/bind> quit phys-schost# svcadm refresh network/rpc/bind:default phys-schost# svcprop network/rpc/bind:default | grep local_only |
最后一条命令的输出应显示 local_only 属性现在设置为 false。
有关重新启用网络服务的更多信息,请参见《Solaris 10 5/08 安装指南:规划安装和升级》中的“规划网络安全性”。
从一个群集节点启动 scinstall 实用程序。
phys-schost# /usr/cluster/bin/scinstall |
键入 "Create a New Cluster or Add a Cluster Node" 所对应的选项号并按回车键。
*** Main Menu *** Please select from one of the following (*) options: * 1) Create a new cluster or add a cluster node * 2) Print release information for this cluster node * ?) Help with menu options * q) Quit Option: 1 |
将显示 "New Cluster and Cluster Node" 菜单。
键入 "Create a New Cluster" 所对应的选项号并按回车键。
将显示 "Typical or Custom Mode" 菜单。
键入与 "Typical" 或 “Custom” 相对应的选项号并按回车键。
将显示 "Create a New Cluster" 屏幕。阅读相关要求,然后按 Ctrl-D 组合键继续。
按照菜单提示给出您的答案 ,所做回答应依据于您在配置规划工作单中填写的内容。
scinstall 实用程序用于安装和配置所有群集节点并重新引导群集。将所有节点成功引导到群集中之后,即建立了群集。Open HA Cluster 安装输出记录在 /var/cluster/logs/install/scinstall.log. N 文件中。
在每个节点上检验服务管理工具 (Service Management Facility, SMF) 的多用户服务是否处于联机状态。
如果某个节点上的服务尚未处于联机状态,请等到状态变为联机后再继续执行下一步。
phys-schost# svcs multi-user-server STATE STIME FMRI online 17:52:55 svc:/milestone/multi-user-server:default |
phys-schost# /usr/cluster/bin/clnode status |
输出类似于以下内容。
=== Cluster Nodes === --- Node Status --- Node Name Status --------- ------ phys-schost-1 Online phys-schost-2 Online |
有关更多信息,请参见 clnode(1CL) 手册页。
当所有受监视的磁盘路径都发生故障时,如果至少有一个磁盘可从群集中的另一节点访问,则此功能会自动重新引导节点。
如果要在具有高可用性的本地文件系统上使用 HA for NFS 数据服务,请确保禁用回送文件系统 (loopback file system, LOFS)。
要禁用 LOFS,请将以下条目添加到群集的每个节点上的 /etc/system 文件中。
exclude:lofs |
对 /etc/system 文件所做的更改将在下次重新引导系统后生效。
如果在具有高可用性的本地文件系统中使用 HA for NFS 数据服务并且 automountd 正在运行,则不能启用 LOFS。LOFS 可能会导致 HA for NFS 数据服务出现切换问题。如果选择在具有高可用性的本地文件系统上添加 HA for NFS 数据服务,则必须进行以下配置更改之一。
禁用 LOFS。
禁用 automountd 守护进程。
从自动安装程序映射中排除属于由 HA for NFS 数据服务导出的具有高可用性的本地文件系统的所有文件。这样做可以使 LOFS 和 automountd 守护进程都保持启用状态。
有关回送文件系统的更多信息,请参见《系统管理指南:设备和文件系统》中的“回送文件系统”。
以下示例显示了当 scinstall 在双节点群集 schost 上完成配置任务时记录的 scinstall 进度消息。该群集是在“典型”模式下使用 scinstall 实用程序从 phys-schost-1 安装的。另一个群集节点为 phys-schost-2。适配器名称为 e1000g0。不存在 /globaldevices 分区,因此会在 lofi 设备上创建全局设备名称空间。不使用自动法定设备选择。
*** Create a New Cluster *** Tue Apr 14 10:36:19 PDT 2009 Attempting to contact "phys-schost-1" ... Searching for a remote configuration method ... scrcmd -N phys-schost-1 test isfullyinstalled The Sun Cluster framework software is installed. scrcmd to "phys-schost-1" - return status 1. rsh phys-schost-1 -n "/bin/sh -c '/bin/true; /bin/echo SC_COMMAND_STATUS=\$?'" phys-schost-1: Connection refused rsh to "phys-schost-1" failed. ssh root@phys-schost-1 -o "BatchMode yes" -o "StrictHostKeyChecking yes" -n "/bin/sh -c '/bin/true; /bin/echo SC_COMMAND_STATUS=\$?'" No RSA host key is known for phys-schost-1 and you have requested strict checking. Host key verification failed. ssh to "phys-schost-1" failed. The Sun Cluster framework is able to complete the configuration process without remote shell access. Checking the status of service network/physical:nwam ... /usr/cluster/lib/scadmin/lib/cmd_test isnwamenabled scrcmd -N phys-schost-1 test isnwamenabled Plumbing network address 172.16.0.0 on adapter e1000g0 >> NOT DUPLICATE ... done Plumbing network address 172.16.0.0 on adapter e1000g0 >> NOT DUPLICATE ... done Testing for "/globaldevices" on "phys-schost-2" ... /globaldevices is not a directory or file system mount point. Cannot use "/globaldevices" on "phys-schost-2". Testing for "/globaldevices" on "phys-schost-1" ... scrcmd -N phys-schost-1 chk_globaldev fs /globaldevices /globaldevices is not a directory or file system mount point. /globaldevices is not a directory or file system mount point. Cannot use "/globaldevices" on "phys-schost-1". scrcmd -N phys-schost-1 chk_globaldev lofi /.globaldevices 100m ---------------------------------- - Cluster Creation - ---------------------------------- Started cluster check on "phys-schost-2". Started cluster check on "phys-schost-1". cluster check completed with no errors or warnings for "phys-schost-2". cluster check completed with no errors or warnings for "phys-schost-1". Cluster check report is displayed … scrcmd -N phys-schost-1 test isinstalling "" is not running. scrcmd -N phys-schost-1 test isconfigured Sun Cluster is not configured. Configuring "phys-schost-1" ... scrcmd -N phys-schost-1 install -logfile /var/cluster/logs/install/scinstall.log.2895 -k -C schost -F -G lofi -T node=phys-schost-2,node=phys-schost-1,authtype=sys -w netaddr=172.16.0.0,netmask=255.255.240.0,maxnodes=64,maxprivatenets=10, numvirtualclusters=12 -A trtype=dlpi,name=e1000g0 -B type=direct ips_package_processing: ips_postinstall... ips_package_processing: ips_postinstall done Initializing cluster name to "schost" ... done Initializing authentication options ... done Initializing configuration for adapter "e1000g0" ... done Initializing private network address options ... done Plumbing network address 172.16.0.0 on adapter e1000g0 >> NOT DUPLICATE ... done Setting the node ID for "phys-schost-1" ... done (id=1) Verifying that NTP is configured ... done Initializing NTP configuration ... done Updating nsswitch.conf ... done Adding cluster node entries to /etc/inet/hosts ... done Configuring IP multipathing groups ...done Verifying that power management is NOT configured ... done Unconfiguring power management ... done /etc/power.conf has been renamed to /etc/power.conf.041409104821 Power management is incompatible with the HA goals of the cluster. Please do not attempt to re-configure power management. Ensure network routing is disabled ... done Network routing has been disabled on this node by creating /etc/notrouter. Having a cluster node act as a router is not supported by Sun Cluster. Please do not re-enable network routing. Please reboot this machine. Log file - /var/cluster/logs/install/scinstall.log.2895 scrcmd -N phys-schost-1 test hasbooted This node has not yet been booted as a cluster node. Rebooting "phys-schost-1" ... |
配置不成功-如果有一个或多个节点无法加入群集,或者指定了错误的配置信息,请首先尝试重新执行此过程。如果不能解决问题,请在每个配置有误的节点上执行如何卸载 Open HA Cluster 软件过程,以将该节点从群集配置中删除。然后重新执行此过程。
如果尚未在群集中配置法定设备,请转至如何配置法定设备。
否则,请转至如何检验法定配置和安装模式。