湖南網(wǎng)站建設(shè)小公司排名黃岡seo顧問(wèn)
《HA網(wǎng)卡確認(rèn)方法》
- 1 HA IP地址類(lèi)型
- 2HA IP地址設(shè)置原則
- 3 HA網(wǎng)卡日常查看方法
- 3.1 查看hosts文件
- 3.2 查看網(wǎng)卡和IP
- 4 通過(guò)命令方式直接查看
- 5 直接查看HA配置
- 4 HA網(wǎng)卡SMIT查看方法(暫不完整)
- 4.1 根據(jù)hosts文件確認(rèn)IP對(duì)應(yīng)的別名
- 4.2 根據(jù)serviceIP確認(rèn)Persistent IP的網(wǎng)絡(luò)
- 4.3 根據(jù)Persistent IP的網(wǎng)絡(luò)得到Persistent IP
1 HA IP地址類(lèi)型
IP類(lèi)型 | 標(biāo)識(shí) | 全稱(chēng) | 說(shuō)明 | 配置 |
---|---|---|---|---|
boot ip | boot_ip | 真實(shí)IP,物理IP | boot一般在計(jì)算機(jī)中指的是引導(dǎo)。這里指的是,操作系統(tǒng)裝入的IP地址,即物理網(wǎng)卡IP地址 。 | 配置網(wǎng)卡 |
Persistent IP | per_ip | 永久IP | Persistent 是持續(xù)的意思。這里是指一直在一臺(tái)服務(wù)器上的IP地址。 | 配置Persistent IP |
Service IP | ser_ip | 服務(wù)IP,浮動(dòng)IP | Service是提供服務(wù)的意思。這里指應(yīng)用訪問(wèn)的IP地址。 | 配置Service IP |
2HA IP地址設(shè)置原則
序號(hào) | 原則 |
---|---|
1 | HA集群每臺(tái)服務(wù)器配置兩個(gè)物理網(wǎng)卡,即使用兩個(gè)物理網(wǎng)卡IP作為boot_IP。 |
2 | HA集群每臺(tái)服務(wù)器配置一個(gè)永久IP,即per_IP。依附在其中一個(gè)boot_IP。 |
3 | HA集群只有一個(gè)服務(wù)IP,即ser_ip。存在于集群的某臺(tái)服務(wù)器。 |
4 | 服務(wù)IP所在的服務(wù)器,同樣依附在其中一個(gè)boot_IP上,且可與永久IP分布在不同的boot_ip。 |
5 | HA集群服務(wù)器的一個(gè)boot_IP網(wǎng)卡down掉后,依附其上的per_IP和ser_IP會(huì)切換至另一個(gè)up的網(wǎng)卡。 |
6 | A集群服務(wù)器的兩個(gè)boot_IP網(wǎng)卡都down掉后,per_IP將down掉,ser_IP才會(huì)切換至備機(jī)。 |
3 HA網(wǎng)卡日常查看方法
HA 集群配置規(guī)范,hosts別名不存在異議,且不存在多個(gè)物理網(wǎng)卡的情況下,一般可用下列方法確認(rèn)網(wǎng)卡。
3.1 查看hosts文件
1、查看主機(jī)名對(duì)應(yīng)的IP地址。
2、查看節(jié)點(diǎn)名對(duì)應(yīng)的IP地址。
$ cat /etc/hosts
100.1.0.1 test1_boot1 test1
100.1.0.2 test2_boot1 test2
192.168.0.1 test1_boot2
192.168.0.2 test2_boot2
10.1.0.1 test1_svc
10.1.0.2 test2_svc
10.1.0.5 test1_per
10.1.0.6 test2_per
說(shuō)明:一般**_per
為真實(shí)IP,**_svc
為服務(wù)IP,或稱(chēng)serviceIP
3.2 查看網(wǎng)卡和IP
$ ifconfig -a
$ netstat -in
4 通過(guò)命令方式直接查看
1、通過(guò)以下方式可以查看
$ cat /etc/hosts
196.141.100.110 tredb01_boot1 tredb01
196.141.100.100 tredb02_boot1 tredb02
196.141.10.110 tredb01_boot2
196.141.10.100 tredb02_boot2
18.6.6.4 tredb02_svc
18.6.6.5 tredb01_per db1
18.6.6.6 tredb02_per db2
$ cllsif
Adapter Type Network Net Type Attribute Node IP Address Hardware Address Interface Name Global Name Netmask Alias for HB Prefix Lengthhdiskpower0_01 service net_diskhb_01 diskhb serial tredb01 /dev/hdiskpower0 hdiskpower0
tredb01_boot1 boot net_ether_01 ether public tredb01 196.141.100.110 en0 255.255.255.224 27
tredb01_boot2 boot net_ether_01 ether public tredb01 196.141.10.110 en4 255.255.255.224 27
tredb02_ser service net_ether_01 ether public tredb01 18.6.6.4 255.255.255.224 27
hdiskpower0_02 service net_diskhb_01 diskhb serial tredb02 /dev/hdiskpower0 hdiskpower0
tredb02_boot2 boot net_ether_01 ether public tredb02 196.141.10.100 en4 255.255.255.224 27
tredb02_boot1 boot net_ether_01 ether public tredb02 196.141.100.100 en0 255.255.255.224 27
tredb02_ser service net_ether_01 ether public tredb02 18.6.6.4 255.255.255.224 27
$ cllscf
Cluster Name: tredb
Cluster Connection Authentication Mode: Standard
Cluster Message Authentication Mode: None
Cluster Message Encryption: None
Use Persistent Labels for Communication: No
There were 2 networks defined : net_diskhb_01, net_ether_01
There are 2 nodes in this cluster.NODE tredb01:This node has 2 service IP label(s):Service IP Label hdiskpower0_01:IP address: /dev/hdiskpower0Hardware Address: Network: net_diskhb_01Attribute: serialAliased Address?: DisableService IP Label hdiskpower0_01 has no communication interfaces.Service IP Label hdiskpower0_01 has no communication interfaces for recovery.Service IP Label tredb02_ser:IP address: 18.6.6.4Hardware Address: Network: net_ether_01Attribute: publicAliased Address?: EnableService IP Label tredb02_ser has 2 communication interfaces.(Alternate Service) Communication Interface 1: tredb01_boot1IP address: 196.141.100.110Network: net_ether_01Attribute: publicAlias address for heartbeat: (Alternate Service) Communication Interface 2: tredb01_boot2IP address: 196.141.10.110Network: net_ether_01Attribute: publicAlias address for heartbeat: Service IP Label tredb02_ser has no communication interfaces for recovery.This node has 1 persistent IP label(s):Persistent IP Label tredb01_per:IP address: 18.6.6.5Network: net_ether_01NODE tredb02:This node has 2 service IP label(s):Service IP Label hdiskpower0_02:IP address: /dev/hdiskpower0Hardware Address: Network: net_diskhb_01Attribute: serialAliased Address?: DisableService IP Label hdiskpower0_02 has no communication interfaces.Service IP Label hdiskpower0_02 has no communication interfaces for recovery.Service IP Label tredb02_ser:IP address: 18.6.6.4Hardware Address: Network: net_ether_01Attribute: publicAliased Address?: EnableService IP Label tredb02_ser has 2 communication interfaces.(Alternate Service) Communication Interface 1: tredb02_boot2IP address: 196.141.10.100Network: net_ether_01Attribute: publicAlias address for heartbeat: (Alternate Service) Communication Interface 2: tredb02_boot1IP address: 196.141.100.100Network: net_ether_01Attribute: publicAlias address for heartbeat: Service IP Label tredb02_ser has no communication interfaces for recovery.This node has 1 persistent IP label(s):Persistent IP Label tredb02_per:IP address: 18.6.6.6Network: net_ether_01Breakdown of network connections:Connections to network net_diskhb_01Node tredb01 is connected to network net_diskhb_01 by these interfaces: hdiskpower0_01Node tredb02 is connected to network net_diskhb_01 by these interfaces: hdiskpower0_02Connections to network net_ether_01Node tredb01 is connected to network net_ether_01 by these interfaces: tredb01_boot1tredb01_boot2tredb02_sertredb01_perNode tredb02 is connected to network net_ether_01 by these interfaces: tredb02_boot2tredb02_boot1tredb02_sertredb02_per
5 直接查看HA配置
# smit hacmp
1、選擇 --> Initialization and Standard Configuration
2、選擇 --> Display HACMP Configuration
Command: OK stdout: yes stderr: noBefore command completion, additional instructions may appear below.Cluster Name: tredb
Cluster Connection Authentication Mode: Standard
Cluster Message Authentication Mode: None
Cluster Message Encryption: None
Use Persistent Labels for Communication: No
There are 2 node(s) and 2 network(s) definedNODE tredb01:Network net_diskhb_01hdiskpower0_01 /dev/hdiskpower0Network net_ether_01tredb02_ser 18.6.6.4tredb01_boot1 196.141.100.110tredb01_boot2 196.141.10.110NODE tredb02:Network net_diskhb_01hdiskpower0_02 /dev/hdiskpower0Network net_ether_01tredb02_ser 18.6.6.4tredb02_boot2 196.141.10.100tredb02_boot1 196.141.100.100Resource Group tredbrgStartup Policy Online On Home Node OnlyFallover Policy Fallover To Next Priority Node In The ListFallback Policy Never FallbackParticipating Nodes tredb01 tredb02Service IP Label tredb02_serTotal Heartbeats Missed: 42
Cluster Topology Start Time: 02/10/2023 22:07:38
4 HA網(wǎng)卡SMIT查看方法(暫不完整)
4.1 根據(jù)hosts文件確認(rèn)IP對(duì)應(yīng)的別名
$ cat /etc/hosts
100.1.22.1 test1_boot1 test1
100.1.22.2 test2_boot1 test2
192.168.22.1 test1_boot2
192.168.22.2 test2_boot2
10.1.22.1 test1_svc
10.1.22.5 test1_per db1
10.1.22.6 test2_per db2
4.2 根據(jù)serviceIP確認(rèn)Persistent IP的網(wǎng)絡(luò)
# smit hacmp
1、選擇 --> Initialization and Standard Configuration
2、選擇 --> Configure Resources to Make Highly Available
3、選擇 --> Configure Service IP Lables/Addresses
4、選擇 --> Add a Service IP Lable/Address
添加db1_svc,選擇網(wǎng)絡(luò) net_ether_01
“IP Lable/Address”選擇test1_svc
確認(rèn)獲取網(wǎng)絡(luò)為net_ether_01
4.3 根據(jù)Persistent IP的網(wǎng)絡(luò)得到Persistent IP
# smit hacmp
1、選擇 --> Initialization and Standard Configuration
2、選擇 --> Configure Resources to Make Highly Available
3、選擇 --> Configure Persistent Node IP Lables/Addresses
4、選擇 --> Add a Persistent Node IP Lable/Address
5、兩個(gè)節(jié)點(diǎn)分別按規(guī)劃配置。先配置節(jié)點(diǎn)db1
6、配置
“Network Name”net_ether_01
“Node IP Lable/Address”選擇db1
“Netmask”填寫(xiě)255.255.255.0
確認(rèn)網(wǎng)絡(luò)為net_ether_01
的Persistent IP為db1