Solaris 系统维护命令大全( 四 )



1)如何修改IP地址和主机名

IP地址涉及的文件有:
/etc/hosts (change the IP address)
/etc/netmasks (if subnetting)
/etc/defaultrouter (to specify the new gateway for this subnet)

改变主机名涉及的文件有:
/etc/hosts (change to the new hostname)
/etc/nodename (change to the new hostname)
/etc/hostname. (where is the name of the primary
interface for this system, i.e hostname.hme0 or hostname.le0.
Change to the new hostname.)
/etc/net/ticlts/hosts (change both columns to the new hostname)
/etc/net/ticots/hosts (change both coluums to the new hostname)
/etc/net/ticotsord/hosts (change both columns to the new hostname)
改完上述文件之后推荐重起一下机器 。

2)如何配置hme0、hme1两块网卡的主备关系

只要给hme0配置地址就够了 。
然后会再后面的双机配置中执行下面的命令建立逻辑机的时候会创建出这种关系来 。
#scconf smcp -L smcpwork -n smcp01,smcp02 -g smcpdg -i hme0,hme0,smcpwork -m

3) 配置NAFO (Network Adapter Fail Over)
/opt/SUNWpnm/bin/pnmset
以下显示相关信息
In the following, you will be prompted to do
configuration for network adapter failover
do you want to continue ... [y/n]: y
How many NAFO backup groups on the host [1]:
Enter backup group number [0]:
Please enter all network adapters under nafo0
hme0 hme1
The following test will evaluate the correctness
of the customer NAFO configuration...
name duplication test passed

Check nafo0... < 20 seconds
hme0 is active
remote address = 129.9.168.101
test hme1 wait...
nafo0 test passed 本信息表明通过测试
注意:
NAFO配置时对网线的要求较高,有时要做多次才能成功 。




B、配置双机
双机配置的一般过程是,先启动双机系统,在一个节点上配置cluster和包,
检查无误后,使配置生效,然后就可以进行相应操作 。
注意:
使用双机前,需要检查 smcpdg,querydg 的状态 。执行如下步骤:
(1) 在两个节点分别执行:
# vxdg list
应该只看到 rootdg,不能看到 smcpdg 和 querydg 。
(2) 如果上以步操作看到 smcpdg 或 querydg,需要检查IDS是否在运行(Online) 。
如果在运行,先终止IDS运行,然后使用 vxdg deport 放弃对 Disk Group 的控制 。
====================

双机配置的一般过程是,先启动双机系统,在一个节点上配置cluster和包,检查无误后,使配置生效,然后就可以进行相应操作 。
注意:
使用双机前,需要检查 smcpdg,querydg 的状态 。执行如下步骤:
在两个节点分别执行:
# vxdg list
应该只看到 rootdg,不能看到 smcpdg 和 querydg 。
如果上以步操作看到 smcpdg 或 querydg,需要检查IDS是否在运行(Online) 。如果在运行,先终止IDS运行,然后使用 vxdg deport 放弃对 Disk Group 的控制 。

对双机系统进行配置
在1号机运行#scadmin startcluster smcp01 smcp 。
待1号机双机软件起来之后,在2号机运行#scadmin startnode,将其作为节点加入双机
对双机系统上逻辑机的配置
逻辑机与应用程序对应,是双机系统管理应用程序的方式,每个逻辑机在双机系统上只对外提供一个IP地址 。
================================================
(2)配置cluster
仅仅在一台主机上运行
#scconf iin -L scpwork -n smcp02,smcp01 -g scpdg -i hme0,hme0,scpwork -m
注意:
该命令格式为:
scconf -L -n ,
-g -i
-m
其中 的顺序决定了该逻辑机在node1 上是主用,在node2上是备用 。


备注:这里的逻辑机的主机名对应的浮动IP地址必须要在/etc/hosts文件中配置 。

推荐阅读