标签:ade 根据 dev lsp 状态 删除 operation 备份 出错
注意事项:
1.最好选择业务空闲期间或者是停业期间进行操作。
2.操作之前做好数据库备份。
3.磁盘组扩容建议采用图形化的方式来操作,减少人为出错。
一.当磁盘组剩余空间不足,需要扩容的时候,我们首先需要查看磁盘时候有剩余,是否需要添加磁盘。
select name,path from v$asm_disk_stat;
另外希望查看对应的设备名称,可以利用如下命令查看:
[root@rac1 ~]# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
[root@rac1 ~]# /etc/init.d/oracleasm querydisk -p VOL1
Disk "VOL1" is a valid ASM disk
/dev/sdc1: LABEL="VOL1" TYPE="oracleasm"
[root@rac1 ~]# /etc/init.d/oracleasm querydisk -p VOL2
Disk "VOL2" is a valid ASM disk
/dev/sdd1: LABEL="VOL2" TYPE="oracleasm"
[root@rac1 ~]# /etc/init.d/oracleasm querydisk -p VOL3
Disk "VOL3" is a valid ASM disk
/dev/sde1: LABEL="VOL3" TYPE="oracleasm"
查看所有系统磁盘:
fdisk -l
二.开始加盘
1.查询数据库存储使用情况
set line 999 pages 999
select group_number,name,type,total_mb/1024,free_mb/1024,(total_mb-free_mb)/total_mb*100 pct,state from v$asm_diskgroup order by 1;
2.检查可用磁盘
set line 999 pages 999
col path for a40
select group_number,header_status,MOUNT_STATUS,STATE,OS_MB,path from v$asm_disk where group_number=0 order by 6;
3.检查两节点是否有PVID(没有才通过)
lspv|grep hdisk***
4.测试新盘是否可用
create diskgroup TEST_COMS2DG EXTERNAL REDUNDANCY disk
‘/dev/rhdisk***‘,
‘/dev/rhdisk***‘,
‘/dev/rhdisk***‘
;
5.查看状态:
col name for a30
set line 999 pages 999
select group_number,name,type,total_mb/1024,free_mb/1024,state from gv$asm_diskgroup order by 1;
6.删除测试磁盘组
drop diskgroup TEST_COMS2DG
7.再次检查:
col name for a30
set line 999 pages 999
select group_number,name,type,total_mb/1024,free_mb/1024,state from gv$asm_diskgroup order by 1;
8.正式加盘
alter diskgroup xxx add disk
‘/dev/rhdisk***‘,
‘/dev/rhdisk***‘,
‘/dev/rhdisk***‘
rebalance power 11;
9.查看添加是否完成
set line 999 pages 999
select group_number,name,type,total_mb/1024,free_mb/1024,(total_mb-free_mb)/total_mb*100 pct,state from gv$asm_diskgroup where name =‘**‘ order by 1;
10.新家磁盘进行重平衡。
alter diskgroup DATA rebalance power 10;
根据select operation,est_minutes from v$asm_operation;查看平衡是否完成。
11.重平衡完成修改参数
alter diskgroup COMS2DG rebalance power 1;
12.检查是否扩容成功
col name for a30
set line 999 pages 999
select INST_ID,group_number,name,type,total_mb/1024,free_mb/1024,state from gv$asm_diskgroup order by 2;
标签:ade 根据 dev lsp 状态 删除 operation 备份 出错
原文地址:https://www.cnblogs.com/liang-ning/p/12166242.html