1.检查各个节点database、asm及grid日志是否有错误信息https://www.cndba.cn/hbhe0316/article/96101https://www.cndba.cn/hbhe0316/article/96101
https://www.cndba.cn/hbhe0316/article/96101
SQL> set linesize 200
SQL> set pagesize 200
SQL> select instance_name,host_name,startup_time,status from gv$instance;
INSTANCE_NAME HOST_NAME STARTUP_TIME
-------------------------------- -------------------------------------------------------------------------------------------------------------------------------- ------------------
STATUS
------------------------
cxmtdb1 rac01 2021:12:2621:59:50
OPEN
cxmtdb2 rac02 2021:12:2621:59:52
OPEN
SQL> select instance_name,host_name,startup_time,status from gv$instance;
INSTANCE_NAME HOST_NAME STARTUP_TIME
-------------------------------- -------------------------------------------------------------------------------------------------------------------------------- ------------------
STATUS
------------------------
cxmtdb1 rac01 2021:12:2621:59:50
OPEN
cxmtdb2 rac02 2021:12:2621:59:52
OPEN
检查node01和node02节点数据库、ASM及grid日志是否有错误信息
2.ASM磁盘组及磁盘检查https://www.cndba.cn/hbhe0316/article/96101
SQL> select * from gv$asm_client order by 1,2;
INST_ID GROUP_NUMBER INSTANCE_NAME DB_NAME
---------- ------------ -------------------------------------------------------------------------------------------------------------------------------- ----------------
CLUSTER_NAME STATUS
-------------------------------------------------------------- ------------------------
SOFTWARE_VERSION
------------------------------------------------------------------------------------------------------------------------
COMPATIBLE_VERSION CON_ID
------------------------------------------------------------------------------------------------------------------------ ----------
1 0 +ASM1 cxmtdb
rac CONNECTED
19.0.0.0.0
19.0.0.0.0 0
1 1 +ASM1 cxmtdb
rac CONNECTED
19.0.0.0.0
19.0.0.0.0 0
2 0 +ASM2 cxmtdb
rac CONNECTED
19.0.0.0.0
19.0.0.0.0 0
2 1 +ASM2 cxmtdb
rac CONNECTED
19.0.0.0.0
19.0.0.0.0 0
SQL> select group_number,name,state,type,total_mb,free_mb,usable_file_mb,allocation_unit_size/1024/1024 unit_mb from v$asm_diskgroup order by 1;
GROUP_NUMBER NAME STATE TYPE TOTAL_MB FREE_MB USABLE_FILE_MB UNIT_MB
------------ ------------------------------------------------------------ ---------------------- ------------ ---------- ---------- -------------- ----------
1 DATA CONNECTED NORMAL 102400 88096 44048 4
2 MGMT MOUNTED EXTERN 40960 39444 39444 4
3 OCR MOUNTED NORMAL 15360 14444 4662 4
SQL> select group_number,name,path,mount_status,state,redundancy,total_mb,free_mb,failgroup,create_date from v$asm_disk order by 1,2;
GROUP_NUMBER NAME
------------ ------------------------------------------------------------
PATH
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
MOUNT_STATUS STATE REDUNDANCY TOTAL_MB FREE_MB FAILGROUP CREATE_DATE
-------------- ---------------- -------------- ---------- ---------- ------------------------------------------------------------ ------------------
0
/dev/asmdiskc
IGNORED NORMAL UNKNOWN 0 0 2021:09:2010:33:40
0
/dev/asmdiske
IGNORED NORMAL UNKNOWN 0 0 2021:09:1921:59:38
0
/dev/asmdiskf
IGNORED NORMAL UNKNOWN 0 0 2021:09:1921:59:38
0
/dev/asmdiskb
IGNORED NORMAL UNKNOWN 0 0 2021:09:2010:33:40
0
/dev/asmdiskg
IGNORED NORMAL UNKNOWN 0 0 2021:09:1922:05:26
0
/dev/asmdiskd
IGNORED NORMAL UNKNOWN 0 0 2021:09:1921:59:38
1 DATA1
AFD:DATA1
CACHED NORMAL UNKNOWN 51200 44048 DATA1 2021:09:2010:33:40
1 DATA2
AFD:DATA2
CACHED NORMAL UNKNOWN 51200 44048 DATA2 2021:09:2010:33:40
2 MGMT1
AFD:MGMT1
CACHED NORMAL UNKNOWN 40960 39444 MGMT1 2021:09:1922:05:26
3 OCR1
AFD:OCR1
CACHED NORMAL UNKNOWN 5120 4812 OCR1 2021:09:1921:59:38
3 OCR2
AFD:OCR2
CACHED NORMAL UNKNOWN 5120 4820 OCR2 2021:09:1921:59:38
3 OCR3
AFD:OCR3
CACHED NORMAL UNKNOWN 5120 4812 OCR3 2021:09:1921:59:38
12 rows selected.
3.系统层面记录UDEV结果https://www.cndba.cn/hbhe0316/article/96101
[root@rac01 ~]# cat /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sd*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="1ATA_VBOX_HARDDISK_VBa5ab3bca-9c189b9f", RUN+="/bin/sh -c 'mknod /dev/asmdiskb b $major $minor; chown grid:asmadmin /dev/asmdiskb; chmod 0660 /dev/asmdiskb'"
KERNEL=="sd*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="1ATA_VBOX_HARDDISK_VB17b12e03-424103ce", RUN+="/bin/sh -c 'mknod /dev/asmdiskc b $major $minor; chown grid:asmadmin /dev/asmdiskc; chmod 0660 /dev/asmdiskc'"
KERNEL=="sd*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="1ATA_VBOX_HARDDISK_VB3f81802d-73cb18e9", RUN+="/bin/sh -c 'mknod /dev/asmdiskd b $major $minor; chown grid:asmadmin /dev/asmdiskd; chmod 0660 /dev/asmdiskd'"
KERNEL=="sd*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="1ATA_VBOX_HARDDISK_VB4012909d-8d5bac83", RUN+="/bin/sh -c 'mknod /dev/asmdiske b $major $minor; chown grid:asmadmin /dev/asmdiske; chmod 0660 /dev/asmdiske'"
KERNEL=="sd*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="1ATA_VBOX_HARDDISK_VB5ce61d79-a21a8b8a", RUN+="/bin/sh -c 'mknod /dev/asmdiskf b $major $minor; chown grid:asmadmin /dev/asmdiskf; chmod 0660 /dev/asmdiskf'"
KERNEL=="sd*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="1ATA_VBOX_HARDDISK_VB74167846-a84de8d0", RUN+="/bin/sh -c 'mknod /dev/asmdiskg b $major $minor; chown grid:asmadmin /dev/asmdiskg; chmod 0660 /dev/asmdiskg'"
[root@rac01 ~]# ll /dev/asm*
brw-rw---- 1 grid asmadmin 8, 16 Dec 26 21:54 /dev/asmdiskb
brw-rw---- 1 grid asmadmin 8, 32 Dec 26 21:54 /dev/asmdiskc
brw-rw---- 1 grid asmadmin 8, 48 Dec 26 21:54 /dev/asmdiskd
brw-rw---- 1 grid asmadmin 8, 64 Dec 26 21:54 /dev/asmdiske
brw-rw---- 1 grid asmadmin 8, 80 Dec 26 21:54 /dev/asmdiskf
brw-rw---- 1 grid asmadmin 8, 96 Dec 26 21:54 /dev/asmdiskg
增加两块盘符
[root@rac01 ~]# fdisk /dev/sdh
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xfa13b072.
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p):
Using default response p
Partition number (1-4, default 1):
First sector (2048-41943039, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-41943039, default 41943039):
Using default value 41943039
Partition 1 of type Linux and of size 20 GiB is set
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@rac01 ~]# fdisk /dev/sdi
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xbc2253c3.
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p):
Using default response p
Partition number (1-4, default 1):
First sector (2048-41943039, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-41943039, default 41943039):
Using default value 41943039
Partition 1 of type Linux and of size 20 GiB is set
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@rac01 ~]# partx /dev/sdh
NR START END SECTORS SIZE NAME UUID
1 2048 41943039 41940992 20G
[root@rac01 ~]# partx /dev/sdi
NR START END SECTORS SIZE NAME UUID
1 2048 41943039 41940992 20G
[root@rac01 ~]# fdisk -l | grep "Disk /dev/sd[a-i]"
Disk /dev/sdb: 53.7 GB, 53687091200 bytes, 104857600 sectors
Disk /dev/sde: 5368 MB, 5368709120 bytes, 10485760 sectors
Disk /dev/sdc: 53.7 GB, 53687091200 bytes, 104857600 sectors
Disk /dev/sdh: 21.5 GB, 21474836480 bytes, 41943040 sectors
Disk /dev/sdg: 42.9 GB, 42949672960 bytes, 83886080 sectors
Disk /dev/sdi: 21.5 GB, 21474836480 bytes, 41943040 sectors
Disk /dev/sdf: 5368 MB, 5368709120 bytes, 10485760 sectors
Disk /dev/sdd: 5368 MB, 5368709120 bytes, 10485760 sectors
Disk /dev/sda: 107.4 GB, 107374182400 bytes, 209715200 sectors
3、创建ASM磁盘(只需在节点1中操作即可):
rac01和rac02两端都需要修改/etc/udev/rules.d/99-oracle-asmdevices.rules文件https://www.cndba.cn/hbhe0316/article/96101https://www.cndba.cn/hbhe0316/article/96101
[root@rac01 ~]# cat /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sd*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="1ATA_VBOX_HARDDISK_VBa5ab3bca-9c189b9f", RUN+="/bin/sh -c 'mknod /dev/asmdiskb b $major $minor; chown grid:asmadmin /dev/asmdiskb; chmod 0660 /dev/asmdiskb'"
KERNEL=="sd*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="1ATA_VBOX_HARDDISK_VB17b12e03-424103ce", RUN+="/bin/sh -c 'mknod /dev/asmdiskc b $major $minor; chown grid:asmadmin /dev/asmdiskc; chmod 0660 /dev/asmdiskc'"
KERNEL=="sd*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="1ATA_VBOX_HARDDISK_VB3f81802d-73cb18e9", RUN+="/bin/sh -c 'mknod /dev/asmdiskd b $major $minor; chown grid:asmadmin /dev/asmdiskd; chmod 0660 /dev/asmdiskd'"
KERNEL=="sd*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="1ATA_VBOX_HARDDISK_VB4012909d-8d5bac83", RUN+="/bin/sh -c 'mknod /dev/asmdiske b $major $minor; chown grid:asmadmin /dev/asmdiske; chmod 0660 /dev/asmdiske'"
KERNEL=="sd*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="1ATA_VBOX_HARDDISK_VB5ce61d79-a21a8b8a", RUN+="/bin/sh -c 'mknod /dev/asmdiskf b $major $minor; chown grid:asmadmin /dev/asmdiskf; chmod 0660 /dev/asmdiskf'"
KERNEL=="sd*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="1ATA_VBOX_HARDDISK_VB74167846-a84de8d0", RUN+="/bin/sh -c 'mknod /dev/asmdiskg b $major $minor; chown grid:asmadmin /dev/asmdiskg; chmod 0660 /dev/asmdiskg'"
KERNEL=="sd*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="1ATA_VBOX_HARDDISK_VB418fc53c-4cd8ab78", RUN+="/bin/sh -c 'mknod /dev/asmdiskh b $major $minor; chown grid:asmadmin /dev/asmdiskh; chmod 0660 /dev/asmdiskh'"
KERNEL=="sd*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="1ATA_VBOX_HARDDISK_VBbbba5b28-2b42c7b5", RUN+="/bin/sh -c 'mknod /dev/asmdiski b $major $minor; chown grid:asmadmin /dev/asmdiski; chmod 0660 /dev/asmdiski'"
[root@rac01 ~]# /sbin/udevadm trigger --type=devices --action=change
[root@rac02 ~]# /sbin/udevadm trigger --type=devices --action=change
SQL> select name,path from v$asm_disk;
NAME
------------------------------------------------------------
PATH
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
OCR3
AFD:OCR3
DATA1
AFD:DATA1
OCR2
AFD:OCR2
MGMT1
AFD:MGMT1
OCR1
AFD:OCR1
DATA2
AFD:DATA2
/dev/asmdiskd
/dev/asmdiskb
/dev/asmdiski
/dev/asmdiskh
/dev/asmdiskf
/dev/asmdiske
/dev/asmdiskc
/dev/asmdiskg
14 rows selected.
SQL> conn / as sysasm
Connected.
SQL> alter diskgroup DATA add disk '/dev/asmdiskh' rebalance power 5;
alter diskgroup DATA add disk '/dev/asmdiskh' rebalance power 5
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15410: Disks in disk group DATA do not have equal size.
SQL> alter system set "_asm_disable_dangerous_failgroup_checking"=true;
System altered.
SQL> alter system set "_asm_disable_failgroup_size_checking"=true;
System altered.
SQL> alter diskgroup DATA add disk '/dev/asmdiskh' rebalance power 5;
Diskgroup altered.
SQL> alter diskgroup DATA add disk '/dev/asmdiski' rebalance power 5;
Diskgroup altered.
4.查看asm磁盘变化
https://www.cndba.cn/hbhe0316/article/96101
https://www.cndba.cn/hbhe0316/article/96101
https://www.cndba.cn/hbhe0316/article/96101
[root@rac01 ~]# su - grid
Last login: Sun Dec 26 22:35:57 CST 2021 on pts/2
[grid@rac01 ~]$ asmcmd lsdg
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED NORMAL Y 512 512 4096 4194304 122880 108368 51200 28584 0 N DATA/
MOUNTED EXTERN N 512 512 4096 4194304 40960 39444 0 39444 0 N MGMT/
MOUNTED NORMAL N 512 512 4096 4194304 15360 14444 5120 4662 0 Y OCR/
[grid@rac01 ~]$ asmcmd lsdg
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED NORMAL Y 512 512 4096 4194304 143360 128800 51200 38800 0 N DATA/
MOUNTED EXTERN N 512 512 4096 4194304 40960 39444 0 39444 0 N MGMT/
MOUNTED NORMAL N 512 512 4096 4194304 15360 14444 5120 4662 0 Y OCR/
[grid@rac01 ~]$
版权声明:本文为博主原创文章,未经博主允许不得转载。
Linux,oracle