在存储管理软件上面把lun映射到相应的linux server上面
重启linux server
在/var/log/messages里面能看到如下信息:
Aug 20 16:25:40 localhost smartd[8170]: Device: /dev/sdai, is SMART capable. Adding to "monitor" list.
从这里得到实际存储上硬盘的名字
,包括/dev/sdai, /dev/sdak, /dev/sdam ...
第一步:将这些硬盘激活
pvcreate /dev/sdai /dev/sdak /dev/sdam /dev/sdao /dev/sdaq /dev/sdas /dev/sdau /dev/sdcc /dev/sdce /dev/sdcg /dev/sdci /dev/sdck /de
v/sdcm /dev/sdco /dev/sdcq /dev/sdaw
ls
ls -l sdai
第二步:使用已经激活的硬盘创建VG
vgcreate dbvg /dev/sdai /dev/sdak /dev/sdam /dev/sdao /dev/sdaq /dev/sdas /dev/sdau /dev/sdcc /dev/sdce /dev/sdcg /dev/sdci /dev/sdc
k /dev/sdcm /dev/sdco /dev/sdcq
第三步:在已经创建的VG上面创建lv
lvcreate -L 81920M -n usr_t32k_001 dbvg
lvcreate -L 81920M -n usr_t32k_002 dbvg
lvcreate -L 81920M -n usr_t32k_003 dbvg
lvcreate -L 81920M -n usr_t32k_004 dbvg
lvcreate -L 81920M -n usr_t32k_005 dbvg
lvcreate -L 81920M -n usr_t32k_006 dbvg
lvcreate -L 81920M -n usr_t32k_007 dbvg
lvcreate -L 40900M -n usr_t32k_008 dbvg
lvcreate -L 40960M -n usr_t32k_009 dbvg
lvcreate -L 40000M -n usr_t32k_009 dbvg
第四步:利用已经创建的lv来创建供db2使用的裸设备(这里在部署oracle RAC时也会用到)
raw /dev/raw/raw1 /dev/mapper/dbvg-usr_t32k_001
raw /dev/raw/raw2 /dev/mapper/dbvg-usr_t32k_002
raw /dev/raw/raw3 /dev/mapper/dbvg-usr_t32k_003
raw /dev/raw/raw4 /dev/mapper/dbvg-usr_t32k_004
raw /dev/raw/raw5 /dev/mapper/dbvg-usr_t32k_005
raw /dev/raw/raw6 /dev/mapper/dbvg-usr_t32k_006
raw /dev/raw/raw7 /dev/mapper/dbvg-usr_t32k_007
raw /dev/raw/raw9 /dev/mapper/dbvg-usr_t32k_009
raw /dev/raw/raw8 /dev/mapper/dbvg-usr_t32k_000
更改裸设备的属组
chown kabusr2:db2admgp /dev/raw/raw[1,2,3,4,5,6,7,9]
创建db2 instance
ikabusr2 51119/tcp
./db2icrt -w64 -p ikabusr2 -u kabusr2 kabusr2
创建数据库
db2start
db2set db2codepage=1386
db2 "create db kabusr2 on /kabusr2/kabusr/kabusr using codeset GBK territory CN "
创建bufferpool
CREATE BUFFERPOOL bp32k
IMMEDIATE
ALL DBPARTITIONNUMS
SIZE 20000
PAGESIZE 32 K;
创建表空间
CREATE TABLESPACE TBS32K
IN DATABASE PARTITION GROUP IBMDEFAULTGROUP
PAGESIZE 32K
MANAGED BY DATABASE
USING
(Device '/dev/rusr_t32k_001/' 80920M,
Device '/dev/rusr_t32k_002/' 80920M,
Device '/dev/rusr_t32k_003/' 80920M,
Device '/dev/rusr_t32k_004/' 80920M,
Device '/dev/rusr_t32k_005/' 80920M,
Device '/dev/rusr_t32k_006/' 80920M
)
EXTENTSIZE 32
PREFETCHSIZE 32
BUFFERPOOL bp32k
;
阅读(2735) | 评论(1) | 转发(0) |