执行说明
- 在RAC01-一节点使用root用户,执行如下步骤1-8; ######################
- 在RAC02-二节点使用root用户,执行如下步骤1-8; ######################
- 在RAC01-一节点使用grid用户,执行如下步骤9 ######################
1. 确定使用光纤交换机的设备
cd /sys/class/fc_host
ls -trl
total 0
lrwxrwxrwx 1 root root 0 8月 14 06:42 host7 -> ../../devices/pci0000:40/0000:40:03.0/0000:43:00.0/host7/fc_host/host7
lrwxrwxrwx 1 root root 0 8月 14 06:42 host6 -> ../../devices/pci0000:00/0000:00:1c.4/0000:06:00.0/host6/fc_host/host6
##
刷新光交机端口,使操作系统识别到磁盘
su - root
echo "- - -" > /sys/class/scsi_host/host2/scan
echo "- - -" > /sys/class/scsi_host/host1/scan
########################################################################################
系统组添加磁盘后,反馈磁盘的wwid。其ID如下:
ID样例:【600B3422E07DDBDD9529D5349D0000DA】
真实ID:【600B3422E07DDBDD9529D5349D0000DA】
########################################################################################
2. 获取wwid
## RHEL
for i in `cat /proc/partitions | awk {'print $4'} |grep sd`
do
val=`/sbin/blockdev --getsize64 /dev/$i`
val2=`expr $val / 1073741824`
echo "/dev/$i: $val2 `scsi_id -gud /dev/$i`"
done
#uuid确认
for i in `cat /proc/partitions | awk {'print $4'} | grep sd`
do
echo "Device: $i WWID: `/lib/udev/scsi_id --page=0x83 --whitelisted --device=/dev/$i`"
done | grep -i 3600B3422E07DDBDD9529D5349D0000DA
# 确认wwid在multipath中不存在
600B342AC5649AFD2A62D586ED0000DA -i
600B342CABDDB99D7767DB080D0000DA -j
grep -i "600B342CABDDB99D7767DB080D0000DA" /etc/multipath.conf
multipath -ll | grep -i "600B342CABDDB99D7767DB080D0000DA"
multipath -ll | grep -i "600B342CABDDB99D7767DB080D0000DA" -A11
# 确认alias在multipath中不存在
grep -i "jinrongpt08" /etc/multipath.conf
multipath -ll | grep -i "jinrongpt0"
3. 修改multipath配置
vi /etc/multipath.conf #wwid必须小写且前面加3
########################################################################################
multipath {
wwid 3600b342cabddb99d7767db080d0000da
alias jinrongpt08
}
########################################################################################
grep -i -B2 -A2 "jinrongpt08" /etc/multipath.conf
grep -i -B2 -A2 "3600b342cabddb99d7767db080d0000da" /etc/multipath.conf
4. 重启multipath服务
service multipathd reload
multipath -ll | grep jinrongpt08
5. 验证multipath设备
ls -l /dev | grep dm-
6. 修改udev配置
cd /etc/udev/rules.d
cp 99-oracle-asmdevices.rules 99-oracle-asmdevices.rules.bak`date +%Y%m%d`
vi 99-oracle-asmdevices.rules
#KERNEL=="dm-*",ENV{DM_UUID}=="mpath-3600b342d646db50dd136d959ad0000da",NAME="asm_voting02",OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-3600b342cabddb99d7767db080d0000da",NAME="asm_jinrongpt08",OWNER="grid", GROUP="asmadmin", MODE="0660"
7. 重新加载udev配置
udevadm control --reload-rules
udevadm trigger --type=devices --action=change
8. 验证udev设备
ls -l /dev/ | grep asm_
9. 添加磁盘
通过堡垒机登录mgt1,切换至[grid]用户,执行如下操作添加磁盘:
9.1 确认当前磁盘及状态
set linesize 190;
col path for a40;
select a.name dk_name,a.header_status,a.mode_status,a.state,a.group_number,a.path
from v$asm_disk a
where lower(a.path) like '%vot%'
order by dk_name;
9.2 确认磁盘没有正在执行的操作
set linesize 190;
select * from v$asm_operation;
9.3 添加磁盘
ALTER DISKGROUP DATA_JINRONG add DISK '/dev/asm_jinrongpt08' rebalance power 11;
9.4 确认磁盘没有正在执行的操作
set linesize 190;
select * from v$asm_operation;
9.5 确认当前磁盘及状态
set linesize 190;
col path for a40;
select a.name dk_name,a.header_status,a.mode_status,a.state,a.group_number,a.path
from v$asm_disk a
where lower(a.path) like '%jinrongpt%'
order by dk_name;
网友评论