ASM_Lib_linux_redhat6.9添加asm磁盘扩容
ASM磁盘扩容 1.操作前查询 # oracleasm listdisks 查看asm磁盘 SQL>select group_number,name,TOTAL_MB, FREE_MB from v$asm_diskgroup;
存储是华为存储,可以操作系统查询lun
root#upadmin
Upadmin>show vlun
disk name
sdd hexin_20200509 存储工程师按照业务系统及日期进行标识,避免寻找错误的新盘
2.添加磁盘 节点1对磁盘进行分区 # fdisk /dev/sdd n p 1 default default w 创建ASM磁盘 # /etc/init.d/oracleasm createdisk arch2 /dev/sdd1 # /etc/init.d/oracleasm listdisks # /etc/init.d/oracleasm scandisks 另一个节点同步磁盘信息 #ll /dev/sd* #partprobe sd* 另一个节点磁盘确认 #/etc/init.d/oracleasm scandisks #/etc/init.d/oracleasm listdisks SQL>alter diskgroup arch check norepair; --添加ARCH磁盘之前,进行检测 SUCCESS: check of diskgroup ARCH found no errors SUCCESS: alter diskgroup arch check norepair 官方文档 The CHECK keyword performs the following operations: Checks the consistency of the disk. Cross checks all the file extent maps and allocation tables for consistently. Checks that the alias metadata directory and file directory are linked correctly. Checks that the alias directory tree is linked correctly. Checks that Oracle ASM metadata directories do not have unreachable allocated blocks. REPAIR | NOREPAIR This clause lets you instruct Oracle ASM whether or not to attempt to repair any errors found during the consistency check.
The default is NOREPAIR. The NOREPAIR setting is useful if you want to be alerted to any inconsistencies but do not want Oracle ASM to take any
automatic action to resolve them. ---- $sqlplus / as sysasm SQL> alter diskgroup ARCH add disk '/dev/oracleasm/disks/ARCH2' rebalance power 0; alter diskgroup ARCH add disk '/dev/oracleasm/disks/ARCH2' rebalance power 0; alter diskgroup ARCH rebalance power 11;
!加磁盘的时候遇到报错
ORA 15032
ORA 15031
ORA 15014 此时无法进行磁盘添加! 检查发现是asm实例检测磁盘位置参数不对null,但是生效需要重启才能生效! 但是实际上不重启,只是修改重启生效,也是可以添加磁盘的
SQL>ALTER SYSTEM SET ASM_DISKSTRING='/dev/oracleasm/disks/*' sid='*' scope=spfile; 这个命令实质上是 重启才能生效,但是不重启也可以加盘。ok
--查询验证 ASMCMD> lsdg 检查确认 查询asm_alert日志; 查询db_alert日志; SQL> select group_number,disk_number,library,name,path from v$asm_disk where PATH like '/dev/oracleasm/disks/arch%'
order by PATH desc; SQL> select group_number,name,total_mb/1024 TOTAL_GB,free_mb/1024 FREE_GB,free_mb/total_mb*100 free_percent,state,TYPE
from v$ASM_DISKGROUP;