- 论坛徽章:
- 0
|
五 安装SUN CLUSTER 3.1 U4
把HOST1和HOST2都启动起来
1、修改/etc/profile文件
PATH=$PATH:/usr/cluster/bin:/etc/vx/bin
MANPATH=$MANPATH:/usr/cluster/man:/usr/share/man:/opt/VRTS/man
TERM=dtterm
EDITOR=vi
export PATH MANPATH TERM EDITOR
2、修改/etc/default/login这个文件,注释掉CONSOLE=/dev/console
3、在/下建立.rhosts文件,添加两台主机的名称:host1 和host2 ,各占一行。
4、编辑/etc/vfstab文件添加如下:
/dev/dsk/c0d0s6 /dev/rdsk/c0d0s6 /globaldevices ufs 2 yes -
5、测试两台虚拟机的第二块网卡
,ifconfig pcn1 plumb 172.16.1.5 up
Ifconfig –a 检查网卡是否正常
在host2上,ifconfig pcn1 plumb 172.16.1.6 up
Ifconfig –a 检查网卡是否正常
Ping 172.16.1.5
如果一切正常,则
在host1上
Ifconfig pcn1 down unplumb
在host2上
Ifconfig pcn1 down unplumb
5、安装SUN Cluster 3.1 U4的软件包
在虚拟机上设置,选用Use ISO image,指向Cluster 3.1的安装盘1,执行安装
在host1下执行:
sh /cdrom/suncluster_sc31u4_x86/Solaris_x86/installer
老出现这样的提示
At least one process is using at least one file on the mounted CD
containing the installer. This would prevent the CD from being ejected
during the course of installation. To avoid this potential blockage,
use the command below to display the processes using files on the CD.
For each process, cease use of any files on the mounted CD. Then
run the installer again.
/usr/sbin/fuser /vol/dev/dsk/c1t0d0/suncluster_sc31u4_x86
按照提示用fuser检查光驱,又没有发现有哪个进程访问或使用光驱上的文件,很疑惑,折腾了好几次,莫名奇妙就通过了
出现JAVA图形界面,点击NEXT,
点击同意许可协议,
选择语言,简体中文
选择要安装的组件,就两个,SUN CLUSTER 3.1 8/05 和SUN CLUSTER 3.1 Agent for SUN Java system。
出现需要的软件组件及版本和你实际安装的组件及版本,不管它,NEXT
到关键的一步了,校验系统需要的条件是否满足,校验四个方面,A盘空间,B内存,C补丁、D 操作系统资源。我第一次安装提示我缺少一个补丁,安装无法继续,我打上补丁以后,校验通过,NEXT
提示你安装中就配置CLUSTER还是先不配置,安装完以后再配置,选择第二个选项,NEXT
开始进行软件的安装。安装需要时间比较长。
在host2上执行同样的操作,安装Cluster 3.1 U4的软件包。
在两台主机上都安装完以后
六 、建立和配置Cluster。
在host1或host2上执行
/usr/cluster/bin/scinstall
*** Main Menu ***
Please select from one of the following (*) options:
* 1) Install a cluster or cluster node
2) Configure a cluster to be JumpStarted from this install server
3) Add support for new data services to this cluster node
4) Upgrade this cluster node
5) Print release information for this cluster node
* ?) Help with menu options
* q) Quit
Option: 1
*** Install Menu ***
Please select from any one of the following options:
1) Install all nodes of a new cluster
2) Install just this machine as the first node of a new cluster
3) Add this machine as a node in an existing cluster
?) Help with menu options
q) Return to the Main Menu
Option: 1
*** Installing all Nodes of a New Cluster ***
This option is used to install and configure a new cluster.
If either remote shell (see rsh(1)) or secure shell (see ssh(1)) root
access is enabled to all of the new member nodes from this node, the
Sun Cluster framework software will be installed on each node.
Otherwise, the Sun Cluster software must already be pre-installed on
each node with the "remote configuration" option enabled.
The Java Enterprise System installer can be used to install the Sun
Cluster framework software with the "remote configuration" option
enabled. Since the installation wizard does not yet include support
for cluster configuration, you must still use scinstall to complete
the configuration process.
Press Control-d at any time to return to the Main Menu.
Do you want to continue (yes/no) [yes]?
>>> Type of Installation <<<
There are two options for proceeding with cluster installation. For
most clusters, a Typical installation is recommended. However, you
might need to select the Custom option if not all of the Typical
defaults can be applied to your cluster.
For more information about the differences between the Typical and
Custom installation methods, select the Help option from the menu.
Please select from one of the following options:
1) Typical
2) Custom
?) Help
q) Return to the Main Menu
Option [1]: 1
>>> Cluster Name <<<
Each cluster has a name assigned to it. The name can be made up of
any characters other than whitespace. Each cluster name should be
unique within the namespace of your enterprise.
What is the name of the cluster you want to establish [mycluster]?
>>> Cluster Nodes <<<
This Sun Cluster release supports a total of up to 16 nodes.
Please list the names of the other nodes planned for the initial
cluster configuration. List one node name per line. When finished,
type Control-D:
Node name: host1
Node name: host2
Node name (Control-D to finish): ^D
This is the complete list of nodes:
host1
host2
Is it correct (yes/no) [yes]?
Attempting to contact "host2" ... done
Searching for a remote install method ... done
The Sun Cluster framework software is already installed on each of
the new nodes of this cluster. And, it is able to complete the
configuration process without remote shell access.
Press Enter to continue:
>>> Cluster Transport Adapters and Cables <<<
You must identify the two cluster transport adapters which attach
this node to the private cluster interconnect.
For node "host1",
What is the name of the first cluster transport adapter? pcn1
Will this be a dedicated cluster transport adapter (yes/no) [yes]?
All transport adapters support the "dlpi" transport type. Ethernet
and Infiniband adapters are supported only with the "dlpi" transport;
however, other adapter types may support other types of transport.
For more information on which transports are supported with which
adapters, please refer to the scconf_transp_adap family of man pages
(scconf_transp_adap_hme(1M), ...).
For node "host1",
Is "pcn1" an Ethernet adapter (yes/no) [no]? yes
Is "pcn1" an Infiniband adapter (yes/no) [no]?
For node "host1",
What is the name of the second cluster transport adapter? pcn1^H^H^H
Invalid adapter name.
For node "host1",
What is the name of the second cluster transport adapter? no
Invalid adapter name.
For node "host1",
What is the name of the second cluster transport adapter? pcn2
For node "host1",
What is the name of the second cluster transport adapter? pcn2
Will this be a dedicated cluster transport adapter (yes/no) [yes]?
For node "host1",
Name of the junction to which "pcn2" is connected [switch2]?
For node "host1",
Use the default port name for the "pcn2" connection (yes/no) [yes]?
>>> Quorum Configuration <<<
Every two-node cluster requires at least one quorum device. By
default, scinstall will select and configure a shared SCSI quorum
disk device for you.
This screen allows you to disable the automatic selection and
configuration of a quorum device.
The only time that you must disable this feature is when ANY of the
shared storage in your cluster is not qualified for use as a Sun
Cluster quorum device. If your storage was purchased with your
cluster, it is qualified. Otherwise, check with your storage vendor
to determine whether your storage device is supported as Sun Cluster
quorum device.
If you disable automatic quorum device selection now, or if you
intend to use a quorum device that is not a shared SCSI disk, you
must instead use scsetup(1M) to manually configure quorum once both
nodes have joined the cluster for the first time.
Do you want to disable automatic quorum device selection (yes/no) [no]? yes
Is it okay to begin the installation (yes/no) [yes]?
Installation and Configuration
Log file - /var/cluster/logs/install/scinstall.log.1475
Testing for "/globaldevices" on "host1" ... done
Testing for "/globaldevices" on "host2" ... done
Started sccheck on "host1".
Started sccheck on "host2".
sccheck completed with no errors or warnings for "host1".
sccheck completed with no errors or warnings for "host2".
Configuring "host2" ... done
Rebooting "host2" ...
Configuring "host2" ... done
Rebooting "host2" ... done
Configuring "host1" ... done
Rebooting "host1" ...
Log file - /var/cluster/logs/install/scinstall.log.1475
Rebooting ...
重起后校验系统
bash-2.05# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
pcn0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.63.5 netmask ffffff00 broadcast 192.168.63.255
groupname sc_ipmp0
ether 0:c:29:46:92:5e
lo0: flags=2000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6> mtu 8252 index 1
inet6 ::1/128
pcn1: flags=1008843<UP,BROADCAST,RUNNING,MULTICAST,PRIVATE,IPv4> mtu 1500 index 6
inet 172.16.0.130 netmask ffffff80 broadcast 172.16.0.255
ether 0:c:29:46:92:68
pcn1: flags=2008841<UP,RUNNING,MULTICAST,PRIVATE,IPv6> mtu 1500 index 6
ether 0:c:29:46:92:68
inet6 fe80::20c:29ff:fe46:9268/10
clprivnet0: flags=1009843<UP,BROADCAST,RUNNING,MULTICAST,MULTI_BCAST,PRIVATE,IPv4> mtu 1500 index 7
inet 172.16.193.2 netmask ffffff00 broadcast 172.16.193.255
ether 0:0:0:0:0:2
可以发现系统自动配置了pcn1网卡
bash-2.05# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0d0s0 8111815 2592233 5438464 33% /
/proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
fd 0 0 0 0% /dev/fd
swap 1214820 4 1214816 1% /var/run
swap 1214816 0 1214816 0% /tmp
/dev/did/dsk/d1s6 491977 1041 441739 1% /global/.devices/node@2
可以发现系统修改了/globaldevices目录的mount 路径
七、设置仲裁盘
# scdidadm –L ,确定要作为仲裁盘的路径
1 host2:/dev/rdsk/c0d0 /dev/did/rdsk/d1
1 host1:/dev/rdsk/c0d0 /dev/did/rdsk/d1
2 host2:/dev/rdsk/c1t0d0 /dev/did/rdsk/d2
3 host2:/dev/rdsk/c3t3d0 /dev/did/rdsk/d3
3 host1:/dev/rdsk/c3t3d0 /dev/did/rdsk/d3
4 host2:/dev/rdsk/c3t4d0 /dev/did/rdsk/d4
4 host1:/dev/rdsk/c3t4d0 /dev/did/rdsk/d4
5 host1:/dev/rdsk/c1t0d0 /dev/did/rdsk/d5
/usr/cluster/bin/scsetup
>>> Initial Cluster Setup <<<
This program has detected that the cluster "installmode" attribute is
still enabled. As such, certain initial cluster setup steps will be
performed at this time. This includes adding any necessary quorum
devices, then resetting both the quorum vote counts and the
"installmode" property.
Please do not proceed if any additional nodes have yet to join the
cluster.
Is it okay to continue (yes/no) [yes]?
Do you want to add any quorum devices (yes/no) [yes]?
Following are supported Quorum Devices types in Sun Cluster. Please
refer to Sun Cluster documentation for detailed information on these
supported quorum device topologies.
What is the type of device you want to use?
1) Directly attached shared disk
2) Network Attached Storage (NAS) from Network Appliance
q)
Option: 1
>>> Add a SCSI Quorum Disk <<<
A SCSI quorum device is considered to be any Sun Cluster supported
attached storage which connected to two or more nodes of the cluster.
Dual-ported SCSI-2 disks may be used as quorum devices in two-node
clusters. However, clusters with more than two nodes require that
SCSI-3 PGR disks be used for all disks with more than two
node-to-disk paths.
You can use a disk containing user data or one that is a member of a
device group as a quorum device.
For more information on supported quorum device topologies, see the
Sun Cluster documentation.
Is it okay to continue (yes/no) [yes]?
Which global device do you want to use (d<N>? d3
Is it okay to proceed with the update (yes/no) [yes]?
scconf -a -q globaldev=d3
Command completed successfully.
Press Enter to continue:
Press Enter to continue:
Do you want to add another quorum device (yes/no) [yes]? b^Hno^Hno
Do you want to add another quorum device (yes/no) [yes]? No
Once the "installmode" property has been reset, this program will
skip "Initial Cluster Setup" each time it is run again in the future.
However, quorum devices can always be added to the cluster using the
regular menu options. Resetting this property fully activates quorum
settings and is necessary for the normal and safe operation of the
cluster.
Is it okay to reset "installmode" (yes/no) [yes]?
Is it okay to reset "installmode" (yes/no) [yes]?
scconf -c -q reset
scconf -a -T node=.
Cluster initialization is complete.
Type ENTER to proceed to the main menu:
*** Main Menu ***
Please select from one of the following options:
1) Quorum
2) Resource groups
3) Data Services
4) Cluster interconnect
5) Device groups and volumes
6) Private hostnames
7) New nodes
Other cluster properties
?) Help with menu options
q) Quit
Option: q
bash-2.05#
至此,cluster配置完成
校验如下:
scstat -p | more
-- Cluster Nodes --
Node name Status
--------- ------
Cluster node: host2 Online
Cluster node: host1 Online
------------------------------------------------------------------
-- Cluster Transport Paths --
Endpoint Endpoint Status
-------- -------- ------
Transport path: host2:pcn1 host1:pcn1 Path online
------------------------------------------------------------------
-- Quorum Summary --
Quorum votes possible: 3
Quorum votes needed: 2
Quorum votes present: 3
-- Quorum Votes by Node --
Node Name Present Possible Status
--------- ------- -------- ------
Node votes: host2 1 1 Online
Node votes: host1 1 1 Online
-- Quorum Votes by Device --
Device Name Present Possible Status
----------- ------- -------- ------
Device votes: /dev/did/rdsk/d3s2 1 1 Online
------------------------------------------------------------------
-- Device Group Servers --
Device Group Primary Secondary
-- Device Group Status --
Device Group Status
------------ ------
-- Multi-owner Device Groups --
Device Group Online Status
------------ -------------
------------------------------------------------------------------
------------------------------------------------------------------
-- IPMP Groups --
Node Name Group Status Adapter Status
--------- ----- ------ ------- ------
IPMP Group: host2 sc_ipmp0 Online pcn0 Online
IPMP Group: host1 sc_ipmp0 Online pcn0 Online
至此Cluster 3.1安装配置完成,下一步的工作就是安装应用软件和注册服务了。这个Cluster 3.1有一些不正常,如下:
bash-2.05# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0d0s0 8111815 2585920 5444777 33% /
/proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
fd 0 0 0 0% /dev/fd
swap 914560 56 914504 1% /var/run
swap 914556 52 914504 1% /tmp
/dev/did/dsk/d1s6 491977 6671 436109 2% /global/.devices/node@1
/vol/dev/dsk/c1t0d0/suncluster_sc31u4_x86
180704 180704 0 100% /cdrom/suncluster_sc31u4_x86
对于一个双节点的Cluster,应该有/global/.devices/node@1和 /global/.devices/node@2两个目录,可现在只能看到1个。
bash-2.05# scdidadm -L
1 host2:/dev/rdsk/c0d0 /dev/did/rdsk/d1
1 host1:/dev/rdsk/c0d0 /dev/did/rdsk/d1
2 host2:/dev/rdsk/c1t0d0 /dev/did/rdsk/d2
3 host2:/dev/rdsk/c3t3d0 /dev/did/rdsk/d3
3 host1:/dev/rdsk/c3t3d0 /dev/did/rdsk/d3
4 host2:/dev/rdsk/c3t4d0 /dev/did/rdsk/d4
4 host1:/dev/rdsk/c3t4d0 /dev/did/rdsk/d4
5 host1:/dev/rdsk/c1t0d0 /dev/did/rdsk/d5
host2:/dev/rdsk/c0d0和host1:/dev/rdsk/c0d0是本地盘,不是共享盘,应该是认成两个盘符,可现在都认成了d1,很奇怪,和没有使用卷管理有关系吗,还需进一步探索。
[ 本帖最后由 king3171 于 2007-4-22 19:31 编辑 ] |
|