1,查看原有informix数据库表空间情况及数据文件大小:
ccbsfrnt:/home/db/informix/> onstat -d
IBM Informix Dynamic Server Version 9.40.FC7 -- On-Line -- Up 1 days 23:05:56 -- 432024 Kbytes
Dbspaces
address number flags fchunk nchunks flags owner name
c0000000087c3030 1 0x60001 1 1 N B informix rootdbs
c00000000948b850 2 0x60001 2 1 N B informix indxdbs01
c00000000948ba00 3 0x60001 3 1 N B informix logdbs01
c00000000948bbb0 4 0x60001 4 1 N B informix phydbs01
c00000000948bd60 5 0x42001 5 1 N TB informix tmpdbs01
c000000009720030 6 0x42001 6 1 N TB informix tmpdbs02
c0000000097201e0 7 0x42001 7 1 N TB informix tmpdbs03
c000000009720390 8 0x60001 8 1 N B informix workdbs01
c000000009720540 9 0x60001 9 1 N B informix workdbs02
c0000000097206f0 10 0x60001 10 1 N B informix workdbs03
c0000000097208a0 11 0x60001 11 1 N B informix workdbs04
11 active, 2047 maximum
Chunks
address chunk/dbs offset size free bpages flags pathname
c0000000087c31e0 1 1 50 500000 491316 PO-B /home/db/informix/dbs/rootchunk0
c0000000087c37e0 2 2 50 500000 499947 PO-B /home/db/informix/dbs/idxchunk0
c0000000087c3980 3 3 50 500000 9947 PO-B /home/db/informix/dbs/logchunk0
c0000000087c3b20 4 4 50 500000 249947 PO-B /home/db/informix/dbs/phychunk0
c0000000087c3cc0 5 5 50 500000 499947 PO-B /home/db/informix/dbs/tmpchunk1
c0000000087c3e60 6 6 50 500000 499947 PO-B /home/db/informix/dbs/tmpchunk2
c00000000948b030 7 7 50 500000 499947 PO-B /home/db/informix/dbs/tmpchunk0
c00000000948b1d0 8 8 50 1000000 999947 PO-B /home/db/informix/dbs/workchunk0
c00000000948b370 9 9 50 1000000 999947 PO-B /home/db/informix/dbs/workchunk1
c00000000948b510 10 10 50 1000000 999947 PO-B /home/db/informix/dbs/workchunk2
c00000000948b6b0 11 11 50 1000000 999947 PO-B /home/db/informix/dbs/workchunk3
11 active, 32766 maximum
Expanded chunk capacity mode: always
2,在/dev/vg00中添加名为lgntv0013011的裸设备,并赋予相应权限及属主,裸设备大小以其他数据文件大小相等:
ccbsfrnt:[root]#[/]cd /dev/vg00
ccbsfrnt:[root]#[/dev/vg00]ls
group lgntv0013005 lgntv00l00 lvol4 rlgntv0013001 rlgntv0013007 rlgntv00l02 rlvol6
lgntv0013000 lgntv0013006 lgntv00l01 lvol5 rlgntv0013002 rlgntv0013008 rlvol1 rlvol7
lgntv0013001 lgntv0013007 lgntv00l02 lvol6 rlgntv0013003 rlgntv0013009 rlvol2 rlvol8
lgntv0013002 lgntv0013008 lvol1 lvol7 rlgntv0013004 rlgntv0013010 rlvol3
lgntv0013003 lgntv0013009 lvol2 lvol8 rlgntv0013005 rlgntv00l00 rlvol4
lgntv0013004 lgntv0013010 lvol3 rlgntv0013000 rlgntv0013006 rlgntv00l01 rlvol5
ccbsfrnt:[root]#[/dev/vg00]lvcreate -L 2048 -n lgntv0013011 vg00
Logical volume "/dev/vg00/lgntv0013011" has been successfully created with
character device "/dev/vg00/rlgntv0013011".
Logical volume "/dev/vg00/lgntv0013011" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
ccbsfrnt:[root]#[/dev/vg00]chown informix:informix rlgntv0013011
ccbsfrnt:[root]#[/dev/vg00]chmod 660 rlgntv0013011
ccbsfrnt:[root]#[/dev/vg00]ll
total 0
crw-r----- 1 root sys 64 0x000000 Jul 8 11:45 group
brw-r----- 1 root sys 64 0x000017 Jul 29 12:31 lgntv0013000
brw-r----- 1 root sys 64 0x000018 Jul 29 12:31 lgntv0013001
brw-r----- 1 root sys 64 0x000019 Jul 29 12:31 lgntv0013002
brw-r----- 1 root sys 64 0x00001a Jul 29 12:31 lgntv0013003
brw-r----- 1 root sys 64 0x00001b Jul 29 12:31 lgntv0013004
brw-r----- 1 root sys 64 0x00001c Jul 29 12:32 lgntv0013005
brw-r----- 1 root sys 64 0x00001d Jul 29 12:32 lgntv0013006
brw-r----- 1 root sys 64 0x00001e Jul 29 12:32 lgntv0013007
brw-r----- 1 root sys 64 0x00001f Jul 29 12:32 lgntv0013008
brw-r----- 1 root sys 64 0x000020 Jul 29 12:32 lgntv0013009
brw-r----- 1 root sys 64 0x000021 Jul 29 12:33 lgntv0013010
brw-r----- 1 root sys 64 0x000022 Jul 31 16:04 lgntv0013011
brw-r----- 1 root sys 64 0x000009 Jul 8 16:28 lgntv00l00
brw-r----- 1 root sys 64 0x00000a Jul 8 16:28 lgntv00l01
brw-r----- 1 root sys 64 0x00000b Jul 8 16:37 lgntv00l02
brw-r----- 1 root sys 64 0x000001 Jul 8 11:45 lvol1
brw-r----- 1 root sys 64 0x000002 Jul 8 11:45 lvol2
brw-r----- 1 root sys 64 0x000003 Jul 8 11:45 lvol3
brw-r----- 1 root sys 64 0x000004 Jul 8 11:45 lvol4
brw-r----- 1 root sys 64 0x000005 Jul 8 11:45 lvol5
brw-r----- 1 root sys 64 0x000006 Jul 8 11:45 lvol6
brw-r----- 1 root sys 64 0x000007 Jul 8 11:45 lvol7
brw-r----- 1 root sys 64 0x000008 Jul 8 11:45 lvol8
crw-rw---- 1 informix informix 64 0x000017 Jul 29 12:31 rlgntv0013000
crw-rw---- 1 informix informix 64 0x000018 Jul 29 12:31 rlgntv0013001
crw-rw---- 1 informix informix 64 0x000019 Jul 29 12:31 rlgntv0013002
crw-rw---- 1 informix informix 64 0x00001a Jul 29 12:31 rlgntv0013003
crw-rw---- 1 informix informix 64 0x00001b Jul 29 12:31 rlgntv0013004
crw-rw---- 1 informix informix 64 0x00001c Jul 29 12:32 rlgntv0013005
crw-rw---- 1 informix informix 64 0x00001d Jul 29 12:32 rlgntv0013006
crw-rw---- 1 informix informix 64 0x00001e Jul 29 12:32 rlgntv0013007
crw-rw---- 1 informix informix 64 0x00001f Jul 29 12:32 rlgntv0013008
crw-rw---- 1 informix informix 64 0x000020 Jul 29 12:32 rlgntv0013009
crw-rw---- 1 informix informix 64 0x000021 Jul 29 12:33 rlgntv0013010
crw-rw---- 1 informix informix 64 0x000022 Jul 31 16:04 rlgntv0013011
crw-rw---- 1 informix informix 64 0x000009 Jul 8 16:28 rlgntv00l00
crw-rw---- 1 informix informix 64 0x00000a Jul 8 16:28 rlgntv00l01
crw-rw---- 1 informix informix 64 0x00000b Jul 8 16:37 rlgntv00l02
crw-r----- 1 root sys 64 0x000001 Jul 8 11:45 rlvol1
crw-r----- 1 root sys 64 0x000002 Jul 8 11:45 rlvol2
crw-r----- 1 root sys 64 0x000003 Jul 8 11:45 rlvol3
crw-r----- 1 root sys 64 0x000004 Jul 8 11:45 rlvol4
crw-r----- 1 root sys 64 0x000005 Jul 8 11:45 rlvol5
crw-r----- 1 root sys 64 0x000006 Jul 8 11:45 rlvol6
crw-r----- 1 root sys 64 0x000007 Jul 8 11:45 rlvol7
crw-r----- 1 root sys 64 0x000008 Jul 8 11:45 rlvol8
3,在/home/db/informix/dbs文件夹中创建对应lgntv0013011裸设备的软链接:
ccbsfrnt:/home/db/informix/> cd dbs
ccbsfrnt:/home/db/informix/dbs/> ls
idxchunk0 phychunk0 tmpchunk0 tmpchunk2 workchunk1 workchunk3
logchunk0 rootchunk0 tmpchunk1 workchunk0 workchunk2
ccbsfrnt:/home/db/informix/dbs/> ll
total 0
lrwxrwxrwx 1 informix informix 23 Jul 29 16:13 idxchunk0 -> /dev/vg00/rlgntv0013010
lrwxrwxrwx 1 informix informix 23 Jul 29 12:40 logchunk0 -> /dev/vg00/rlgntv0013005
lrwxrwxrwx 1 informix informix 23 Jul 29 12:40 phychunk0 -> /dev/vg00/rlgntv0013001
lrwxrwxrwx 1 informix informix 23 Jul 29 12:39 rootchunk0 -> /dev/vg00/rlgntv0013000
lrwxrwxrwx 1 informix informix 23 Jul 29 12:40 tmpchunk0 -> /dev/vg00/rlgntv0013002
lrwxrwxrwx 1 informix informix 23 Jul 29 12:40 tmpchunk1 -> /dev/vg00/rlgntv0013003
lrwxrwxrwx 1 informix informix 23 Jul 29 12:40 tmpchunk2 -> /dev/vg00/rlgntv0013004
lrwxrwxrwx 1 informix informix 23 Jul 29 12:41 workchunk0 -> /dev/vg00/rlgntv0013006
lrwxrwxrwx 1 informix informix 23 Jul 29 12:41 workchunk1 -> /dev/vg00/rlgntv0013007
lrwxrwxrwx 1 informix informix 23 Jul 29 12:41 workchunk2 -> /dev/vg00/rlgntv0013008
lrwxrwxrwx 1 informix informix 23 Jul 29 12:41 workchunk3 -> /dev/vg00/rlgntv0013009
ccbsfrnt:/home/db/informix/dbs/> ln -s /dev/vg00/rlgntv0013011 workchunk4
ccbsfrnt:/home/db/informix/dbs/> ll
total 0
lrwxrwxrwx 1 informix informix 23 Jul 29 16:13 idxchunk0 -> /dev/vg00/rlgntv0013010
lrwxrwxrwx 1 informix informix 23 Jul 29 12:40 logchunk0 -> /dev/vg00/rlgntv0013005
lrwxrwxrwx 1 informix informix 23 Jul 29 12:40 phychunk0 -> /dev/vg00/rlgntv0013001
lrwxrwxrwx 1 informix informix 23 Jul 29 12:39 rootchunk0 -> /dev/vg00/rlgntv0013000
lrwxrwxrwx 1 informix informix 23 Jul 29 12:40 tmpchunk0 -> /dev/vg00/rlgntv0013002
lrwxrwxrwx 1 informix informix 23 Jul 29 12:40 tmpchunk1 -> /dev/vg00/rlgntv0013003
lrwxrwxrwx 1 informix informix 23 Jul 29 12:40 tmpchunk2 -> /dev/vg00/rlgntv0013004
lrwxrwxrwx 1 informix informix 23 Jul 29 12:41 workchunk0 -> /dev/vg00/rlgntv0013006
lrwxrwxrwx 1 informix informix 23 Jul 29 12:41 workchunk1 -> /dev/vg00/rlgntv0013007
lrwxrwxrwx 1 informix informix 23 Jul 29 12:41 workchunk2 -> /dev/vg00/rlgntv0013008
lrwxrwxrwx 1 informix informix 23 Jul 29 12:41 workchunk3 -> /dev/vg00/rlgntv0013009
lrwxrwxrwx 1 informix informix 23 Jul 31 16:06 workchunk4 -> /dev/vg00/rlgntv0013011
4,增加名为workchunk4,大小为200MB的表空间:
ccbsfrnt:/home/db/informix/dbs/> onspaces -c -d workdbs05 -p /home/db/informix/dbs/workchunk4 -o 100 -s 2000000
Verifying physical disk space, please wait ...
Space successfully added.
** WARNING ** A level 0 archive of Root DBSpace will need to be done.
5,通过命令“onstat -d”重新查看表空间情况,可见workchunk4已经添加:
ccbsfrnt:/home/db/informix/dbs/> onstat -d
IBM Informix Dynamic Server Version 9.40.FC7 -- On-Line -- Up 1 days 23:15:44 -- 432024 Kbytes
Dbspaces
address number flags fchunk nchunks flags owner name
c0000000087c3030 1 0x60001 1 1 N B informix rootdbs
c00000000948b850 2 0x60001 2 1 N B informix indxdbs01
c00000000948ba00 3 0x60001 3 1 N B informix logdbs01
c00000000948bbb0 4 0x60001 4 1 N B informix phydbs01
c00000000948bd60 5 0x42001 5 1 N TB informix tmpdbs01
c000000009720030 6 0x42001 6 1 N TB informix tmpdbs02
c0000000097201e0 7 0x42001 7 1 N TB informix tmpdbs03
c000000009720390 8 0x60001 8 1 N B informix workdbs01
c000000009720540 9 0x60001 9 1 N B informix workdbs02
c0000000097206f0 10 0x60001 10 1 N B informix workdbs03
c0000000097208a0 11 0x60001 11 1 N B informix workdbs04
c0000000098999c0 12 0x60001 12 1 N B informix workdbs05
12 active, 2047 maximum
Chunks
address chunk/dbs offset size free bpages flags pathname
c0000000087c31e0 1 1 50 500000 491314 PO-B /home/db/informix/dbs/rootchunk0
c0000000087c37e0 2 2 50 500000 499947 PO-B /home/db/informix/dbs/idxchunk0
c0000000087c3980 3 3 50 500000 9947 PO-B /home/db/informix/dbs/logchunk0
c0000000087c3b20 4 4 50 500000 249947 PO-B /home/db/informix/dbs/phychunk0
c0000000087c3cc0 5 5 50 500000 499947 PO-B /home/db/informix/dbs/tmpchunk1
c0000000087c3e60 6 6 50 500000 499947 PO-B /home/db/informix/dbs/tmpchunk2
c00000000948b030 7 7 50 500000 499947 PO-B /home/db/informix/dbs/tmpchunk0
c00000000948b1d0 8 8 50 1000000 999947 PO-B /home/db/informix/dbs/workchunk0
c00000000948b370 9 9 50 1000000 999947 PO-B /home/db/informix/dbs/workchunk1
c00000000948b510 10 10 50 1000000 999947 PO-B /home/db/informix/dbs/workchunk2
c00000000948b6b0 11 11 50 1000000 999947 PO-B /home/db/informix/dbs/workchunk3
c000000009899b70 12 12 50 1000000 999947 PO-B /home/db/informix/dbs/workchunk4
12 active, 32766 maximum
Expanded chunk capacity mode: always
ccbsfrnt:/home/db/informix/dbs/>
阅读(4144) | 评论(0) | 转发(0) |