Oracle 11.2.0.4 x64 RAC扩展存储空间(2)

3. udev识别出新增加的磁盘
(1) udev设备生成脚本,用于识别出新增加的脚本
for i in b c d e f g h i j;
do
echo "KERNEL==\"sd*\", BUS==\"scsi\", PROGRAM==\"/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/\$name\", RESULT==\"`/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/sd$i`\", NAME=\"asm-disk$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\""
done
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c4552395a55706766
2d52366a5a2d684a5445",, OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c45523768705a5241
2d46576d6a2d6a424f52",, OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c45524944414b6731
2d7433474f2d4c424553",, OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c4552496b55307865
2d306747442d64755064",, OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c4552564759334841
2d69635a682d784f6e57",, OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c45523647627a3946
2d494d4c472d4b687276",, OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c4552756354627076
2d426a4c5a2d64753163",, OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c4552436b35585371
2d324e646c2d75386f45",, OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c4552577651593537
2d6b644c592d6c326c39",, OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c4552395a55706766
2d52366a5a2d684a5445",, OWNER="grid", GROUP="asmadmin", MODE="0660"

(2) 将以上内容asm-diskj一行增加到以下文件中,在node1,node2上同时增加。
# vi /etc/udev/rules.d/99-Oracle-asmdevices.rules

Oracle 11.2.0.4 x64 RAC扩展存储空间

Oracle 11.2.0.4 x64 RAC扩展存储空间


4. 查看并添加集群ASM磁盘卷组
(1) 查看卷组情况
[root@node1 ~]# su - grid 
[grid@node1 ~]$ sqlplus / as sysasm 
SQL> set pagesize 999;   
SQL> set linesize 200;   
SQL> col name format a20;   
SQL> select group_number,name,TOTAL_MB, FREE_MB from v$asm_diskgroup;

Oracle 11.2.0.4 x64 RAC扩展存储空间

(2) node1上查看udev设备,并查看新增加的磁盘被识别到了没有。两边都需要确认。
SQL> col name format a20; 
SQL> col path format a20;   
SQL> select name,path,mode_status,state,disk_number,failgroup from v$asm_disk; 

Oracle 11.2.0.4 x64 RAC扩展存储空间

(3) node2上查看udev设备,并查看新增加的磁盘被识别到了没有.

Oracle 11.2.0.4 x64 RAC扩展存储空间

(4) 增加新的磁盘到DATA asm卷组。
SQL>   
SQL> alter diskgroup DATA add disk '/dev/asm-diskj' rebalance power 1;
Diskgroup altered.
SQL>
(5) 查看ASM卷组平衡过程,平衡完后,该内容为空。

Oracle 11.2.0.4 x64 RAC扩展存储空间

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/c652661e5d5d297fed664d84948f7687.html