linux命令进入db2 linux命令进入桌面( 四 )


cd /usr/lpp/mmfs/src/config; ./configure --genenvonly; if [ $? -eq 0 ]; then /usr/bin/cpp -P def.mk.proto./def.mk; exit $? || exit 1; else exit $?; fi
手工执行时会发现在./configure --genenvonly; 这一步报找不到
/usr/bin/diff: /lib/modules/3.0.76-0.11-default/build/include/linux/autoconf.h: No such file or directory
Kernel source tree does not have the correct autoconf.h file.
See /usr/lpp/mmfs/src/README for further information
手工拷呗一下autoconf.h文件即可
#cp –v /usr/src/linux-3.0.76-0.11-obj/x86_64/default/include/generated/autoconf.h /lib/modules/3.0.76-0.11-default/build/include/linux/
GPFS 文件系统配置与挂载
方法1:使用db2cluster_prepare
node01上执行:
#/opt/ibm/db2/v10.5/instance/db2cluster_prepare -instance_shared_dev /dev/sdb
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.
此时df -l查看一下会发现多了一个挂载点
node01:/opt/ibm/db2/V10.5/instance # df -l
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 19599036 8122392 10481060 44% /
udev 958688 120 958568 1% /dev
tmpfs 958688 76 958612 1% /dev/shm
/dev/sda3 10327940 154460 9648836 2% /home
/dev/db2fs1 15728640 627712 15100928 4% /db2sd_20140401103940
曾经出现报错:
DBI20022E The DB2 installer detected that the variable record "GPFS_CLUSTER" is
defined in the global registry. However, the GPFS cluster does not exist on
host "node01".
Creating IBM General Parallel File System (GPFS) Cluster and Filesystem :.......Failure
查看/tmp/ibm.db2.cluster.GuOypP发现有如下内容报错:
014-04-01-10.26.12.358494+480 I5385E400 LEVEL: Warning
PID : 7469 TID : 139670848014112 PROC : db2cluster
INSTANCE: NODE : 000
HOSTNAME: node01
FUNCTION: DB2 UDB, oper system services, sqloMessage, probe:1
MESSAGE : Cannot obtain registry variables
DATA #1 : Hexdump, 4 bytes
0x00007FFF17631758 : B400 0F87
解决方案:由于此前我在此机器上试过N次db2cluster_prepare,包括V9.8、V10.1,V10.5安装,导致全局注册表变量没有删除干净,使用db2greg -dump
V,GPFS_CLUSTER,NAME,db2cluster_20140403105617.site,-,DB2_CREATED将其删除 。
#cp -v /var/db2/global.reg /var/db2/global.reg_20140401
#db2delgreg -delvarrec service= GPFS_CLUSTER
总结:db2cluster_prepare这个命令失败时
检查iscsi client是否准备好,fdisk -l查看一下是否有/dev/sdb
全局注册表变量是否未删除干净 ,db2greg -dump查看
检查一下是否tsa的domain存在,lsrpdomain,使用rmrpdomain将其删掉,如果其node为活动需先将其node停掉 。具体参考tsa相关命令 , 
检查一下gpfs cluster domain是否未清理干净,如果未清理干净,需要使用将fs、nsd、node清理掉,具体命令参考gpfs信息中心 。
方法2:手工挂载GPFS
遇到过使用db2cluster_prepare时无法成功,手工安装(不确定是否遇到了传说中的bug) 。
创建cluster,不加-filesystem -disk选项:
node01:
#db2cluster -cfs -create -domain mydomain -host node01
#db2cluster -cfs -add -host node02
# db2cluster -cfs -add -host node03
说明:上面如果不出故障当然可以加上-filesystem –disk参数,当然也可以用mmaddnode –N XXX来添加节点
添加许可协议:
提供两种方法

推荐阅读