AIX详细的VG,LV扩容步骤

7 篇文章 0 订阅

转载:https://blog.csdn.net/Nedved_L/article/details/81670371

需求
1.归档日志刷得太快,经常把空间挤爆.

2.Oracle数据库表空间需要扩容

解决方案

1.先做重要数据备份

2.进行文件系统扩容

步骤

1. df -g 查找出/u01 对应的VG卷 VOLUME GROUP:

           # df -g

Filesystem GB blocks Free %Used Iused %Iused Mounted on
.
/dev/fslv00 60.00 3.95 94% 550567 36% /u01

> # lslv fslv00 

在这里插入图片描述

2.查看rootvg的FREE PPs:

# lsvg rootvg

在这里插入图片描述

PP SIZE(PP单位)

FREE PPs(PP块数)

FREE PPs: 10 (1280 megabytes) 可以看到只剩下1个G了

3.发现空间不足,进行磁盘扩展

3.1刷新磁盘(若果添加了物理磁盘,需要刷新一下)

# cfgmgr

cfgmgr命令详见

http://blog.sina.com.cn/s/blog_5a2405d10100lbxy.html

3.2查看磁盘使用情况

# lspv

在这里插入图片描述

.
.

注:查看磁盘空间大小

#bootinfo -s hdisk1

3.3进行扩展,发现报错

#extendvg rootvg hdisk2 hdisk3 0516-1254 extendvg: Changing the PVID in the ODM. 0516-1254 extendvg: Changing the PVID in the ODM.
0516-1162 extendvg: Warning, The Physical Partition Size of 128
requires the
creation of 1093 partitions for hdisk2. The limitation for volume group
rootvg is 1016 physical partitions per physical volume. Use chvg command
with -t option to attempt to change the maximum Physical Partitions per
Physical volume for this volume group. 0516-1162 extendvg: Warning, The Physical Partition Size of 128 requires the
creation of 1093 partitions for hdisk3. The limitation for volume group
rootvg is 1016 physical partitions per physical volume. Use chvg command
with -t option to attempt to change the maximum Physical Partitions per
Physical volume for this volume group. 0516-792 extendvg: Unable to extend volume group.

#chdev -l hdisk2 -a pv=yes
#chdev -l hdisk3 -a pv=yes

#chvg -t rootvg 0516-1187 chvg: Volume group not changed. Either the volume group rootvg
has the specified factor value or is at proper maximum physical partitions
per physical volume limit already. 0516-732 chvg: Unable to change volume group rootvg.

//因为PP数目已经达到上限

3.4刷新pp

#chvg -t 2 rootvg    

0516-1164 chvg: Volume group rootvg changed. With given
characteristics rootvg
can include upto 16 physical volumes with 2032 physical partitions each.

//数字2表示2×1016个PP

3.5再次进行扩展

#extendvg rootvg hdisk2 hdisk3

3.6查看磁盘使用情况,发现已经在使用

`

> #lspv

`

hdisk0 0007df58fb3e71d4 rootvg active
hdisk1 00009d03638bf367 rootvg active
hdisk2 00009d034caa708d rootvg active
hdisk3 00009d034caa7219 rootvg active

3.7查看vg卷的情况,确认已经扩容

#lsvg rootvg

VOLUME GROUP: rootvg VG IDENTIFIER: 0007df580000d70000000113fb3e72ce
VG STATE: active PP SIZE: 128 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 3278 (419584 megabytes)
MAX LVs: 256 FREE PPs: 2208 (282624 megabytes)
LVs: 60 USED PPs: 1070 (136960 megabytes)
OPEN LVs: 27 QUORUM: 1
TOTAL PVs: 4 VG DESCRIPTORS: 4
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 4 AUTO ON: yes
MAX PPs per VG: 32512
MAX PPs per PV: 2032 MAX PVs: 16
LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable

4.扩容完毕,进行文件系统扩容

  #chfs -a size=+500G /u01

0516-787 extendlv: Maximum allocation for logical volume /u01 is 1145.

注:+代表在原来基础上增加500G大小

从这个提示可以看到逻辑卷lv2已经到达最大的pp扩展数

# lslv fslv00

在这里插入图片描述

已经超过max值了

重新调整pp的max值

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述
回车保存,退出

再次进行扩展文件系统

#chfs -a size=+500G /u01

没有报错,扩容完毕

df -g 再次检查就行了

  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值