HI, 大哥:
您好!
以下是我安装的步骤
1. 配置共享磁盘
在A机执行
vi /etc/tgt/targets.conf
--------------------------------------------
backing-store /dev/sdb
initiator-address 192.168.58.101
initiator-address 192.168.58.102
vi /etc/rc.local
--------------------------------------------
iscsiadm --mode discoverydb --type sendtargets --portal 192.168.58.101 --discover
iscsiadm --m node --targetname iqn.2015-04.localdomain:NodeA --portal 192.168.58.101:3260 --login
在B机执行
vi /etc/rc.local
--------------------------------------------
iscsiadm --mode discoverydb --type sendtargets --portal 192.168.58.101 --discover
iscsiadm --m node --targetname iqn.2015-04.localdomain:NodeA --portal 192.168.58.101:3260 --login
2. 安装DB2程序
在A机、B机安装,日志显示全部安装成功
[root@NodeA server_t]# ./db2_install
DBI1324W Support of the db2_install command is deprecated.
Default directory for installation of products - /opt/ibm/db2/V10.5
***********************************************************
Install into default directory (/opt/ibm/db2/V10.5) ? [yes/no]
yes
Specify one of the following keywords to install DB2 products.
SERVER
CONSV
EXP
CLIENT
RTCL
Enter "help" to redisplay product names.
Enter "quit" to exit.
***********************************************************
SERVER
***********************************************************
Do you want to install the DB2 pureScale Feature? [yes/no]
yes
.....
.....
Task #55 start
Description: Updating global profile registry
Estimated time 3 second(s)
Task #55 end
The execution completed successfully.
3. 创建共享文件系统GPFS
在A机上运行
[root@NodeA instance]# ./db2cluster_prepare -instance_shared_dev /dev/sdc
DBI1446I The db2cluster_prepare command is running.
DB2 installation is being initialized.
Total number of tasks to be performed: 1
Total estimated time for all tasks to be performed: 60 second(s)
Task #1 start
Description: Creating IBM General Parallel File System (GPFS) Cluster and Filesystem
Estimated time 60 second(s)
Task #1 end
The execution completed successfully.
For more information see the DB2 installation log at
"/tmp/db2cluster_prepare.log".
DBI1070I Program db2cluster_prepare completed successfully.
[root@NodeA instance]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 36G 9.0G 25G 27% /
tmpfs 935M 228K 935M 1% /dev/shm
/dev/sda1 291M 62M 214M 23% /boot
/dev/sr0 3.6G 3.6G 0 100% /media/RHEL_6.5 x86_64 Disc 1
/dev/db2fs1 12G 612M 12G 5% /db2sd_20150424023347
[root@NodeA instance]#
[root@NodeA instance]#
[root@NodeA instance]# db2cluster -cfs -list
Domain Name: db2cluster_20150424023314.com
[root@NodeA instance]# db2cluster -cfs -list -host
HOSTNAME
------------------------
NodeA
[root@NodeA instance]# db2cluster -cfs -add -host NodeB
Host 'NodeB' has been successfully added to the shared file system cluster.
[root@NodeA instance]# db2cluster -cfs -list -host
HOSTNAME
------------------------
NodeA
NodeB
[root@NodeA instance]# db2cluster -cfs -add -license
The license for the shared file system cluster has been successfully added.
[root@NodeA instance]# mmstartup -a
Fri Apr 24 02:39:55 PDT 2015: mmstartup: Starting GPFS ...
NodeA.com: The GPFS subsystem is already active.
[root@NodeA instance]# mmgetstate -a
Node number Node name GPFS state
------------------------------------------
1 NodeA active
2 NodeB active
[root@NodeA instance]# mmmount db2fs1 -a
Fri Apr 24 02:40:31 PDT 2015: mmmount: Mounting file systems ...
在B机检查
文件系统顺利挂载
[root@NodeB tmp]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 36G 9.0G 25G 27% /
tmpfs 935M 228K 935M 1% /dev/shm
/dev/sda1 291M 62M 214M 23% /boot
/dev/sr0 3.6G 3.6G 0 100% /media/RHEL_6.5 x86_64 Disc 1
/dev/db2fs1 12G 613M 12G 5% /db2sd_20150424023347
4. 创建实例
在A机创建实例,实例创建失败
[root@NodeA instance]# ./db2icrt -cf NodeA -cfnet NodeA -m NodeB -mnet NodeB -instance_shared_dir /db2sd_20150424023347/ -tbdev 192.168.58.1 -u db2fenc1 db2inst1
DBI1446I The db2icrt command is running.
DB2 installation is being initialized.
Total number of tasks to be performed: 10
Total estimated time for all tasks to be performed: 1074 second(s)
Task #1 start
Description: Installing DB2 files on remote hosts
Estimated time 600 second(s)
Task #1 end
Task #2 start
Description: Installing or updating DB2 HA scripts for IBM Tivoli System Automation for Multiplatforms (Tivoli SA MP)
Estimated time 40 second(s)
Task #2 end
Task #3 start
Description: Installing or updating DB2 Cluster Scripts for IBM General Parallel File System (GPFS)
Estimated time 40 second(s)
Task #3 end
Task #4 start
Description: Registering licenses on remote hosts
Estimated time 40 second(s)
Task #4 end
Task #5 start
Description: Setting default global profile registry variables
Estimated time 1 second(s)
Task #5 end
Task #6 start
Description: Register NTP
Estimated time 40 second(s)
Task #6 end
Task #7 start
Description: Initializing instance list
Estimated time 5 second(s)
Task #7 end
Task #8 start
Description: Initiating the remote host list
Estimated time 5 second(s)
Task #8 end
Task #9 start
Description: Configuring DB2 instances
Estimated time 300 second(s)
Task #9 end
Task #10 start
Description: Updating global profile registry
Estimated time 3 second(s)
Task #10 end
A minor error occurred during the execution.
For more information see the DB2 installation log at "/tmp/db2icrt.log.55127".
DBI1264E This program failed. Errors encountered during execution were
written to the installation log file. Program name:
db2icrt. Log file name: /tmp/db2icrt.log.55127.
Explanation:
This message is returned when some processes and operations have failed.
Detailed information about the error was written to the log file.
User response:
Contact IBM support to get assistance in resolving this issue. Keep the
log file intact as this file is an important reference for IBM support.
Related information:
Contacting IBM Software Support
查看日志文件
[root@NodeA instance]# cat /tmp/db2icrt.log.55127
DB2 Setup log file started at: Fri Apr 24 02:42:14 AM 2015 PDT
============================================================
Operating system information: Linux 2.6.32-431.el6.x86_64.#1 SMP Sun Nov 10 22:19:54 EST 2013 x86_64
WARNING: DBI20167W The DB2 pureScale instance was set to use the TCP/IP network protocol because the network is not configured for the RDMA network protocol.
The cluster interconnect netname specified for each host must correspond to a
DB2 supported network adapter. Use of any other network adapter for the
cluster interconnect is not supported. Verify the cluster interconnect
netnames.
WARNING: Recommendations for the configuration of the DB2 pureScale instance: db2inst1
The number of defined cluster caching facilities (CFs) and DB2 members is less
than the recommendation. Two CF hosts and at least two DB2 members is
recommended.
DB2 cluster services:
DB2 cluster services tiebreaker disk device path: 192.168.58.1
User-managed shared file system directory: /db2sd_20150424023347/
New instances:
Instance name: db2inst1
FCM port range: 60000-60005
CF port: 56001
CF Management port: 56000
Instance user information:
User name: db2inst1
UID: 1002
Group name: db2iadm1
GID: 1002
Home directory: /home/db2inst1
Fenced user information:
User name: db2fenc1
UID: 1001
Group name: db2fadm1
GID: 1001
Home directory: /home/db2fenc1
Cluster caching facilities:
Preferred primary cluster caching facility: NodeA
DB2 members:
NodeB
New Host List:
Host Cluster Interconnect Netname
NodeB NodeB
NodeA NodeA
Binary installation succeeded on the following hosts: "NodeB".
Installing DB2 file sets :.......Success
Installing or updating DB2 HA scripts for IBM Tivoli System Automation for Multiplatforms (Tivoli SA MP) :.......Success
Installing or updating DB2 Cluster Scripts for IBM General Parallel File System (GPFS) :.......Success
Registering licenses on remote hosts :.......Success
Setting default global profile registry variables :.......Success
Register NTP :.......Success
Initializing instance list :.......Success
Initiating the remote host list :.......Success
ERROR: A reachable IP address could not be automatically determined that did
not belong to one of the hosts in the DB2 pureScale instance. There may be a
problem with the network adapters gateway IP address or with the hosts network
connection. Verify connectivity for the hosts and manually edit the
configuration file /var/ct/cfg/netmon.cf on each host to include an IP on the
network outside of the DB2 pureScale instance that can be reached by the ping
command so that DB2 may ensure network connectivity. Hosts:
"NodeA.com:eth0NodeB.com:eth0". The format of /var/ct/cfg/netmon.cf lines is as
follows: !REQD eth1 9.26.123.245
Configuring DB2 instances :.......Failure
Updating global profile registry :.......Success
Post-installation instructions
-------------------------------
Required steps:
There were some errors detected during DB2 installation. To collect the information files from the system, run the "db2support -install" command with the proper options before reporting the problem to IBM service. For information regarding the usage of the db2support tool, check the DB2 Information Center.
Optional steps:
The default database path in the database manager configuration (DFTDBPATH) is set to "/db2sd_20150424023347/". This is also the path to the instance shared directory in a shared file system. DFTDBPATH can be updated to a new shared file system created using the db2cluster command (for example, db2cluster -cfs -create -filesystem fs-name). For details on creating a shared file system, see the db2cluster command in the DB2 Information Center.
To validate your installation files, instance, and database functionality, run the Validation Tool, /opt/ibm/db2/V10.5/bin/db2val. For more information, see "db2val" in the DB2 Information Center.
Open First Steps by running "db2fs" using a valid user ID such as the DB2 instance owner's ID. You will need to have DISPLAY set and a supported web browser in the path of this user ID.
Verify that you have access to the DB2 Information Center based on the choices you made during this installation. If you performed a typical or a compact installation, verify that you can access the IBM Web site using the internet. If you performed a custom installation, verify that you can access the DB2 Information Center location specified during the installation.
Ensure that you have the correct license entitlements for DB2 products and features installed on this machine. Each DB2 product or feature comes with a license certificate file (also referred to as a license key) that is distributed on an Activation CD, which also includes instructions for applying the license file. If you purchased a base DB2 product, as well as, separately priced features, you might need to install more than one license certificate. The Activation CD for your product or feature can be downloaded from Passport Advantage if it is not part of the physical media pack you received from IBM. For more information about licensing, search the Information Center (
http://publib.boulder.ibm.com/infocenter/db2luw/v10r5/index.jsp) using terms such as "license compliance", "licensing" or "db2licm".
To use your DB2 database product, you must have a valid license. For information about obtaining and applying DB2 license files, see
http://pic.dhe.ibm.com/infocenter/db2luw/v10r5/topic/com.ibm.db2.luw.qb.server.doc/doc/c0061199.html.
Host Summary
------------------
Host Name: NodeB
Install Status: successful
Detailed Log Location: /tmp/db2log.55134/NodeB
DB2 Setup log file finished at: Fri Apr 24 02:47:23 AM 2015 PDT
============================================================
5. 在两台机器修改文件
[root@NodeA server_t]# vi /var/ct/cfg/netmon.cf
[root@NodeB tmp]# vi /var/ct/cfg/netmon.cf
!REQD eth0 192.168.58.101
!REQD eth0 192.168.58.102
!REQD eth0 192.168.58.1
!IBQPORTONLY !ALL
6. 重新创建实例
[root@NodeA instance]# ./db2icrt -cf NodeA -cfnet NodeA -m NodeB -mnet NodeB -instance_shared_dir /db2sd_20150424023347/ -tbdev 192.168.58.1 -u db2fenc1 db2inst1
DBI1446I The db2icrt command is running.
DB2 installation is being initialized.
以下是第二次安装报错信息
[root@NodeA tmp]# cat /tmp/db2icrt.log.5829
DB2 Setup log file started at: Fri Apr 24 02:55:10 AM 2015 PDT
============================================================
Operating system information: Linux 2.6.32-431.el6.x86_64.#1 SMP Sun Nov 10 22:19:54 EST 2013 x86_64
WARNING: DBI20167W The DB2 pureScale instance was set to use the TCP/IP network protocol because the network is not configured for the RDMA network protocol.
The cluster interconnect netname specified for each host must correspond to a
DB2 supported network adapter. Use of any other network adapter for the
cluster interconnect is not supported. Verify the cluster interconnect
netnames.
WARNING: Recommendations for the configuration of the DB2 pureScale instance: db2inst1
The number of defined cluster caching facilities (CFs) and DB2 members is less
than the recommendation. Two CF hosts and at least two DB2 members is
recommended.
DB2 cluster services:
DB2 cluster services tiebreaker disk device path: 192.168.58.1
User-managed shared file system directory: /db2sd_20150424023347/
New instances:
Instance name: db2inst1
FCM port range: 60000-60005
CF port: 56001
CF Management port: 56000
Instance user information:
User name: db2inst1
UID: 1002
Group name: db2iadm1
GID: 1002
Home directory: /home/db2inst1
Fenced user information:
User name: db2fenc1
UID: 1001
Group name: db2fadm1
GID: 1001
Home directory: /home/db2fenc1
Cluster caching facilities:
Preferred primary cluster caching facility: NodeA
DB2 members:
NodeB
New Host List:
Host Cluster Interconnect Netname
NodeB NodeB
NodeA NodeA
Binary installation succeeded on the following hosts: "NodeB".
Installing DB2 file sets :.......Success
Installing or updating DB2 HA scripts for IBM Tivoli System Automation for Multiplatforms (Tivoli SA MP) :.......Success
Installing or updating DB2 Cluster Scripts for IBM General Parallel File System (GPFS) :.......Success
Registering licenses on remote hosts :.......Success
Setting default global profile registry variables :.......Success
Register NTP :.......Success
Initializing instance list :.......Success
Initiating the remote host list :.......Success
Creation of the RSCT peer domain, "db2domain_20150424030016", succeeded on the
host "NodeA".
Extension of the RSCT peer domain, "db2domain_20150424030016", succeeded on the
following hosts: "NodeB".
ERROR: DBI20009E Creation of SA MP resources for the DB2 instance, "db2inst1",
has failed. The instance creation will be rolled back.
ERROR: DBI20014E Removal of DB2 resources has failed for DB2 instance
"db2inst1".
Rollback of instance "db2inst1" failed on hosts "NodeA, NodeB"
ERROR: An error occurred while configuring the instance "db2inst1".
DBI20000E A DB2 instance could not be created as specified. A rollback of the
instance creation will be started.
Deletion of the RSCT peer domain, "db2domain_20150424030016", succeeded.
A db2cluster command has failed. Collect the db2dump directory from /tmp. Also,
collect the db2nodes.cfg from /tmp.
Configuring DB2 instances :.......Failure
Updating global profile registry :.......Success
Post-installation instructions
-------------------------------
Required steps:
DBI20001E A DB2 instance could not be created as specified. A rollback of the instance creation has been performed.
There were some errors detected during DB2 installation. To collect the information files from the system, run the "db2support -install" command with the proper options before reporting the problem to IBM service. For information regarding the usage of the db2support tool, check the DB2 Information Center.
Optional steps:
The network monitor configuration file for the DB2 pureScale instance has been updated on each host to include the IP address of the hosts gateway. The configuration file /var/ct/cfg/netmon.cf was updated on the following hosts: "NodeA NodeB". This file must be modified in the event of future changes to the hosts gateway IP address.
To validate your installation files, instance, and database functionality, run the Validation Tool, /opt/ibm/db2/V10.5/bin/db2val. For more information, see "db2val" in the DB2 Information Center.
Open First Steps by running "db2fs" using a valid user ID such as the DB2 instance owner's ID. You will need to have DISPLAY set and a supported web browser in the path of this user ID.
Verify that you have access to the DB2 Information Center based on the choices you made during this installation. If you performed a typical or a compact installation, verify that you can access the IBM Web site using the internet. If you performed a custom installation, verify that you can access the DB2 Information Center location specified during the installation.
Ensure that you have the correct license entitlements for DB2 products and features installed on this machine. Each DB2 product or feature comes with a license certificate file (also referred to as a license key) that is distributed on an Activation CD, which also includes instructions for applying the license file. If you purchased a base DB2 product, as well as, separately priced features, you might need to install more than one license certificate. The Activation CD for your product or feature can be downloaded from Passport Advantage if it is not part of the physical media pack you received from IBM. For more information about licensing, search the Information Center (
http://publib.boulder.ibm.com/infocenter/db2luw/v10r5/index.jsp) using terms such as "license compliance", "licensing" or "db2licm".
To use your DB2 database product, you must have a valid license. For information about obtaining and applying DB2 license files, see
http://pic.dhe.ibm.com/infocenter/db2luw/v10r5/topic/com.ibm.db2.luw.qb.server.doc/doc/c0061199.html.
Host Summary
------------------
Host Name: NodeB
Install Status: failure
Detailed Log Location: /tmp/db2log.5836/NodeB
DB2 Setup log file finished at: Fri Apr 24 03:06:31 AM 2015 PDT
============================================================
--
当年看见遥远星际传来的光线时,你可否知道这很可能是几百万光年以外的星球?你可否知道这光线是星球几百万年前发出的光? ------探索无止境!!!