#logic address
192.168.0.121 t2000_c1
# vi /etc/hostname.e1000g0
t2000b netmask + broadcast + group ipmp1 up
# vi /etc/hostname.e1000g1
t2000b_ipmp netmask + broadcast + deprecated group ipmp1 up
dbtest_ipmp netmask + broadcast + deprecated group ipmp1 up
2.用root用戶登錄執行scinstall命令配置cluster。
t2000a服務器上創建新羣集的第一個節點:
#scinstall
跟ufs系統裝cluster不同的地方,因爲zfs沒有/globaldevices的分區,所以這裏不選擇默認的/globaldevices,而選擇lofi方法。
不要自動生成投票方,安裝好後手動配置投票方。
將t2000b服務器添加進節點:
應該先打開兩臺服務器連接心跳線的那兩個網口,此處爲:
# ifconfig e1000g2 plumb
# ifconfig e1000g3 plumb
# scinstall
這裏選擇“將此計算機添加爲現有羣集中的節點”
輸入現有節點的主機名,即t2000a。
輸入要加入羣集的名稱,即zfsclu (t2000a上取的名)
自動搜索羣集傳輸,要把e1000g2和e1000g3網口打開。
這裏如t2000a,選擇lofi方法。
3. 給Cluster配置quorum磁盤
調配存儲,在存儲上劃一個大小不限(1G即可)的卷作爲投票方。
首先查看卷的設備名
root@t2000a # format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
/pci@780/pci@0/pci@9/scsi@0/sd@0,0
1. c0t1d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
/pci@780/pci@0/pci@9/scsi@0/sd@1,0
2. c2t1d0 <SUN-CSM200_R-0760-400.00GB>
/pci@7c0/pci@0/pci@1/pci@0,2/SUNW,qlc@2/fp@0,0/ssd@w200600a0b8322116,0
3. c2t1d1 <SUN-CSM200_R-0760 cyl 2558 alt 2 hd 64 sec 64>
/pci@7c0/pci@0/pci@1/pci@0,2/SUNW,qlc@2/fp@0,0/ssd@w200600a0b8322116,1
Specify disk (enter its number):
1 t2000a:/dev/rdsk/c0t0d0 /dev/did/rdsk/d1
2 t2000a:/dev/rdsk/c2t1d0 /dev/did/rdsk/d2
2 t2000b:/dev/rdsk/c2t2d0 /dev/did/rdsk/d2
3 t2000a:/dev/rdsk/c2t1d1 /dev/did/rdsk/d3
3 t2000b:/dev/rdsk/c2t2d1 /dev/did/rdsk/d3
4 t2000a:/dev/rdsk/c0t1d0 /dev/did/rdsk/d4
5 t2000b:/dev/rdsk/c0t0d0 /dev/did/rdsk/d5
6 t2000b:/dev/rdsk/c0t1d0 /dev/did/rdsk/d6
對照format輸出的磁盤信息可知較小的卷爲c2t1d1,即對應的是d3。
投票方設置:
# scsetup
選擇直接連接的共享磁盤
這裏選擇d3作爲投票方,由上面format 和scdidadm –L可知。
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
8) Other cluster tasks
?) Help with menu options
q) Quit
Option: q
root@t2000b # scstat
------------------------------------------------------------------
-- Cluster Nodes --
Node name Status
--------- ------
Cluster node: t2000a Online
Cluster node: t2000b Online
------------------------------------------------------------------
-- Cluster Transport Paths --
Endpoint Endpoint Status
-------- -------- ------
Transport path: t2000a:e1000g3 t2000b:e1000g3 Path online
Transport path: t2000a:e1000g2 t2000b:e1000g2 Path online
------------------------------------------------------------------
-- Quorum Summary from latest node reconfiguration --
Quorum votes possible: 3
Quorum votes needed: 2
Quorum votes present: 3
-- Quorum Votes by Node (current status) --
Node Name Present Possible Status
--------- ------- -------- ------
Node votes: t2000a 1 1 Online
Node votes: t2000b 1 1 Online
-- Quorum Votes by Device (current status) --
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: t2000a ipmp1 Online e1000g1 Offline
IPMP Group: t2000a ipmp1 Online e1000g0 Online
IPMP Group: t2000b ipmp1 Online e1000g1 Offline
IPMP Group: t2000b ipmp1 Online e1000g0 Online
-- IPMP Groups in Zones --
Zone Name Group Status Adapter Status
--------- ----- ------ ------- ------