AIX中的VG类型
AIX中的VG有三种类型,如下:
VG type |
Maximum PVs |
Maximum LVs |
Maximum PPs per VG |
Maximum PP size |
Normal VG |
32 |
256 |
32,512 (1016 * 32) |
1 GB |
Big VG |
128 |
512 |
130,048 (1016 * 128) |
1 GB |
Scalable VG |
1024 |
4096 |
2,097,152 |
128 GB |
首先如何查看VG是什么类型呢?
通过如下方法
例如:hdisk2 属于 datavg
那么执行#readvgda hdisk2|grep type
..... readvgda_type: smallvg
vgtype: 0
可以发现datavg是normal VG。
维护过程中用的最多的是,如何平衡一个VG中的PP与PV,LV的数量。
如何在不改变VG类型的情况下,改变VG中的最大PP数量呢?
可以通过修改factor因子,来平衡PP和PV的数量
例如:
# lsvg datavg
VOLUME GROUP: datavg VG IDENTIFIER: 00f7433800004c000000013808c3ac8d
VG STATE: active PP SIZE: 4 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 48 (192 megabytes)
MAX LVs: 256 FREE PPs: 10 (40 megabytes)
LVs: 3 USED PPs: 38 (152 megabytes)
OPEN LVs: 2 QUORUM: 1 (Disabled)
TOTAL PVs: 2 VG DESCRIPTORS: 3
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 2 AUTO ON: no
Concurrent: Enhanced-Capable Auto-Concurrent: Disabled
VG Mode: Non-Concurrent
MAX PPs per VG: 32512
MAX PPs per PV: 1016 MAX PVs: 32
LTG size (Dynamic): 128 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
PV RESTRICTION: none INFINITE RETRY: no
# lsvg -p datavg
datavg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk2 active 24 5 04..00..00..00..01
hdisk5 active 24 5 04..00..00..00..01
# readvgda hdisk2|grep type
..... readvgda_type: smallvg
vgtype: 0
# set -o vi
# readvgda hdisk2|grep factor
factor: 1
# chvg -t 2 datavg 更改factor 为2
0516-1164 chvg: Volume group datavg changed. With given characteristics datavg
can include up to 16 physical volumes with 2032 physical partitions each.
# lsvg datavg
VOLUME GROUP: datavg VG IDENTIFIER: 00f7433800004c000000013808c3ac8d
VG STATE: active PP SIZE: 4 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 48 (192 megabytes)
MAX LVs: 256 FREE PPs: 10 (40 megabytes)
LVs: 3 USED PPs: 38 (152 megabytes)
OPEN LVs: 2 QUORUM: 1 (Disabled)
TOTAL PVs: 2 VG DESCRIPTORS: 3
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 2 AUTO ON: no
Concurrent: Enhanced-Capable Auto-Concurrent: Disabled
VG Mode: Non-Concurrent
MAX PPs per VG: 32512
MAX PPs per PV: 2032 MAX PVs: 16
LTG size (Dynamic): 128 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
PV RESTRICTION: none INFINITE RETRY: no
#
# readvgda hdisk2|grep factor
factor: 2
还有一种方法就是改变VG类型,来增大PP,PV,LV的最大数量
# chvg -B mndhb_vg_01 改变VG为Big VG类型
0516-1164 chvg: Volume group mndhb_vg_01 changed. With given characteristics mndhb_vg_01
can include up to 64 physical volumes with 2032 physical partitions each.
# lsvg mndhb_vg_01
VOLUME GROUP: mndhb_vg_01 VG IDENTIFIER: 00f7433800004c000000013808c3ac8d
VG STATE: active PP SIZE: 4 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 44 (176 megabytes)
MAX LVs: 512 FREE PPs: 6 (24 megabytes)
LVs: 3 USED PPs: 38 (152 megabytes)
OPEN LVs: 2 QUORUM: 1 (Disabled)
TOTAL PVs: 2 VG DESCRIPTORS: 3
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 2 AUTO ON: no
Concurrent: Enhanced-Capable Auto-Concurrent: Disabled
VG Mode: Non-Concurrent
MAX PPs per VG: 130048
MAX PPs per PV: 2032 MAX PVs: 64
LTG size (Dynamic): 128 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
PV RESTRICTION: none INFINITE RETRY: no
# readvgda hdisk2|grep type
..... readvgda_type: bigvg
vgtype: 1
注意如果将VG类型改为Scalable VG时,需要首先varyoffvg
#varyoffvg datavg
#chvg -G datavg
#varyonvg datavg
建议在新部署系统的时候,建立VG时,选择Scalable VG,这样可以消除512 byte logical volume control block (LVCB) offset to affect aligned writes (often found on systems using raw LVs with Oracle databases)的限制
如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!
赞38
添加新评论23 条评论
2018-01-06 13:48
2015-09-07 21:35
不过可以i直接改变vg的大小吗?
2014-03-09 10:04
我用HACMP中的change/show characteristics of a volume group这个里面修改参数不行。
wilson: @dreamer 如果有oracle rac,不要修改,会导致raw信息改变,库起不来
2014-01-04 11:28
wilson: @huzia 如果有oracle rac,不要修改,会导致raw信息改变,库起不来
2013-07-28 09:26
2013-07-22 12:01
2013-05-29 08:36
2013-05-21 16:14
2013-05-21 14:06
2013-05-21 10:10
2013-05-15 18:42
2013-05-14 08:45
2013-05-04 10:44
2013-05-03 21:53
2013-05-03 09:07
2013-05-02 16:59
2013-04-28 10:43
2013-04-27 17:58
2013-04-27 17:03
2013-04-25 10:47
2013-04-23 17:01
2013-04-21 16:14
2013-04-19 09:57