一、扩容原因:

启动数据库失败,查看日志/data/oracle/app/diag/rdbms/xe/XE1/trace/alert_XE1.log,提示如下信息:

image.png

备注:XE1SID


二、扩容前信息:

image.png

DATA磁盘组剩余0.28G

# su - grid

$ sqlplus / as sysasm

SQL> select group_number,name,total_mb,free_mb from v$asm_diskgroup;

image.png


三、开始扩容:

1、新增200G磁盘:

image.png

2、分区:

# fdisk /dev/sdk  n --> p --> 1 --> 回车 --> 回车 --> p --> w

# partx /dev/sdk

# fdisk -l | grep "Disk /dev/sd[a-k]"

image.png

3、创建ASM磁盘(只需在节点1中操作即可):

# oracleasm createdisk DATA4 /dev/sdk1

# oracleasm scandisks

image.png

# oracleasm listdisks

image.png

# ls -lh /dev/oracleasm/disks

image.png

4、在节点2中执行如下操作:

# oracleasm scandisks

image.png

# oracleasm listdisks

image.png

# ls -lh /dev/oracleasm/disks

image.png

5、查看ASM磁盘组名称及路径(只需在节点1中操作即可):

# su - grid

$ sqlplus / as sysasm

SQL> col name for a15

SQL> col path for a30

SQL> select name,path from v$asm_disk;

image.png

6、DATA磁盘组新增ASM磁盘DATA4,并将DATA组的rebalance修改为10(只需在节点1中操作即可):

# su - grid

$ sqlplus / as sysasm

SQL> alter diskgroup DATA add disk '/dev/oracleasm/disks/DATA4' rebalance power 10;

image.png

备注:此处必须以sysasm身份操作,否则会提示ORA-15032ORA-15260错误

7、查看新增ASM磁盘操作是否完成:

SQL> select operation,est_minutes from v$asm_operation;

image.png

备注:全部为0时表示操作完成

image.png

8、查看ASM磁盘组名称及路径(只需在节点1中操作即可):

# su - grid

$ sqlplus / as sysasm

SQL> col name for a15

SQL> col path for a30

SQL> select name,path from v$asm_disk;

image.png

9、DATA组的rebalance10修改为1

SQL> alter diskgroup DATA rebalance power 1;

image.png


四、扩容后信息:

image.png

# su - grid

$ sqlplus / as sysasm

SQL> select group_number,name,total_mb,free_mb from v$asm_diskgroup;

image.png