1、添加新磁盘:
两个节点都操作,使用root用户
for i in j k; do
echo "KERNEL==\"sd*\",ENV{DEVTYPE}==\"disk\",SUBSYSTEM==\"block\",PROGRAM==\"/usr/lib/udev/scsi_id -g -u -d \$devnode\",RESULT==\"`/usr/lib/udev/scsi_id -g -u /dev/sd$i`\", RUN+=\"/bin/sh -c 'mknod /dev/asm-disk$i b \$major \$minor; chown grid:asmadmin /dev/asm-disk$i; chmod 0660 /dev/asm-disk$i'\"" >> /etc/udev/rules.d/99-oracle-asmdevices.rules
done
/sbin/udevadm trigger --type=devices --action=change
/sbin/udevadm control --reload
ll /dev/asm*
一个节点
[root@rac01 ~]# su - grid
Last login: Tue Apr 5 21:48:21 CST 2022 on pts/1
[grid@rac01 ~]$ asmcmd
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 N 512 512 4096 4194304 143360 123652 51200 36226 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/
[root@rac01 ~]# su - grid
Last login: Tue Apr 5 21:25:22 CST 2022 on pts/0
[grid@rac01 ~]$ sqlplus / as sysasm
SQL*Plus: Release 19.0.0.0.0 - Production on Tue Apr 5 21:51:11 2022
Version 19.12.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.12.0.0.0
SQL> alter diskgroup DATA add disk '/dev/asm-diskj';
Diskgroup altered.
SQL> alter diskgroup DATA add disk '/dev/asm-diskk';
Diskgroup altered.
SQL> col name format a10
SQL> set line 9999
SQL> col path format a25
SQL> select GROUP_NUMBER,path,name,disk_number,total_mb,free_mb,CREATE_DATE,MOUNT_STATUS,MOUNT_DATE from v$asm_disk order by GROUP_NUMBER desc,disk_number;
GROUP_NUMBER PA