初始 《Veritas 容體管理員》
若尚未執行,請在所有節點上安裝 VxVM 授權金鑰。使用下列命令:
# vxinstall
建立叢集 ASCII 檔案:
# cd /etc/cmcluster
# cmquerycl -C clm.asc -n ever3a -n ever3b
編輯叢集檔案
建立叢集
# cmapplyconf -C clm.asc
啟動叢集
# cmruncl
# cmviewcl
隨即顯示下列輸出內容:
CLUSTER STATUS ever3_cluster up NODE STATUS STATE ever3a up running ever3b up running |
配置叢集容體管理員 (CVM)
配置系統多節點套件 SG-CFS-pkg,以配置和啟動 CVM/CFS 堆疊。不像 VxVM-CVM-pkg,SG-CFS-pkg 不會限制心跳子網路為單一子網路,並支援多個子網路。
# cfscluster config -s
隨即顯示下列輸出內容:
CVM is now configured
Starting CVM...
It might take a few minutes to complete
CVM 啟動後,它會選取一個主節點,您必須從此節點下達磁碟群組配置命令。若要決定主節點,請從叢集中的每個節點下達下列命令:
# vxdctl -c mode
隨即顯示下列輸出內容:
mode: enabled: cluster active - SLAVEmaster: ever3b
或
mode: enabled: cluster active - MASTERslave: ever3b
將磁碟從 LVM 轉換為 CVM
您可以使用 vxvmconvert 公用程式,將 LVM 容體群組轉換為 CVM 磁碟群組。在執行之前,必須先停用容體群組,意謂任何使用該容體群組的套件都必須終止。若需此程序的相關資訊,請參閱
HP-UX 11i v2 附錄 G 的《《《管理 Serviceguard 第十二版》 》》使用指南。
為 CVM/CFS 進行磁碟初始化
您需初始化將於 CVM 磁碟群組中使用的實體磁碟。若實體磁碟之前由 LVM
使用,您應使用 pvremove 命令,將 LVM 起始檔資料從容體群組中的所有磁碟移除 (若之前並未以
LVM 使用磁碟,則不需要此動作)。
欲將 CVM 的磁碟初始化,請登入主節點,接著使用 vxdiskadm 程式將多部磁碟初始化,或利用 vxdisksetup 命令一次初始化一部磁碟,如下所示:
# /etc/vx/bin/vxdisksetup -i c4t4d0
建立 RAC 的磁碟群組
您可使用 vxdg 命令建立磁碟群組。請使用 -s 選項指定共用模式,如下所示:
# vxdg -s init cfsdg1 c4t4d0
建立磁碟群組多節點套件。使用下列命令將磁碟群組新增至叢集:
# cfsdgadm add cfsdg1 all=sw
隨即顯示下列輸出內容:
Package name "SG-CFS-DG-1" was generated to control the resource shared disk group "cfsdg1" is associated with the cluster.
啟用磁碟群組
# cfsdgadm activate cfsdg1
建立容體與新增叢集檔案系統
# vxassist -g cfsdg1 make vol1 10240m
# vxassist -g cfsdg1 make vol2 10240m
# vxassist -g cfsdg1 make vol3 300m
# newfs -F vxfs /dev/vx/rdsk/cfsdg1/vol1
隨即顯示下列輸出內容:
version 6 layout
10485760 sectors, 10485760 blocks of size 1024, log size 16384 blocks
largefiles supported
# newfs -F vxfs /dev/vx/rdsk/cfsdg1/vol2
隨即顯示下列輸出內容:
version 6 layout
10485760 sectors, 10485760 blocks of size 1024, log size 16384 blocks
largefiles supported
# newfs -F vxfs /dev/vx/rdsk/cfsdg1/vol3
隨即顯示下列輸出內容:
version 6 layout
307200 sectors, 307200 blocks of size 1024, log size 1024 blocks largefiles supported
配置裝載點
# cfsmntadm add cfsdg1 vol1 /cfs/mnt1 all=rw
隨即顯示下列輸出內容:
Package name "SG-CFS-MP-1" was generated to control the resource. Mount point "/cfs/mnt1" was associated with the cluster.
# cfsmntadm add cfsdg1 vol2 /cfs/mnt2 all=rw
隨即顯示下列輸出內容:
Package name "SG-CFS-MP-2" was generated to control the resource. Mount point "/cfs/mnt2" was associated with the cluster.
# cfsmntadm add cfsdg1 vol3 /cfs/mnt3 all=rw
隨即顯示下列輸出內容:
Package name "SG-CFS-MP-3" was generated to control the resource. Mount point "cfs/mnt3" that was associated with the cluster.
 |
 |  |
 |
 | 附註: 磁碟群組和裝載點多節點套件 (SG-CFS-DG_ID# 和 SG-CFS-MP_ID#)
不會監視磁碟群組與裝載點的運作狀況,而會檢查依賴它們的應用程式套件是否能存取磁碟群組和裝載點。相依的應用程式套件若無法存取且無法讀取和寫入磁碟則會失效,但是不會造成
DG 或 MP 多節點套件失效。 |
 |
 |  |
 |
裝載叢集檔案系統
# cfsmount /cfs/mnt1
# cfsmount /cfs/mnt2
# cfsmount /cfs/mnt3
檢查 CFS 裝載點
# bdf | grep cfs
/dev/vx/dsk/cfsdg1/vol1 10485760 19651 9811985 0% /cfs/mnt1 /dev/vx/dsk/cfsdg1/vol2 10485760 19651 9811985 0% /cfs/mnt2 /dev/vx/dsk/cfsdg1/vol3 307200 1802 286318 1% /cfs/mnt3 |
檢視配置
# cmviewcl
CLUSTER STATUS ever3_cluster up NODE STATUS STATE GMS_STATE ever3a up running unknown ever3b up running unknown MULTI_NODE_PACKAGES PACKAGE STATUS STATE AUTO_RUN SYSTEM SG-CFS-pkg up running enabled yes SG-CFS-DG-1 up running enabled no SG-CFS-MP-1 up running enabled no SG-CFS-MP-2 up running enabled no SG-CFS-MP-3 up running enabled no |