1.在udev文件中绑定新磁盘的uuid
$(ROOT)
mpath方式增加数据库磁盘空间(仅用于uuid读取)
for i in s t
do
echo "KERNEL==\"dm-*\", SUBSYSTEM==\"block\", PROGRAM==\"/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/\$name\", RESULT==\"`/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/mapper/mpath$i`\""
done
普通方式增加数据库磁盘空间
for i in s t
do
echo "KERNEL==\"sd*\", SUBSYSTEM==\"block\", PROGRAM==\"/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/\$name\", RESULT==\"`/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sd$i`\", SYMLINK=\"asm-disk$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\""
done
$(ROOT)
vi /etc/udev/rules.d/99-oracle-asmdevices.rules ---将上面的新磁盘信息添加到udev文件中
/sbin/udevadm control --reload
/sbin/udevadm trigger --type=devices --action=change ---执行生效新的udev
2.修改后检查集群状态和磁盘的权限属组信息
$(ROOT)
ll /dev/sd*
ll /dev/asm* --注意检查权限&属组
3.kfod查看磁盘信息
#(GRID)
kfod
4.检查所加diskgroup名称,diskstring形式
#(GRID)
sqlplus / as sysasm
SQL> show parameter asm
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
asm_diskgroups string DATA, FRA --注意diskgroup名称
asm_diskstring string /dev/asm* --注意磁盘格式
asm_power_limit integer 1
asm_preferred_read_failure_groups string
5.添加磁盘到磁盘组中
#(GRID)
sqlplus / as sysasm
SQL> alter diskgroup DATA add disk '/dev/sds','/dev/sdt' rebalance power 8;
6.检查asm磁盘重平衡
#(GRID)
sqlplus / as sysasm
SQL> select * from v$asm_operation;
GROUP_NUMBER OPERATION PASS STATE POWER ACTUAL SOFAR EST_WORK EST_RATE EST_MINUTES ERROR_CODE CON_ID
------------ ---------- ------------------ -------- ---------- ---------- ---------- ---------- ---------- ----------- -------------------- ----------
1 REBAL COMPACT WAIT 8 8 0 0 0 0 0
1 REBAL REBALANCE RUN 8 8 76689 87959 27132 0 0
1 REBAL REBUILD DONE 8 8 0 0 0 0 0