安裝sun cluster3.0和volume manger3.5

sundayhe發表於2011-05-19

安裝SUN Cluster 軟體之前,需準備好下列工作:
各個節點作業系統的安裝
雙機系統各個節點的作業系統已安裝完畢。
相關配置
規劃好所有要用到的主機名稱及其對應的IP地址,在編輯各機的/etc/hosts 檔案時,須將另一節點的IP資訊錄入。
注意:
以下使用到的IP 地址僅供參考,實際的安裝過程中請與局方商量確定真正的IP地址。

1. 操作指引
(1) 配置/etc/hosts檔案
此檔案包括雙機系統所有主機的名稱,及其對應的IP地址。以下是樣例hosts,安裝時請修改為與局方商量確定的真正IP地址。
在節點smcsrv1上如下所示:
127.0.0.1 localhost
10.71.100.191 smcsrv1 loghost
10.71.100.193 smcsrv2
10.76.183.183 service_ip
在節點smcsrv 2上如下所示:
127.0.0.1 localhost
10.71.100.193 smcsrv2 loghost
10.71.100.191 smcsrv1
10.76.183.183 service_ip
(2) 修改/etc/hostname.ce0檔案,進行網路卡hostname的標準配置。
在節點smcsrv1上如下所示:
smcsrv1
在節點smcsrv 2上如下所示:
smcsrv2
(3) 確認其它檔案的下列專案,如不符合要求則修改。
(a)/etc/default/login檔案
CONSOLE=/dev/console應被註釋為
#CONSOLE=/dev/console
否則只能透過TC來登入主機,其它方式無法登入。
(a) /.profile檔案
如果root 使用者預設使用的是Bourne SHELL,可在.profile 檔案中的環境變數PATH、MANPATH後加上相關的工作目錄,以便安裝。
修改後的.profile 檔案應有如下內容:
PATH=${PATH}:/sbin:/usr/sbin:/usr/bin:/opt/SUNWcluster/bin:/usr/opt/SUNWmd/sbin
export PATH
MANPATH=${MANPATH}:/usr/share/man:/opt/SUNWcluster/man:/usr/opt/SUNWmd/man
export MANPATH
SHELL=/sbin/sh
export SHELL
TERM=vt100
export TERM
(b) /.rhosts檔案
在smcsrv1主機上:
smcsrv1
smcsrv2
在smcsrv2主機上:
smcsrv1
smcsrv2
在節點smcsrv1上安裝配置Cluster

安裝SUN Cluster 軟體之前,需準備好下列工作:
雙機系統各個節點的作業系統已安裝完畢。
規劃好所有要用到的主機名稱及其對應的IP地址,在編輯各機的/etc/hosts 檔案時,須將另一節點的IP資訊錄入。
1. 操作指引
(1) 將Cluster安裝盤放入光碟機中。
(2) 以root使用者登入,進入相應目錄。
# cd /cdrom/cdrom0
# cd sun-internal
# cd progs
# cd SunCluster
# cd 3.0
# cd Sun_Cluster_3.0_Update3_GA
該目錄下應有如下檔案:
suncluster_3_0_u3_solaris8.tar.gz
scdataservices_3_0_u3.tar.g
(3) 複製安裝包到相應目錄。
# cp suncluster_3_0_u3_solaris8.tar.gz /opt/sun
# cp scdataservices_3_0_u3.tar.gz /opt/sun
# cd /opt/sun
(4) 解開安裝包。
# gzcat -d suncluster_3_0_u3_solaris8.tar.gz |tar xf -
# cd suncluster_3_0_u3_solaris8/SunCluster_3.0/Tools
當前目錄下應有如下檔案:
Upgrade defaults lib scinstall
(5) 執行scinstall進行SC以及相關軟體的安裝和設定, 安裝命令如下:
# ./scinstall
(6) 下面是互動的安裝過程,需要選擇的引數如下:
*** Main Menu ***
* 1) Establish a new cluster using this machine as the first node
& 說明:
在節點smcsrv1上選擇“1) Establish a new cluster using this machine as the first node.”,如第(6)步所示;
在節點smcsrv2上選擇“2) Add this machine as a node in an established cluster。”
在安裝過程中隨時可以按,返回主選單。

Do you want to continue (yes/no) [yes]?
Is it okay to continue (yes/no) [yes]?
What is the name of the cluster you want to establish? smcsrvcluster
Node name: smcsrv2
Node name (Ctrl-D to finish): ^D
& 說明:
在節點smcsrv2上的提示資訊是:
What is the name of the sponsoring node? smcsrv1

系統將會列出Cluster中定義的所有節點名稱,如果正確選擇“y”,如果有誤,選擇“n”,重新設定。
Do you need to use DES authentication (yes/no) [no]?
Is it okay to accept the default network address (yes/no) [yes]?
Is it okay to accept the default netmask (yes/no) [yes]?
& 說明:
default network address及default netmask需要根據實際情況調整。

Does this two-node cluster use transport junctions (yes/no) [yes]?
What is the name of the first junction in the cluster [switch1]?
What is the name of the second junction in the cluster [switch2]?
Select the first cluster transport adapter to use:
1) ce1
2) ce2
3) ce3
4) Other
Option: 2
& 說明:
這裡選擇ce2作為心跳主用網路卡,應根據實際情況選擇。

Name of the junction to which "ce2" is connected [switch1]?
Use the default port name for the "ce2" connection (yes/no) [yes]?
Select the second cluster transport adapter to use:
1) ce1
2) ce3
3) Other
Option: 2
& 說明:
選擇ce3作為心跳備用網路卡。

Name of the junction to which "ce3" is connected [switch2]?
Use the default port name for the "ce3" connection (yes/no) [yes]?
The default is to use /globaldevices.
Is it okay to use this default (yes/no) [yes]?
Do you want scinstall to reboot for you (yes/no) [yes]? No
Are these the options you want to use (yes/no) [yes]?
& 說明:
系統將顯示出配置的引數,如果正確,則選擇“yes”,繼續安裝;如果有誤,選擇“no”,重新進行設定。
Do you want to continue with the install (yes/no) [yes]?
*** Main Menu ***
*q)Quit
Option : q
1.1.2 在smcsrv1上安裝Cluster補丁:
將補丁盤放入光碟機
cd /cdrom/cdrom0/sun/patch/SunCluster/3.0/8
unpack-patches
cd /tmp/8;./install_patches
cd /cdrom/cdrom0/sun/patch/SunCluster/3.0/common
unpack-patches
cd /tmp/common;./install_patches
註釋掉/etc/inet/ntp.conf.cluster檔案中以下行:
peer clusternode3-priv
peer clusternode4-priv
peer clusternode5-priv
peer clusternode6-priv
peer clusternode7-priv
peer clusternode8-priv

系統重啟之後,smcsrv1將被設為cluster的第一個node.
1.1.3 在節點smcsrv2上安裝配置Cluster
1. 任務說明
節點smcsrv2上Cluster的安裝配置過程和節點smcsrv1上的大致相同,請參見smcsrv1上的安裝過程完成smcsrv2上Cluster的安裝。兩個節點上Cluster的配置過程不太一致,下面將詳細描述在節點smcsrv2上Cluster的配置過程。
2. 操作指引
(1) 以root使用者登入節點smcsrv2。
# ./scinstall
(2) 下面是互動的安裝過程,需要設定的引數如下:
*** Main Menu ***
Option: 2
& 說明:
l 選擇2表示cluster已經建立,且有一個node存在,當前機器是作為附加node新增的“
l Add this machine as a node in an established cluster。”

Do you want to continue (yes/no) [yes]?
Is it okay to continue (yes/no) [yes]?
What is the name of the sponsoring node? smcsrv1
Do you want to use autodiscovery (yes/no) [yes]?
The following connections were discovered:
smcsrv1:ce3 switch1 smcsrv2:ce3
smcsrv1:ce2 switch2 smcsrv2:ce2
Is it okay to add these connections to the configuration (yes/no) [yes]?
The default is to use /globaldevices.
Is it okay to use this default (yes/no) [yes]?
Do you want scinstall to reboot for you (yes/no) [yes]? no
Are these the options you want to use (yes/no) [yes]?
Do you want to continue with the install (yes/no) [yes]?
1.1.4 在smcsrv2上安裝Cluster補丁
將補丁盤放入光碟機
cd /cdrom/cdrom0/sun/patch/SunCluster/3.0/8
unpack-patches
cd /tmp/8;./install_patches
cd /cdrom/cdrom0/sun/patch/SunCluster/3.0/common
unpack-patches
cd /tmp/common;./install_patches
註釋掉/etc/inet/ntp.conf.cluster檔案中兩行:
peer clusternode3-priv
peer clusternode4-priv
peer clusternode5-priv
peer clusternode6-priv
peer clusternode7-priv
peer clusternode8-priv

系統開始重啟。
1.1.5 配置路徑
編輯各個機器上的/.profile檔案
PATH=$PATH:/usr/cluster/bin:/usr/cluster/lib/sc:/usr/cluster/dtk/bin
export PATH
MANPATH=/usr/man:/usr/cluster/man
export MANPATH
編輯完成後執行
#./.profile
1.1.6 安裝配置Quorum Disks
1. 任務說明:對共享儲存裝置進行配置。
建立鎖盤。擁有鎖盤的節點擁有對共享磁碟的控制權,即是主機;不擁有鎖盤的節點是備機。在磁碟陣列中,每個虛擬磁碟(即LUN)擁有一個唯一的global device 號,如LUN0~d2,LUN1~d3 等。
2. 操作步驟:
(1) 查詢建立鎖盤的磁碟資訊
# scdidadm -L
選擇LUN0,可查詢到建立鎖盤所對應的global device 號。
(2) 建立鎖盤
啟動互動安裝過程:
# scsetup
Is it okay to continue (yes/no) [yes]?
Do you want to add any quorum disks (yes/no) [yes]?
Which global device do you want to use (d)? d2
Is it okay to proceed with the update (yes/no) [yes]?
Do you want to add another quorum disk (yes/no)? n
Is it okay to reset "installmode" (yes/no) [yes]?
& 說明:
l d2 即為上面查詢到的global device號。

(3) 檢視配置結果:
# scstat
如果配置正確,將會有如下顯示:
-- Cluster Nodes --
Node name Status
Cluster node: smcsrv1 Online
Cluster node: smcsrv2 Online
-- Cluster Transport Paths --
Endpoint Endpoint Status
Transport path: smcsrv1:ce3 smcsrv2:ce3 Path online
Transport path: smcsrv1:ce2 smcsrv2:ce2 Path online
1.1.7 安裝配置Data Services
1. 任務說明
安裝oracle資料庫的data service,如果本雙機系統不需要安裝和配置oracle資料庫,可以跳過該步。
2. 操作指引
Data Services的安裝需要兩個節點保持一致,下面描述smcsrv1上的操作,在smcsrv2上的操作與smcsrv1上一樣。
(1) 解開安裝包
# cd /opt/sun
# gzcat -d scdataservices_3_0_u3.tar.gz |tar xf -
# cd scdataservices_3_0_u3/components/
當前目錄下應有如下目錄:
SunCluster_HA_Oracle_3.0
(2) 安裝SunCluster_HA_Oracle_3.0
# scinstall -ik -s oracle -d /opt/sun/scdataservices_3_0_u3

** Installing Sun Cluster - Highly Available Oracle DBMS **
SUNWscor....done
SUNWscorx...done
(3) 安裝SunCluster_HA_Oracle_3.0補丁
# cd /opt/sun/scdataservices_3_0_u3/components/
# cd SunCluster_HA_Oracle_3.0/Tools/Upgrade/Patches
# ls
110651-08 patch_order
# patchadd -u *

Checking installed patches...
Verifying sufficient filesystem capacity (dry run method)...
Installing patch packages...

Patch number 110651-08 has been successfully installed.
See /var/sadm/patch/110651-08/log for details

Patch packages installed:
SUNWscor
SUNWscorx

#

注意:
在兩個節點上都需要進行安裝操作,否則將導致增加oracle資料庫資源失敗。
1.1 安裝SAN軟體包
1.1.1 安裝SAN軟體
1. 任務說明
在安裝Volume Manager之前,必須先安裝SAN軟體,這是Volume Manager3.5獨有的。
2. 操作指引
(1) 將SAN軟體安裝盤放入光碟機。
(2) 以root使用者登入。
(3) 進入相應目錄。
# cd /cdrom/cdrom0/sun/progs/SAN
(4) 複製安裝包到臨時目錄。
# cp SFS_base_packages.S8.tar.gz /opt/sun
# cd /opt/sun
(5) 解開安裝包。
# gzcat -d SFS_base_packages.S8.tar.gz|tar xf -
(6) 安裝軟體包。
# cd /opt/sun/SFS_base_packages.S8
# pkgadd -d .
(7) 下面是互動的安裝過程,需要選擇的引數如下:
Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: 1,2,16
Do you want to continue with the installation of [y,n,?] y
Do you want to install these conflicting files [y,n,?,q] y
Do you want to continue with the installation of [y,n,?] y
(8) 安裝完成後選擇“q”,退出安裝。
1.1.2 安裝SAN補丁:
1. 任務說明:
安裝完SAN軟體後,需要安裝SAN軟體補丁。
2. 操作指引:
(1) 將SAN補丁安裝盤放入光碟機。
(2) 以root使用者登入。
(3) 進入相應目錄。
# cd /cdrom/cdrom0/sun/patch/SAN/8
(4) 解開補丁包。
# unpack-patches
(5) 下面是互動安裝過程,需要選擇的引數如下:
Are you ready to unpack patches into /tmp/8?[y/n]:y
# cd /tmp/8; ./install_patches
Are you ready to continue with install? [y/n]: y
1.2 安裝配置Volume Manager
Volume Manager用來管理磁碟資訊。安裝完成後磁碟的管理將由UNIX移交給Volume Manager管理。
1.2.1 安裝配置Volume Manager
1. 任務說明
安裝完成SAN後,就可以進行Volume Manager的安裝。Volume Manager的版本為3.5。
2. 操作指引
(1) 將Volume Manager的安裝盤放入光碟機。
(2) 以root使用者登入。
# cd /cdrom/cdrom0/sun-internal/progs/veritas-vm
# cd 3.5
(3) 在當前目錄下應有VxFS_VxVM_3.5_for_Solaris.tar.gz安裝包。
(4) 複製安裝包到相應目錄。
# cp VxFS_VxVM_3.5_for_Solaris.tar.gz /opt/sun
(5) 解開軟體包。
# mkdir /opt/sun/VxFS_VxVM_3.5_for_Solaris
# cd /opt/sun/VxFS_VxVM_3.5_for_Solaris
# gzcat -d ../VxFS_VxVM_3.5_for_Solaris.tar.gz |tar xf -
(6) 安裝軟體包。
# scvxinstall
Disabling DMP.
Installing Packages from ...
Installing VRTSlic.
Installing VRTSvxvm.
Installing VRTSvmdev.
Installing VRTSvmman.
Obtaining the clusterwide vxio number ...
Using 315 as the vxio major number
Volume Manager instalation is complet.
Please remember to re-boot this node before configuring VxVM
Do you want Volume Manager to encapsulate root [no]? y
Where is the Volume Manager cdrom? /opt/sun/VxFS_VxVM_3.5_for_Solaris
(7) 在安裝完成後,需要輸入license。
Please enter a Volume Manager license key [none]: 0019 4956 5295 8051 3794 652
& 說明:
一般在剛安裝時需要從SUN公司處得到 1 個臨時的 License,要根據隨機的License申請表格的序列號和機器的Hostid以傳真和郵件的方式向SUN公司申請永久的 License(實際使用時應要求SUN工程師提供可用的臨時License)。

1.2.2 安裝Volume Manager補丁
1. 任務說明
安裝Volume Manager 3.5的補丁,補丁版本為112392-06,113203-03,113595-04,113596-03。
2. 操作指引
(1) 將補丁盤放入光碟機,以root使用者登入。
(2) 進入相應目錄。
# cd /cdrom/cdrom/sun/patch/veritas-vm
# cd 3.5
(3) 將需要安裝的補丁包複製到臨時目錄。
# cd /cdrom/cdrom0/sun/patch/veritas-vm/3.5
# unpack-patches

Are you ready to unpack patches into /tmp/3.5? [y/n]: y
(4) 安裝補丁
# cd /tmp/3.5; ./install_patches
(5) 重啟系統。
# scshutdown –y –g0
# reboot -r
1.2.3 配置環境變數
PATH=$PATH:/usr/cluster/bin:/usr/cluster/lib/sc:/usr/cluster/dtk/bin:/opt/VRTSvmsa/bin:/opt/VRTSvxvm/bin:/etc/vx/bin
export PATH
MANPATH=/usr/man:/usr/cluster/man:/opt/VRTS/man
export MANPATH
1.2.4 調整磁碟管理引數
1. 任務說明
作業系統已經實現DMP的功能,關閉Volume Manager中的此功能,否則可能會出問題。
2. 操作指引
(1) 以root使用者登入,關閉Volume Manager中的DMP功能。
# vxdiskadm
(2) 下面是互動安裝過程,需要選擇的引數如下:
Select an operation to perform:17 (選擇17Prevent multipathing/Suppress devices from VxVM's view )
Do you want to continue ? [y,n,q,?] (default: y)
Select an operation to perform: 5 (選擇5 Prevent multipathing of all disks on a controller by VxVM )
Enter a controller name [,all,list,list-exclude,q,?] all
Continue operation? [y,n,q,?] (default: n) y
(3) 然後選擇“q”,逐級返回主選單。
(4) 重啟系統,使修改的引數生效。
# scshutdown –y –g0
# boot

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9479798/viewspace-1050074/,如需轉載,請註明出處,否則將追究法律責任。

相關文章