免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
1234下一页
最近访问板块 发新帖
查看: 11693 | 回复: 30
打印 上一主题 下一主题

[VMware] 使用VMWARE 装Solaris9.0 +Cluster 3.1 U4+Oracle 10G小结.doc(上) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-09-29 10:26 |只看该作者 |倒序浏览
做完重新整理再贴

[ 本帖最后由 king3171 于 2006-9-30 10:52 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2006-09-29 10:27 |只看该作者
文档力求简洁明了,不多说废话。记录操作中容易出问题和自己不熟悉的点,都熟悉的就不说了。
一、        硬件环境准备
硬件环境:SUN V20Z,ADM2.8G的处理器,2G内存,一块36G SCSI硬盘,两块1000M网卡。我觉得我的硬件环境是做这个安装的最低配置了,之前我曾经在我的内存为1G的本子上搭这样的环境是失败了,失败的关键是内存不够。

二、基础软件环境准备
我装的是Redhat 3.0 ES 3 update5,没有选择WINDOWS是想的用这个系统更稳定一点。Redhat 3.0的安装很简单就不多说了,大家都很熟悉,我主要说下分区,因为我在分区上载了跟头。我把/、/usr、/var、/opt、/home都挂载到了单独的分区上,其中/opt给了20G,/home给了10G,我把SOLARIS 9的两个虚拟机都放在了/opt上,各给了8.5G的空间,这样,/opt就剩1G多的空间,结果在两台SOLARIS 9主机系统都起来以后,我安装配置完SUN CLUSTER 3.1 U4,重起SOLARIS 9系统时,系统挂住了,VMWARE提示/opt空间不够,要求我FREE出至少150M空间再继续,我在linux下用df –k 一看,/opt 空间占用100%了,搞得我没办法,只好前功尽弃,整个工作重新来一遍。重新安装Redhat 3.0 ES 3 时,我就除了SWAP外,其他空间全分给了/ 。
三、 安装VMware-server-1.0
1、安装SERVER
tar zvxf VMware-server-1.0.0-28343.tar.gz
cd vmware-server-distrib/
./vmware-install.pl
出现一系列提示安装到哪个目录,一路回车默认即可,最后会让你输入序列号,输入序列号:928WH-Y65AW-21394-4C70J,安装完成。
2、安装vmware server console,以便远程管理
tar zvxf VMware-mui-1.0.0-28343.tar.gz
cd vmware-mui-distrib/
./vmware-install.pl
一路回车安装完成
四 安装solaris 9 U7
1、安装solaris 9 U7
在根下建vmhost目录,用于放置两个虚拟机host1和host2的文件,
#Vmware &回车,
出现VMWARE的图形界面,到这里就不用我多说了,操作和WINDOWS下的一样,建立第一个SOLARIS9虚拟机HOST1 ,硬盘空间设为9G,开始安装。VMWARE下安装solaris 9 U7可参考南非蜘蛛的文章。要强调的还是分区,这个不能错,我分了三个分区c0d0s0、c0d0s6和c0d0s7,分了512M给c0d0s6,50M给c0d0s7,其余空间全给了/ 分区c0d0s0。装完后,打补丁,这个可不能漏。主要有,9_x86_Recommended.zip和J2SE_Solaris_9_x86_Recommended.zip,直接到SUN网站上下就是了。在vmware console虚拟出第二块网卡,但不要配置它,只要确定Solaris 已经识别该网卡就可以了。
打完补丁关闭SOLARIS9,OFF掉虚拟机HOST1,关闭掉vmware console。
2、建立CLUSTER要用到的共享盘
建立两个共享盘,一个500M用于仲裁盘,另外一个6G用于ORACLE 10G数据库建库。
步骤如下:
建立500M的仲裁盘
vmware-vdiskmanager -c -s 500mb -a lsilogic -t 2 "/vmhost/share/disk1.vmdk"
建立6G的数据库盘
vmware-vdiskmanager -c -s 5Gb -a lsilogic -t 2 "/vmhost/share/disk2.vmdk"

修改host1.vmx文件,添加
scsi1.present = "TRUE"
scsi1.virtualDev = "lsilogic"
scsi1.sharedBus = "virtual"

scsi1:1.present = "TRUE"
scsi1:1.mode = "independent-persistent"
scsi1:1.filename = "/vmhost/share/disk1.vmdk "
scsi1:1.deviceType = "Disk"

scsi1:2.present = "TRUE"
scsi1:2.mode = "independent-persistent"
scsi1:2.filename = "/vmhost/share/disk2.vmdk "
scsi1:2.deviceType = "Disk"

最后添加

disk.locking = "false"
diskLib.dataCacheMaxSize = "0"
diskLib.dataCacheMaxReadAheadSize = "0"
diskLib.DataCacheMinReadAheadSize = "0"
diskLib.dataCachePageSize = "4096"
diskLib.maxUnsyncedWrites = "0"
修改完保存退出。
在VMHOST下建立host2目录,把host1下的文件全部CP到HOST2目录下。打开vmware console就可以在host的设置里看到添加的硬盘,启动host1系统,
执行devfsadm
Format就可以看到新添加的共享盘,newfs后就可以使用了。
启动HOST2,修改相应的网卡IP地址和主机名。在HOST2 上执行devfsadm,用Format查看是否看到新添加的两个共享盘。如果看到,就可以进行下一步了。

[ 本帖最后由 king3171 于 2007-4-22 19:30 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2006-09-29 10:29 |只看该作者
五  安装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 编辑 ]

论坛徽章:
0
4 [报告]
发表于 2006-09-29 10:55 |只看该作者
哇,我也正想搞一下x86的cluster呢,顶!!!

论坛徽章:
0
5 [报告]
发表于 2006-10-16 17:48 |只看该作者
楼主,整理完没有啊?  迫不及待了。

论坛徽章:
0
6 [报告]
发表于 2006-10-17 09:04 |只看该作者
加油~

论坛徽章:
0
7 [报告]
发表于 2006-10-17 13:15 |只看该作者
急盼!
哈哈

论坛徽章:
0
8 [报告]
发表于 2006-10-17 14:40 |只看该作者

期待期待阿阿阿,快快发

期待i阿期待期待阿阿阿,快快发

论坛徽章:
0
9 [报告]
发表于 2006-10-17 15:45 |只看该作者
怎么建立共享硬盘???

论坛徽章:
0
10 [报告]
发表于 2006-10-18 11:07 |只看该作者
加油。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP